0

So after reading these questions here, and here, I don't really have any other ideas of how I want to ask this question without explaining my situation.

Note: I am very new to proprietary platforms in general, coming from a background in Free/Open software.

Essentially, I have a program at work for our in-house proprietary motion control platform that uses a script with macros to communicate between the program on the UI side and the firmware on the motion controller side. The documentation and development of all the involved software is handled by a sister company, and the documentation is lacking/not complete, we do have support from them but they are stretched thin, have their own products, are 2,700 mi away, and can't be in-house on call for us, I do not have the source/am not allowed to have the source for either the main application, nor the firmware, and to REALLY kill it, our last, only real programmer left. We are alone with this script and a grip of new products that all depend on this script working well with in the software. The script is in need of a serious, regular bug check solution; for each configured machine that we use this motion controller system with.

So I am going to start debugging this script. That's what's happening here.

I have tried to write a mock-up bash implementation but the degrees of recursion, arrays pulled in from .ini files, system defined command set, and parsing of the script in the firmware; have made this bash debug implementation difficult and I'm not sure I can pull it off fully without hacking away important stuff.

I looked at other options like ANTLR, which is a bit over my head too, but might work.

Now, the controller communicates over some kind of static-IPv4 cross-over Ethernet setup (Telnet?) but has a RS-232 serial that will output formatted strings that are parsed from a 'sout' command. It's been my intent to mod the script to output as much as I can get from formatted strings with predefined system commands and variables, but I'm afraid that it wont give me the big picture.

The script itself defines global, system, and local variables and functions that, (because it's on the motion controller side with hardware limitations), can be nested 25 subroutines deep. The real gotchas seem to be where the recursive side of script enters and exits these functions as they are called from the UI and other functions. Nothing jumps out, but without in depth docs I can only see so much and pretty much have just been learning all this with another engineer who asks questions to the sister company.

Can anyone give me some advice as to how I should proceed in my endeavors? I know it's probably a lot to ask but I am kinda stuck in a rut and need more cognitive resources than my skill, and coffee allow for.

Thank you for your time.

Community
  • 1
  • 1
stelicho
  • 21
  • 8
  • @xxfelixxx we may hire another one soon. Big problem is, I don't know if that is in the company's game plan at the moment. I'm pretty sure it's on us, for right now at least. But there has been no talk of getting another and maybe I need to restart that convo. – stelicho Jul 20 '16 at 07:14
  • .I have been in a similar situation (but it was't bash). Document the program. I know that sounds lame, but the digging you will have to do, the insights involved, will helpful in the future. When you get to some code you don' understand, try to isolate it and break it down. Don't get hung-up on too much detail at first. Write an overview, then slowly drill down on each part - decompose the code. It will take a long time - months, but will pay back. But make sure you write it down - don't try to remember it all, that will not work. – cdarke Jul 20 '16 at 07:35
  • @cdarke I think that's what I'm going to do for now. Thanks it's a good idea. – stelicho Jul 21 '16 at 05:57

0 Answers0