Topic: DMD0395 AXFOLLOW - Axis Position Following with Offset |
|
Note: this instruction can only be used with a BRX CPU !
The Axis Position Following with Offset (AXFOLLOW) instruction is used to establish a Master / Follower connection for an Axis so that the Follower's movement is synchronized to the Master's movement. The Master can be another Axis or a High-Speed Counter / Timer.
Note: the Master and Follower Axes must be on the same hardware. This means if the Master Axis is using the on-board discrete I/O then the Follower must be one of the Axes or High-Speed Counter / Timers also using on-board discrete I/O; if the Master Axis is on one of the BRX HSIO modules (BX-HSIO1, BX-HSIO2, or BX-HSIO4) then the Follower must be one of the Axes on the same HSIO module.
Note: only the BX-HSIO4 module can operate at velocities above 250KHz; attempting to use a velocity above 250KHz for an Axis that is using the on-board High-Speed I/O, or an Axis on a BX-HSIO1 or BX-HSIO2 module will result in a maximum velocity of that Axis still being 250KHz.
Once the instruction is enabled, the Follower Axis will being moving at the Slave Axis' maximum velocity in an effort to get into "sync" with the Master. Because the Follower Axis will need the ability to overtake the Master Axis during a Goto Relative Offset operation, make sure the Maximum Velocity, Acceleration, and Deceleration parameters of the Master and Follower Axes have been configured with enough capacity to allow this. The Follower Axis can be made more responsive by configuring it with higher Maximum Velocity, or a faster Acceleration, or both.
To help keep track of the Axes movement relative to each other, any time the Axis is in Position Following mode the Follower Axis' associated structure member MstSlvCoordError will contain the difference (in pulse counts) between the Master Axis' position and the Follower Axis' position.
Axis Device selects which Axis to use as the Slave Axis - remember that Axis 0 is a virtual Axis meaning it will not generate pulses to physical outputs on the PLC.
Master Register selects the Axis or High-Speed Counter / Timer that provides the position source value. Note: this must be one of the Axes or High-Speed Counter / Timers on the same hardware as the Axis Device, this means if the Axis is using the on-board discrete I/O then the Master Register must be one of the Axes or High-Speed Counter / Timers also using on-board discrete I/O; if the Axis is using the discrete I/O on one of the BRX HSIO modules (BX-HSIO1, BX-HSIO2, or BX-HSIO4) then the Master Register must be one of the Axes or High-Speed Counter / Timers using discrete I/O from the same HSIO module.
Non-Axis Master Filter Time is parameter is only enabled if the Master Register is a High-Speed Counter / Timer . This value is the Filter Time Constant which specifies how often (in Seconds) the Follower's position is calculated. This can be any constant value or any numeric location.
Gear Ratio Multiplier is a multiplier that will be applied when the Follower's position is calculated. This value is only applied once, when the instruction is first enabled. Negative values will cause the direction of the Slave to be reverse of the Master. This can be any constant value or any numeric location. Note: to make it possible for the Master and Slave Axes to get synchronized - and remain synchronized if the Gear Ratio changes - the performance of the Slave axis must be significantly higher than the Master axis. Setting values for the maximum frequency, maximum acceleration, and maximum deceleration of the Slave axis to at least twice those of the Master axis is a good starting point.
Relative Offset Position is the pulse count adjustment that will be applied to the Follower's current position each time the Goto Offset Signal turns ON. This can be any constant value or any numeric location.
Relative Offset Velocity is the additional velocity the Follower Axis will use when moving to the Relative Offset Position. This value specifies how much faster ( in pulses / second) the Follower Axis can move when attempting to move to the Relative Offset Position. A value of 0 means the Follower Axis will move at the Axis's maximum Velocity to get to the specified offset position. This value can be any constant between 0 and 2,000,000, or any numeric location containing a value in that range. Note: only the BX-HSIO4 module can operate at velocities above 250KHz; attempting to use a velocity above 250KHz for an Axis that is using the on-board High-Speed I/O, or an Axis on a BX-HSIO1 or BX-HSIO2 module will result in a maximum velocity of that Axis being 250KHz.
Each time the Goto Offset Signal Bit location transitions from OFF to ON the Follower Axis will attempt to move to the Relative Offset Position using the Relative Offset Velocity. The Axis does not have to be moving for this to take affect. Once the Relative Offset Position is reached the Axis will turn this bit OFF. This can be any writable Bit location.
This instruction puts the specified Axis into an operational mode - as opposed to performing a single operation. Because this is a mode change operation, ON Success is defined as getting the Axis into this mode and back out of this mode with no errors or faults.
When the input logic turns ON, the On Error indication will turn ON if there is a problem getting the Axis into the this operational mode. It will remain OFF if the mode change is successful.
Once the Axis is in this mode, the On Success indication will turn ON after the input logic turns OFF and the Axis' decelerates to 0 (the Current Velocity reaches 0). At this point the Axis' Mode will be "Idle". Once the input logic turns OFF and the deceleration phase begins, if the input logic turns back ON while the Axis is still decelerating, the Axis will NOT start moving again. You must wait until the On Success indication turns ON - the Axis must be "Idle" - before attempting to run any other Axis instruction.
The On Success and On Error parameters specify what action to perform when this instruction completes. You do not have to use the same type of selection for both On Success and On Error.
If the Set Bit selection is used for either On Success or On Error, the specified BIT location will be SET OFF when the instruction is first enabled and will remain OFF until the instruction completes. Once complete, the appropriate Success or Error bit location will be set ON. The specified Bit location is enabled with a SET (Latch) operation not an (OUT) operation meaning that it will remain ON even if this instruction's input logic goes OFF.
If the JMP to Stage selection is used for either On Success or On Error the target Stage must be in the same Program code-block as this instruction, you cannot specify a target Stage that exists in a different Program code-block. When the operation finishes, the target Stage will be enabled the same way as a standalone Jump to Stage (JMP) instruction would do it. The JMP to Stage option will only be selectable if this instruction is placed in a Program code-block.
On Success selects which of the following actions to perform if the operation is successful:
On Error selects which of the following actions to perform if the operation is unsuccessful:
If either the On Success or On Error selections are set to JMP to Stage, Automatically create the SG box for any NEW stage number will be enabled which will automatically create any target stage that does not already exist.
|
|
Status Display
The red triangle in the upper left corner of the status display indicates this is a Fully Asynchronous instruction.
Execution Mode shows the current mode of the Axis (see a list of the possible execution mode values).
Execution Mode / CurrentPosition / CurrentVelocity / MstSlvCoordError are the current values of these numeric fields from Axis' associated structure.
MasterEnable / Active / Suspend / Fault / EnableOutput are the current state of these Bit values from that Axis' associated structure.
A detailed description of the Numeric and Bit fields is available in AXCONFIG - Axis Configuration.
|
|
See Also
AXSETPROP - Axis Set Properties
AXRSTFAULT - Reset Axis Limit Fault
AXSCRIPT - Run a Sequence of Axis Commands AXHOME - Axis Perform Home Search
AXPOSTRAP - Axis Move to Position Using Trapezoid
AXPOSSCRV - Axis Move to Position Using S-Curve
AXVEL - Axis Set Velocity Mode
AXGEAR - Axis Electronic Gearing
AXFOLLOW - Axis Position Following with Offset
AXCAM - Axis Electronic Camming
|
|
Related Topics
|
|
Example
|
|