Skip to main content

Reply to "TMCC Control With Arduino"

This thread reminded me to publish some old code to read the serial output of the Command Base and dump it to the console with human read-able text appended to the three hex byte command.  The human read-able part - lots of #defines and text strings - was the grunt work.  The last time I compiled this was on Visual Studio 6 many years ago.  The current Visual Studio doesn't play nicely with old and "untrustworthy" C/C++ code (and life is too short to fuss with it) so building the executable is left to you.  See the README for a link to the multi-threaded TTY I/O code for the files you'll need to build a Windows EXE.  Of course, the Arduino folks will have to adapt the code appropriately for their platform, compilers, and I/O.  The source is .cpp files, the code style is mostly C, so devolving classes to C should not be difficult. 

GitHub project: CmdBaseReader

Command Base Reader example code

I'm currently using C# for development of Legacy tools so I cannot provide a Legacy version of CmdBaseReader using a C/C++ codebase.  I'll publish a Legacy command monitor once I'm satisfied with the code.

Regarding the Command Base serial channel, there is no problem multi-dropping multiple devices that read the output (which is the environment of multiple ICControls devices).  Don't know about potential chaos when transmitting to the Command Base from multiple sources.  I only have one Action Recorder so I haven't stressed writing to the port.

With the LCS devices, each device connects to its neighbors via the PDI cable which is NOT multi-dropped, and I assume that the LCS firmware deals with serial line contention issues.  Accordingly, I would recommend using the SER2 to transmit serial commands into the Legacy Base rather than connecting directly to the Legacy base.

Cheers,

John

 

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×