Thanks Andy,
I'll check into that.  I've attached two screen shots of an app I put together 
in just over a half hour.  Mostly trying to remember how to do certain things. 

Press the buttons on the user screen and the Active GCodes are updated.  A 
total of 98 lines of code including blank lines between each function.  Trivial 
really.   Written on WIN-10 PC.  Compiled on PC. Running on PC.  But, project 
can be copied onto Pi4 with LinuxCNC or a desktop with LinuxCNC and compiled 
there for that target.  Write once, compile anywhere.

There is a function 'UdateOptionsList' that updates the Active GCodes.  This 
would be the place where the LinuxCNC system is updated with the M3 and S500 
(and any other M,G commands in the list) after a user clicked the + button.  Or 
entered something from the MDI line.

Your code link shows
static RCS_CMD_CHANNEL *emcCommandBuffer = 0;
as a method of sending information to LinuxCNC.

Defined in /cmd_msg.hh
But as yet I've not figured out how it gets from there into LinuxCNC.  
Something to do with the NML.
More work required.

John


> -----Original Message-----
> From: andy pugh [mailto:bodge...@gmail.com]
> Sent: December-16-20 2:58 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Python question
> 
> On Wed, 16 Dec 2020 at 06:29, John Dammeyer <jo...@autoartisans.com> wrote:
> 
> > https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/usr_intf/emcrsh.cc
> > It uses sockets in that file which implies this is how communications is 
> > done.
> 
> Not normally. emcrsh is an "add on" interface for communicating with
> remote LinuxCNC systems.
> 
> halui is probably a better example of how to control LinuxCNC from C / C++
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/usr_intf/halui.cc
> 
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> � George Fitch, Atlanta Constitution Newspaper, 1912
> 
> 
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to