A SlaveGroup is an axis set that allows a group of axes to follow the movement of a master axis. There are two main modes for following a master axis:
The SlaveGroup is told which axis is the master axis, but the master axis is not installed within the SlaveGroup. There is a single master axis that all slaves follow. The master axis can be any type of individual axis. It is possible to change the axis that you want to designate as the master axis.
All the axes that you want to follow a master must be installed into the SlaveGroup. A total of six axes may be installed into a SlaveGroup. Each slave axis may follow the master axis according to its own Ratio or Cam profile. Multiple slaves can share one Cam profile.
To use a SlaveGroup, generally proceed as follows:
-
Configure all the individual axes, which belong to this SlaveGroup.
-
Configure the SlaveGroup.
-
Enable all the drives in the SlaveGroup by issuing the EnableDrive function on the SlaveGroup.
-
Enable following for slave axes using the Acquire and FollowOn bits, or deactivate slave axes by executing the FollowOff and Release bits.
You may command the slave axes to move when following is activated or deactivated. Any movement commands issued to a slave axis while following is activated will result in additional movement as well as the movement resulting from the slave following the master.
As an option, you may establish a master threshold position. The SetMasterTriggerPosition function sets the master position at which following will be triggered for the specified axis. The SlaveMode indicates if the master threshold position will be used. When this feature is used, and following is activated, following actually begins when the master reaches the master threshold position.
When following occurs, the value of bias indicates the distance between where the slave is and where it is supposed to be, according to the Cam or Slave Ratio. Make sure that following is actually occurring before calling the GetFollowerBias function. (Do not rely on the fact that following was activated). For a slave axis, its AXIS_IS_LINKED movement status bit will be set when following is taking place. If you call GetFollowerBias when following is not taking place, the return value will indicate the commanded position of the slave axis.
Use the Bias when you want to have the slave axis at a known point when the master is at a given point. This function is not useful for applications that command the slave to simply follow the master's speed by a certain ratio. It is also not useful when the slave needs to move a known incremental distance (for example, a "registration" movement).
In Ratio mode, the Bias value changes while the slave axis accelerates to the following speed after following is activated or the Ratio is modified.
The Bias value is latched when following begins. In Cam mode, the position where the slave is supposed to be is determined by the present master position and the corresponding entry in the Cam profile. In Ratio mode, the following formula indicates where the slave is supposed to be:
where the slave axis should be = present master position * Ratio
When following begins, the movement controller sets the Bias value for the distance between the present position of the slave axis and where it should be. This Bias prevents the slave from jumping to where it is supposed to be when following begins. The following movement of the slave axis will then be offset from where it is supposed to be, unless the Bias is zero. To reset the Bias, an incremental movement must be issued to the slave axis with the movement value equal to the negative of the value returned from the GetFollowerBias function.
You may want to have a non-zero Bias. In Cam mode, it is possible to offset the movement from the values listed in the table. In Ratio mode, it is possible to shift the linear relationship, so that a plot of master positions versus slave positions does not pass through the point:
slave position = 0 when master position = 0
That is, in Ratio mode, you may control where the slave should be for any particular master position. The Bias of a slave axis is modified by sending movement commands to that slave axis.
The SlaveMode can be changed at any time for any axis. This allows you to change from Cam to Ratio or vice versa, as well as changing Cam profiles or Slave Ratios.
Some applications are simplified by using the MasterOffset functions. Consider the case where one slave is supposed to follow a sinewave profile, while another slave is supposed to follow a cosine profile. For this case, a single Cam profile containing sinewave data could be shared by both slave axes, where MasterOffset values of 0 and 90 degrees would be set for the sinewave and cosine followers respectively.
The MovementStatus bits for a slave axis relate the state of a movement command sent to that axis. For example, the PROFILE_END bit being set does not indicate that the slave axis is stationary. The slave axis will move if the master axis moves. When a movement command is sent to the slave axis, the PROFILE_END bit clears until this movement by the slave axis completes itself. The other status bits have similar behavior that reflects the state of the slave axis movement command, not the status of the master axis.