Re: [Emc-users] Command-line interface to EMC2
Thanks Eric. For some reason I had overlooked 'program_status'. That about wraps up my interface requirements with EMC2. A follow-on question, but I know is off-track, is the Python programming. It looks as though I will be running multiple processes and I am a bit overwhelmed by the prospect of that level of programming. Do you know of an equivalent user forum for Python? PIGgies seem to be more about networking than problem solving... Best regards, -- -- Glenn, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric H. Johnson Sent: Thursday, February 08, 2007 5:11 PM To: 'Enhanced Machine Controller (EMC)' Subject: Re: [Emc-users] Command-line interface to EMC2 Glenn, There are a number of commands which will give you meaningful status information. They include: get estop Returns On | Off for whether the machine is in estop get machine Returns On | Off for whether the machine state is on or off. get program Returns the name of the currently loaded program get mode Returns manual | auto | mdi for the current operating mode get program_status Returns idle | running | paused for program run state get step Returns the current step (line of G-Code) executing. Again enter: help get To see a complete list of all commands supported by get. Regards, Eric > While EMC is processing a file, how do I get its status. I > am looking for Busy, Done, etc. EMCRSH and AXIS-REMOTE do > not seem to have any appropriate commands, unless I am > overlooking something. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Glenn, There are a number of commands which will give you meaningful status information. They include: get estop Returns On | Off for whether the machine is in estop get machine Returns On | Off for whether the machine state is on or off. get program Returns the name of the currently loaded program get mode Returns manual | auto | mdi for the current operating mode get program_status Returns idle | running | paused for program run state get step Returns the current step (line of G-Code) executing. Again enter: help get To see a complete list of all commands supported by get. Regards, Eric > While EMC is processing a file, how do I get its status. I > am looking for Busy, Done, etc. EMCRSH and AXIS-REMOTE do > not seem to have any appropriate commands, unless I am > overlooking something. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Glenn, There are a number of commands which will give you meaningful status information. They include: get estop Returns On | Off for whether the machine is in estop get machine Returns On | Off for whether the machine state is on or off. get program Returns the name of the currently loaded program get mode Returns manual | auto | mdi for the current operating mode get program_status Returns idle | running | paused for program run state get step Returns the current step (line of G-Code) executing. Again enter: help get To see a complete list of all commands supported by get. Regards, Eric > While EMC is processing a file, how do I get its status. I am looking > for Busy, Done, etc. EMCRSH and AXIS-REMOTE do not seem to have any > appropriate commands, unless I am overlooking something. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
While EMC is processing a file, how do I get its status. I am looking for Busy, Done, etc. EMCRSH and AXIS-REMOTE do not seem to have any appropriate commands, unless I am overlooking something. Best regards, -- -- Glenn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric H. Johnson Sent: Wednesday, February 07, 2007 11:03 AM To: 'Enhanced Machine Controller (EMC)' Subject: Re: [Emc-users] Command-line interface to EMC2 Jeff, It should be noted however that if AXIS, or any other user interface opens a program file, that issuing: get program To emcrsh will (ok should, I know it works with tkemc) return the current open program. Regards, Eric > It's possible that 'open' is working, but axis isn't doing > what you expect. If another UI (including emcrsh) opens a > file, AXIS doesn't automatically load that file in its > preview. If you want to open a file in AXIS to preview, you > can use the script 'axis-remote' to do it. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Thanks Eric and Jeff! I am able to do everything I need to do, using suggestions from both of you, from a terminal command-line. Now I need to encode those commands into a python script. The road is a bit bumpy (I am a lightweight programmer), but progress is being made. For on-line Python support, do have any recommendations? Best regards, -- -- Glenn R. Edwards Glenn Edwards Engineering 760 Seale Ave. Palo Alto, CA 94303 650.327.9009 voice and fax 650.269.2860 mobile mailto: [EMAIL PROTECTED] The information in this email and any attachments are confidential. If you are not the intended recipient, please destroy this email and all attachments. Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric H. Johnson Sent: Wednesday, February 07, 2007 11:03 AM To: 'Enhanced Machine Controller (EMC)' Subject: Re: [Emc-users] Command-line interface to EMC2 Jeff, It should be noted however that if AXIS, or any other user interface opens a program file, that issuing: get program To emcrsh will (ok should, I know it works with tkemc) return the current open program. Regards, Eric > It's possible that 'open' is working, but axis isn't doing > what you expect. If another UI (including emcrsh) opens a > file, AXIS doesn't automatically load that file in its > preview. If you want to open a file in AXIS to preview, you > can use the script 'axis-remote' to do it. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Jeff, It should be noted however that if AXIS, or any other user interface opens a program file, that issuing: get program To emcrsh will (ok should, I know it works with tkemc) return the current open program. Regards, Eric > It's possible that 'open' is working, but axis isn't doing > what you expect. If another UI (including emcrsh) opens a > file, AXIS doesn't automatically load that file in its > preview. If you want to open a file in AXIS to preview, you > can use the script 'axis-remote' to do it. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
It's possible that 'open' is working, but axis isn't doing what you expect. If another UI (including emcrsh) opens a file, AXIS doesn't automatically load that file in its preview. If you want to open a file in AXIS to preview, you can use the script 'axis-remote' to do it. Jeff - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Glenn, Glad to hear someone else is able to make use of that. As for using open, the first thing I can think of is that the path is relative to the path set for nc_files. IOW, if you are running from building "head" in the default folder (emc2-head), then to open the example program 3D_Chips.ngc in emc2-head/nc_files, just enter: set open 3D_Chips.ngc If you just did a binary install of EMC2, then the gcode files will be found in: /usr/share/emc/ncfiles And all paths will be relative to there. Your gcode files should go into the appropriate folder as above, determined by the way you are running EMC. Regards, Eric > This helped a lot. I upgraded to EMC2.1 (non-trivial because > I had modified .ini and .hal files, but not too bad) and was > able to get a local telnet session going very quickly. But, > I am having trouble with the 'set open path/filename' > command. It just does not seem to work, though I can get all > the other 'set' and 'get' commands to work fine. I am > running AXIS in the background - it's cool to see it respond > to external commands. Any thoughts? > > Developers: EMC2.1 rules! - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Thanks Eric! This helped a lot. I upgraded to EMC2.1 (non-trivial because I had modified .ini and .hal files, but not too bad) and was able to get a local telnet session going very quickly. But, I am having trouble with the 'set open path/filename' command. It just does not seem to work, though I can get all the other 'set' and 'get' commands to work fine. I am running AXIS in the background - it's cool to see it respond to external commands. Any thoughts? Developers: EMC2.1 rules! Best regards, -- -- Glenn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric H. Johnson Sent: Friday, December 29, 2006 11:54 AM To: 'Enhanced Machine Controller (EMC)' Subject: Re: [Emc-users] Command-line interface to EMC2 Glenn, See if this is of any value. I haven't checked the released version lately, so this may only be in head at this time. But do a CVS check out and compile of 'HEAD'. In there you will find a program called "emcrsh" (in bin). It basically supports the same functions as emcsh only over a telnet session. To use it with an existing configuration and GUI, in the configuration you are using, simply add "loadusr emcrsh" to the end of "core_servo.hal" or "core_stepper.hal" for example. To use it in place of any GUI, copy bin/emcrsh over bin/emcsh, and in the ini file set "display" to "tkemc". Then emcrsh will run in place of any GUI. Once it is running you can open a telnet session from the local machine as follows: telnet localhost 5007 Or from a remote machine by: telnet 5007 This will establish a telnet session with EMC. Enter 'help' or 'help ' to show all of the commands which are supported. Some important ones are: Hello Example: hello EMC emcuser 1.0 The default password is 'EMC', the client name can be anything, but I typically use the network name of the computer establishing the telnet session, and the only version which currently exists is '1.0'. A successful hello exchange is required before emcrsh will respond to any commands other than "help" and "quit". This will allow you to "get" (see "help get") information from EMC. By default, 'echo' is on, so the first thing you will probably want to do is: set echo off Also, when manually entering commands through telnet, you can get more meaningful error messages by turning verbose on, as follows: set verbose on If you want to change any EMC values, then you must "enable" the session as the session in control as follows: set enable Example: set enable EMCTOO Where 'EMCTOO' is the default enable password. Emcrsh supports multiple simultaneous connections, but only allows one to be enabled for control at any given time. A successful enable will disable any other session having control. Note: It does not affect any of the GUIs specified by "display" in the ini files and does not take control away from them, only other telnet sessions. Let me know if that is of any help. Regards, Eric > Several months ago I asked a question about remote control of > EMC. I received many excellent responses - thank you all. > > > > As the system architecture progresses, it has become clear > (or clearer) that what I need is the ability run EMC2 from > within a Python shell program (or supervisory program) > running on the same computer as EMC2. The shell program will > start/stop EMC2 (not necessary, but nice-to-have), deliver an > " *.ngc" file to EMC2 and have EMC2 execute that file > (necessary) and get status reports from EMC2 (necessary). > > > > I have researched emcsh and emcsvr , but have come to > dead-ends on both topics. Does anyone have any ideas on > where to start my research? Thanks! I sense that I am just > emulating a GUI (or precluding the use of one), of which > there are many excellent ones that have been developed for EMC2. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE V ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Ken, >From my UNIX admin days, I feel comfortable with interpreted, script languages. Python also provides useful networking tools and libraries and there is a ton of literature supporting it. Jeff and Eric replied (thanks guys!) with some stuff I will be trying out over the next week, or so. I will also look into the AXIS source code, though my sculpting abilities are meager at this time ;-) Best regards, -- -- Glenn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Lerman Sent: Friday, December 29, 2006 10:58 AM To: Enhanced Machine Controller (EMC) Subject: Re: [Emc-users] Command-line interface to EMC2 Why python? If it is because you already know python, then I'd suggest you start by examining AXIS. My guess is that everything you need is in there. [Sort of like making a sculpture of a horse. Take a piece of stone and remove everything that isn't a horse.] :-) I'm sure that cradek and jepler can provide more direction. Ken [EMAIL PROTECTED] Mark Kenny Products Company, LLC 55 Main Street Voice: (203)426-7166 Newtown, CT 06470Fax: (203)426-9138 http://www.MarkKenny.com <http://www.markkenny.com/> -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Glenn R. Edwards Sent: Friday, December 29, 2006 1:34 PM To: emc-users@lists.sourceforge.net Subject: [Emc-users] Command-line interface to EMC2 Dear fellow EMC users and developers, Several months ago I asked a question about remote control of EMC. I received many excellent responses - thank you all. As the system architecture progresses, it has become clear (or clearer) that what I need is the ability run EMC2 from within a Python shell program (or supervisory program) running on the same computer as EMC2. The shell program will start/stop EMC2 (not necessary, but nice-to-have), deliver an " *.ngc" file to EMC2 and have EMC2 execute that file (necessary) and get status reports from EMC2 (necessary). I have researched emcsh and emcsvr , but have come to dead-ends on both topics. Does anyone have any ideas on where to start my research? Thanks! I sense that I am just emulating a GUI (or precluding the use of one), of which there are many excellent ones that have been developed for EMC2. Best regards, -- -- Glenn Edwards - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Glenn, See if this is of any value. I haven't checked the released version lately, so this may only be in head at this time. But do a CVS check out and compile of 'HEAD'. In there you will find a program called "emcrsh" (in bin). It basically supports the same functions as emcsh only over a telnet session. To use it with an existing configuration and GUI, in the configuration you are using, simply add "loadusr emcrsh" to the end of "core_servo.hal" or "core_stepper.hal" for example. To use it in place of any GUI, copy bin/emcrsh over bin/emcsh, and in the ini file set "display" to "tkemc". Then emcrsh will run in place of any GUI. Once it is running you can open a telnet session from the local machine as follows: telnet localhost 5007 Or from a remote machine by: telnet 5007 This will establish a telnet session with EMC. Enter 'help' or 'help ' to show all of the commands which are supported. Some important ones are: Hello Example: hello EMC emcuser 1.0 The default password is 'EMC', the client name can be anything, but I typically use the network name of the computer establishing the telnet session, and the only version which currently exists is '1.0'. A successful hello exchange is required before emcrsh will respond to any commands other than "help" and "quit". This will allow you to "get" (see "help get") information from EMC. By default, 'echo' is on, so the first thing you will probably want to do is: set echo off Also, when manually entering commands through telnet, you can get more meaningful error messages by turning verbose on, as follows: set verbose on If you want to change any EMC values, then you must "enable" the session as the session in control as follows: set enable Example: set enable EMCTOO Where 'EMCTOO' is the default enable password. Emcrsh supports multiple simultaneous connections, but only allows one to be enabled for control at any given time. A successful enable will disable any other session having control. Note: It does not affect any of the GUIs specified by "display" in the ini files and does not take control away from them, only other telnet sessions. Let me know if that is of any help. Regards, Eric > Several months ago I asked a question about remote control of > EMC. I received many excellent responses - thank you all. > > > > As the system architecture progresses, it has become clear > (or clearer) that what I need is the ability run EMC2 from > within a Python shell program (or supervisory program) > running on the same computer as EMC2. The shell program will > start/stop EMC2 (not necessary, but nice-to-have), deliver an > " *.ngc" file to EMC2 and have EMC2 execute that file > (necessary) and get status reports from EMC2 (necessary). > > > > I have researched emcsh and emcsvr , but have come to > dead-ends on both topics. Does anyone have any ideas on > where to start my research? Thanks! I sense that I am just > emulating a GUI (or precluding the use of one), of which > there are many excellent ones that have been developed for EMC2. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
I've just put an example program, called "jdi" ("just do it") on the AXIS blog: jdi.py is an example of controlling emc with a simple Python program that sends NML messages. It will turn off estop, turn the machine on, enter "AUTO" mode, open the named file, and then run it. While the program is running, it prints the line number and machine position about once a second. When it finishes, it turns on estop and exits. By using it as your DISPLAY=, you can make emc run one .ngc file and then exit: emc configs//your.ini /full/path/to/your/gcode.ngc http://axis.unpy.net/01167419757 http://axis.unpy.net/files/01167419757/jdi.py Jeff - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Command-line interface to EMC2
Why python? If it is because you already know python, then I'd suggest you start by examining AXIS. My guess is that everything you need is in there. [Sort of like making a sculpture of a horse. Take a piece of stone and remove everything that isn't a horse.] :-) I'm sure that cradek and jepler can provide more direction. Ken [EMAIL PROTECTED] Mark Kenny Products Company, LLC 55 Main Street Voice: (203)426-7166 Newtown, CT 06470Fax: (203)426-9138 http://www.MarkKenny.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Glenn R. Edwards Sent: Friday, December 29, 2006 1:34 PM To: emc-users@lists.sourceforge.net Subject: [Emc-users] Command-line interface to EMC2 Dear fellow EMC users and developers, Several months ago I asked a question about remote control of EMC. I received many excellent responses - thank you all. As the system architecture progresses, it has become clear (or clearer) that what I need is the ability run EMC2 from within a Python shell program (or supervisory program) running on the same computer as EMC2. The shell program will start/stop EMC2 (not necessary, but nice-to-have), deliver an " *.ngc" file to EMC2 and have EMC2 execute that file (necessary) and get status reports from EMC2 (necessary). I have researched emcsh and emcsvr , but have come to dead-ends on both topics. Does anyone have any ideas on where to start my research? Thanks! I sense that I am just emulating a GUI (or precluding the use of one), of which there are many excellent ones that have been developed for EMC2. Best regards, -- -- Glenn Edwards - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users