Description of SMOVE instruction codes
(Original Document)
At a Glance
Three classes of movement can be programmed:
To find out about the execution conditions for instructions, see Diagnostics and maintenance.
Continuous movements to a position
Example of a continuous movement to a position: instruction code 01.
NOTE: If the instruction 01 is not followed by any movement instruction, the moving part continues the movement until it reaches the soft stops (after passing the position to be reached, the CMV (Speed Modulation Coefficient) is no longer interpreted).
Movements to a position with stop
Example of a movement to a position with stop: instruction code 09.
Continuous movement until an event
Example of a continuous movement until an event: instruction code 11.
NOTE: The event can be a rising or falling edge on the dedicated event cam input, or a rising edge on the EXT_EVT bit (%Qr.m.c.11) by program.
It is essential that the position parameter be defined. If the event is not detected, the instruction is terminated when the requested target position is reached.
These instructions 11 and 12 can activate the event task when the event is detected if M is equal to 16#1000.
Movement until an event with stop
Example of a movement until an event with stop: instruction code 10.
Reference point
Example of setting a reference point: instruction code 14. Reference point configured towards short cam in the + direction. At the start, the moving part moves away from the cam.
NOTE: This instruction triggers a reference point sequence according to the selection made in configuration. The value provided in the X parameter corresponds to the coordinate to be loaded with the current value when the reference point is detected.
Example of setting a reference point: instruction code 14. Reference point configured towards long cam in the + direction. At the start, the moving part moves towards the cam.
NOTE: This command is only accepted if the moving part is at rest: NO_MOTION bit = 1 (%Ir.m.c.7).
Forced reference point
This command performs a forced reference point (without movement of the part), the instruction code is 62. The current value of the reference point is forced to the value entered in the position parameter X.
Example: SMOVE (Axis_ch0,1, 90, 62, 100000, 100, 0).
When this instruction is executed, the position of the moving part is forced to 100000.
NOTE: Regardless of the status of the axis, referenced or not, this command is accepted and it has the action of referencing the axis when the execution is completed. This command is only accepted if the moving part is at rest, NO_MOTION bit = 1 (%Ir.m.c.7).
Await event
This command, instruction code 05, makes the channel wait for an event which can be:
In the context of this instruction, the F parameter specifies the time envelope with a resolution of 10 ms. If the event is not triggered at the end of the time envelope, the command is deactivated. If F = 0, the wait carries on indefinitely.
Example: SMOVE (Axis_ch0,1, 90, 05, 500, 100, 0).
It is possible to associate event processing, to do that you must program M to 16#1000.
NOTE: When executing this instruction, the T_SPEED object (%MDr.m.c.10) does not contain the parameter F for the wait time. On the other hand, it is advised to systematically associate an event process to this command as the bit TO_G05 (%Ir.m.c.39), which allows the application to distinguish whether the command is terminated by detecting an event or by the time-out of the time envelope, is only refreshed if this process is activated.
Storage of the current position on event.
After the execution of this instruction, code 07, when the trigger input is entered the event defined in configuration is produced and the current position is stored in the PREF register.
NOTE: The parameter of position X must be equal to 1.
Example: SMOVE (Axis_ch0,1, 90, 07, 1, 0, 0).
Descriptive table for storing the current position on event.
Type of event on event input
Timing diagram
Configuration selection
NOTE: This instruction is not blocking, the program carries on straightaway to the next instruction. The stored value of the current position can be accessed in the PREF register (%IWr.m.c.7) only if activation of event processing is requested (M=16#10000).
NOTE: When this instruction is carried out, the object T_XPOS (%MDr.m.c.8) does not contain the parameter X=1.