Jump to content
OMRON Forums

How to notify of move completion over gpascii?


erikj

Recommended Posts

Hi Delta Tau Support, Most of our applications send individual commands to gpascii over an SSH connection. How can I notify the sender that a motor move is complete? I do not want to implement some kind of polling over the SSH link to check the in-position status bit of the motor. Is there an application that already exists to do this, or do I have to write a motion program to do the polling and then post a result from the motion program to the gpascii stdout stream? On another note: is there any documentation for the apps in /opt/ppmac? Most of the codes there do not support the standard unix usage output or support -help or -? options to indicate what the usage should be. Thanks for your help.
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

We expect you to poll to see if a motion program is completed, in the end this works best. If you do not want to do this then on the last two line of the program you must put a DWELL0 and then use the SEND command to send a message. Your host app must monitor the correct recieve buffer with the GetSends() function. So in the end you are still havine to poll something. No documentation on those. All the help you get is usually when you run one with no parameters it will report the parameter list expected and what it means.
Link to comment
Share on other sites

[quote='bradp' pid='1062' dateline='1294943513'] We expect you to poll to see if a motion program is completed, in the end this works best. If you do not want to do this then on the last two line of the program you must put a DWELL0 and then use the SEND command to send a message. Your host app must monitor the correct recieve buffer with the GetSends() function. So in the end you are still havine to poll something. No documentation on those. All the help you get is usually when you run one with no parameters it will report the parameter list expected and what it means. [/quote] I was wrong. If you are using GetSends() from the host it will be an event and you do not need to poll. Once you open the channel if a send comes you will just get it.
Link to comment
Share on other sites

[quote='bradp' pid='1062' dateline='1294943513'] We expect you to poll to see if a motion program is completed, in the end this works best. If you do not want to do this then on the last two line of the program you must put a DWELL0 and then use the SEND command to send a message. Your host app must monitor the correct recieve buffer with the GetSends() function. So in the end you are still havine to poll something. No documentation on those. All the help you get is usually when you run one with no parameters it will report the parameter list expected and what it means. [/quote] Hi Brad, Thanks for your reply. My concern is that I don't want to poll across a networked SSH connection using gpascii, as that is slow and a waste of the connection bandwidth. If I understand you correctly, I need to have a separate connection from my host CPU that once connected runs the getsends program for the appropriate buffer (only 4 max?). On the PPMAC end, I implement polling in the motion control program (or your dwell0 technique) and then post a message using send. Unfortunately, we were not planning on using motion programs except for in special cases, but using jog commands (initiated through gpascii). Your dwell0 method is short enough that perhaps it can be implemented and executed using the cpx on-line command without having to download a separate motion program. Do you agree? Thanks, Erik
Link to comment
Share on other sites

If you are going to send on-line jog commands then I would try this method. Make a script PLC that will send messages. You could have this send a message each time a motor starts a jog and each time the jog stops. You could manage it all by looking at status bits but the logic is easier when along with the jog command you set a varable, usually done with a synchronous assignment. So the command would be p1==1 #1j=1000. The PLC would monitor for the variable to equal one and the send its message when that motor stops moving. At this point there are many variations. What I like best is to just use 2 variables one for the motor number and one for the distance. Send these and the PLC grabs them commands the jog move and does whatever else is needed.
Link to comment
Share on other sites

To clarify use the sendgetsends not getsends. How it works is: to listen on a port start sendgetsends -n where n is 0 to 4 for the port number. to send to a port just send -ntext. Example is -2hello will send the string "hello" to port 2. Note you can not send on the same port you are listening to so if all you want to do is send then run sendgetsends with no port number. With this you can send text strings from script programs to c programs and between c programs.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...