Examples – Yaskawa LEGEND-MC User Manual
Page 314

304
LEGEND-MC User’s Manual
Examples:
Internal variables can be used in an expression and assigned to a programmable variable, but they cannot
be assigned a value. For example: _KDX=2 is invalid.
The LEGEND-MC also provides a few keywords which give access to internal variables that are not
accessible by standard LEGEND-MC commands.
Examples:
POSX=_TPX
Assigns value from Tell Position X to the variable POSX.
JP #LOOP,_TEX>5
Jump to #LOOP if the position error of X is greater than 5
JP #ERROR,_TC=1
Jump to #ERROR if the error code equals 1.
Keyword
Function
_BGX or _BGY or _BGW
Motion Done if 1. Moving if 0.
_LFX or _LFY or _LFZ or_LFW
Forward Limit (equals 0 or 1)
_LRX or _LRY or _LRZ or LRW
Reverse Limit (equals 0 or 1)
TIME
Free-Running Real Time Clock* (off by 2.4% - Reset
on power-on). NOTE: TIME does not use _.
_HMX or _HMY or _HMZ or HMW
Home Switch (equals 0 or 1)
V1=_LFX
Assign V1 the logical state of the Forward Limit Switch on the X-axis
V3=TIME
Assign V3 the current value of the time clock
V4=_HMW
Assign V4 the logical state of the Home input on the W-axis