Linking Axis

I am writing a command, pos, speed, ramp, and dir. straight from the PLC to the RMC and just change the Posision to where I want the axis to go.
This works great.
How can I get the rest of the axis to follow the axis I am commanding, or do I have to write from the PLC to all axis?

You write the same command to all the axes at the same time. Remember there are 10 words per axis even if you aren’t using all the registers. The important thing to remember is that this must be all done in one Ethernet write. If you use multiple writes there will be delays between the packets so there will be delays between axes starting. This is not good.

A better way is to use the User Programs. If all axes are doing the same thing you can write the position, velocity, acceleration and deceleration to the variable table and then use a SyncMoveAbs to move all axes at the same time. In some cases the velocity, acceleration and deceleration are fixed so they can be hard coded in the SyncMoveAbs command. The user program will wait for a position change and then move all axes to the same position to the new position.

My thought was if I were to write to all axes was to use the indirect vars in the RMC and group the commands, and parameters in order. That way I could use a fill for a len of 8 comand in the plc and only use 1 message.
I will do it with a RMC user program. I guess I thought when the cylinders hit the first position the program will end. I guess as long as your calling it, it will remain running?

Using a user program worked. At first I had a 1 line program and had it jump to it self. I would get random command errors on different axes. So I added another command Hold Current Position and then jumped from there to my sync move command and it started working with no errors.

You should wait until all the axes get to position

Label  LOOP
Expression  OldPosition := NewPosition;
SyncMoveAbs     NewPosition     Speed  Acceleration  Deceleration Direction   SyncGroup
Cond Jump   _Axis[0].StatusBits.0 and _Axis[1].StatusBits.0  and NewPosition <> OldPosition     LOOP   Wait

StatusBits.0 is the In Position Bit.
This code will wait till both axes are in position and there is a new position.

How do you put the expression above the command?

I should have looked at the avaible commands before posting this question.
I got it thanks

Stuart,

The Step Editor has a toolbar with a Command section. It allows you to add, remove, and move commands up and down. You can also do it with your mouse. Right-click to add or remove items, drag to move items.

You mentioned that your program continuously loops. I’m not sure this is what you want. A user program is basically a list of commands. Once a command is issued, the RMC will complete the command, regardless of whether the user program is still running. It is a very bad idea to continuously issue move commands. They are not intended to be continusously issued.

If you simply want to move the axes to a position, then just have one step that issues the commands, then ends. If you want to move the axes again, start the user program again.