As has been mentioned before, using linuxcncrsh may do all that you need. It can open files, start/stop runs, return status etc.
It is a simple telnet interface, so you just need a socket connection and then send text commands down the line. There is a Java example in the forum http://www.linuxcnc.org/index.php/english/forum/21-axis/21678-controlling-li nuxcncrsh-from-a-java-program Or, you can look at the linuxcncrsh source to see an example of remote control. Be careful though, the linuxcncrsh code has been changed so that it must be the only GUI. If you try to run it with axis at the same time, linuxcnc will eventually fail. The documentation still says that you can run it with axis. -----Original Message----- From: Walter Cigana [mailto:walter.cig...@gmail.com] Sent: Monday, 21 October 2013 5:22 PM To: Enhanced Machine Controller (EMC) Subject: [Emc-users] Controlling LinuxCNC externally with C++ program Hi all, I am still Learning LinuxCNC and I again have a few questions. I am trying to figure out the best way to "drive" LinuxCNC from a C++ program. This program would receive general commands from the user, something like: "execute procedure 1" and translate this into telling LinuxCNC to open a specific file and run the G-code therein. I saw that there is a Python interface: http://www.linuxcnc.org/docs/html/common/python-interface.html#_the_linuxcnc _python_module The doc states that "Programmatic access to NML is through a C++ API; however, the most important parts of the NML interface to Linuxcnc are also available to Python programs through the linxuxcnc module." I do not really feel like learning Python, but I cannot find the C++ way to do this. I have seen some documentation, but nothing specific and I cannot find any examples. Ideally, I could just use an API from my program. Can someone point me in the right direction??? thanks, Walter ---------------------------------------------------------------------------- -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users