Link Operation with LS_MoveLink
LS_MoveLink is used to synchronize the speed of the master and slave axes using the set gear ratio and synchronization positions. The Master axis must always operate in the forward direction while using LS_MoveLink. RatioNumerator and RatioDenominator set the ratio of the slave’s speed to the master’s speed. If the RatioNumerator value is set to a negative number, the slave will move in the opposite direction of the master.
-
The MasterValueSource input is used to set the synchronization to master commanded or current position.
-
The slave axis will enter SynchronizedMotion state while this function block is executing.
-
MasterSyncPosition and SlaveSyncPosition inputs can be used to control when the gearing starts.
-
MasterStartDistance input starts synchronization at the set distance from the MasterSyncPosition and should be greater than 0.
-
When the gear operation starts and the SlaveEndPosition is reached, the gear operation ends and the main axis moves the distance set in the MasterEndDistance input, while the slave axis performs the release action to reach the SlaveWaitPositon.
-
LS_Connect and MC_Power/MC_PowerAll must be executed before these function blocks can be used.
-
The following examples can be found in the XMC_LSDedicated_FBs.zip downloadable from Example Applications.
Element Name | Element Type | Description |
---|---|---|
Execute | Input | Edge detected request to execute the function block. |
Master | Input/Output | Select the master axis for the gearing operation. This must be a UINT variable with a value of the master axis number. |
Slave | Input/Output | Select the slave axis for the gearing operation. This must be a UINT variable with a value of the slave axis number. |
RatioNumerator | Input | Specify the numerator of the gear ratio. (-2147483648 ~ 2147483647) |
RatioDenominator | Input | Specify the denominator of the gear ratio. (0 ~ 4294967295) |
MasterValueSource | Input |
Select the source of the main axis for gearing operation.
|
MasterStartDistance | Input | Specify the move distance of the main axis where synchronization starts. |
MasterSyncPosition | Input | Specify the position of the master axis to start synchronization. |
MasterEndDistance | Input | Specify the movement distance of the main axis that occurs from the SlaveEndPosition to the SlaveWaitPosition. |
SlaveSynPosition | Input | Specify the position of the master axis to start synchronization. |
SlaveEndPosition | Input | Specify the position of the master axis where the synchronization ends. |
SlaveWaitPosition | Input | Specify the position where the slave axis waits. |
BufferMode | Input | Specify the sequential operation setting. See BufferMode Table. |
Done | Output | Indicates the function block has finished the operation. |
StartSync | Output | Indicates the synchronization is starting. |
InSync | Output | Indicates the gearing operation is running at the specified gear ratio. |
Busy | Output | Indicates the function block is currently being executed. |
Active | Output | Indicates the function block is controlling the slave axis. |
CommandAborted | Output | Indicates the function block was aborted. |
Error | Output | Indicates whether an error occurs or not. |
ErrorID | Output | Error Identification number. |
Sections 6.1.4 and 8.2.10 of the XMC user manual provide more information about buffer modes.
Value | Buffer Mode | Description |
---|---|---|
0 | Aborting | Abort previous command and execute the command immediately. |
1 | Buffered | Execute the command after previous command is completed. |
2 | BlendingLow | The new command is blended into a previously executed command using the lower velocity value when comparing the previous command and new command. |
3 | BlendingPrevious | The new command is blended into a previous command using the velocity of the previous command. |
4 | BlendingNext | The new command is blended into a previous command using the velocity from the new command. |
5 | BlendingHigh | The new command is blended into a previous command using the higher velocity value when comparing the previous command and new command. |
LM800