Set Position
Original instructions
Description
Contrary to the other motion functions, this function does not impact the physical pulse outputs of the channel, and does not generate any motion profiles.
Like the homing function, it defines an origin and a reference position of the axis by assigning an absolute coordinate to the current position of the axis and setting to 1 the channel "REFERENCED" status bit.
This function can only be used when the axis is in STANDSTILL state.
Physical Inputs/Output
Input/Output
Description
Counter_Clear output
To be connected to the corresponding input of the drive.
When the Counter_Clear output is enabled, the Set Position function also orders the drive to reset its internal counter.
Configuration Parameters
Parameter
Valid Values
Homing I/O Settings
Value 0: No I/O used (Default)
Value 1: With Counter_Clear Output
Value 2: With Counter_in_Position Input: not used with SetPosition command.
Representation in FBD
Representation:
Representation in LD
Representation:
WARNING
UNINTENDED APPLICATION BEHAVIOR-COMMAND SENT ON EACH PLC CYCLE
Commands will be sent on every PLC cycle if EN is set to 1.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Representation in IL
Representation:
(*BYTE*) := SETPOSITION (CH := (*ANY_IODDT*), POSITION := (*DINT*));
Representation in ST
Representation:
SETPOSITION (CH := (*ANY_IODDT*), POSITION := (*DINT*)) ST (*BYTE*)
Command example using the WRITE_CMD command mechanism in ST representation:
if (SetPos = True) then  %CH0.1.0.CMD_CODE := 6;  %CH0.1.0.TGT_POSITION := 50000; WRITE_CMD(%CH0.1.0); SetPos := False; end_if;
Command Specific Parameters
Parameter
Valid Values
Position (in Pulses)
- 2,147,483,648 to 2,147,483,647 (Enclosed between SW Low Limit and SW High Limit)