JeffLowe Posted February 7, 2014 Posted February 7, 2014 We are implementing a G31 move and need to set multiple axes into motion until a trigger is observed. Because we are using kinematics, the normal move until triggers within a motion program cannot work. The alternative is to do this with Jog1=1234^0 jog2=12^0 type commands. My problem is that if these are issued from a motion program, the first axis will move, and after reaching the end or trigger, the second axis will start it's move. It is required that these be near to concurrent. Executing this with a CX from the command line works fine. Writing a separate plc for the sole purpose of picking up the data from my motion and executing these jog moves seems less than desirable, and I am looking for alternatives. For testing I have been trying simple incremental jogs. Inserting CX pmatch #1jog:5 #3jog:5 did not build. Using: cmd"CX pmatch #1jog:5 #3jog:5"; builds fine, but does not initiate any motion. Any suggestions on other things to try, or should I just bite the bullet and pass everything through common variables and execute it based on a flag.
curtwilson Posted February 11, 2014 Posted February 11, 2014 The issue you are encountering here is that separate jog commands in a motion program are executed sequentially. However, if you issue the same jog command to multiple motors, they will start together. The question is how to get the flexibility you need when commanding multiple motors with the same jog command. The on-line command j=* jogs the motor to the position found in Motor[x].ProgJogPos, and j=* jogs the motor the distance found in Motor[x].ProgJogPos. You can also do triggered jogs like this, with j=*^0 or j:^*0. There are also equivalent program commands that do this. We have not documented them because they seemed redundant to the j={data} type commands, but for this particular purpose, they are very useful. So in your G31 subroutine, you could have: Motor[1].ProgJogPos = ... Motor[2].ProgJogPos = ... jog1,2=*^0 pmatch ... You may also want to set jog velocities and accelerations to control the path in the way that you want.
Recommended Posts