5 define position – Yaskawa MotionWorks+ Windows Software User Manual
Page 144
Block Reference
MotionWorks+™
138
3.2.5
DEFINE POSITION
Definition
This block sets the current encoder location as the value specified in the Position
property. It does not cause motion. Select either the main or external encoder. This
block may take as long as the Low Scan Program time to complete and advance the
program counter, even if the block is in a High Scan Program. This block automatically
waits until the encoder value has been changed.
Note: It is not recommended to include the DEFINE POSITION block in a program loop
that repeatedly defines the position, because a small, cumulative position error will
result. The motor may move a slight amount between the time that the DEFINE
POSITON block runs and the hardware counter is changed.
Properties
Encoder:
Select “Main” for the SGDH encoder, or “External” for a device
connected to the encoder input on the I/O connector of the
MP940. See the MP940 Machine Controller Hardware Manual
for details about external encoders.
Position:
A number or variable in user units representing the new posi-
tion.
Required Conditions
The selected encoder must not be moving when this block is executed.
Additional Information
The virtual encoder will be defined along with the real encoder when External is
selected.
Property
Default
Minimum
Value
Maximum
Value
Base Units
Run
Time
Encoder
main
External
Main
N/A
No
Position
0
-2147483648
2147483647 encoder counts
Yes