Command Descriptions
229
COMPILED MOTION
When using compiled loops (
PLOOP
and
PLN
), the last segment within the loop must end at zero velocity
or there must be a final
GOBUF
segment placed outside the loop. Otherwise an error will result when the
profile is compiled. The error is “
ERROR: MOTION ENDS IN NON-ZERO VELOCITY
”.
PLC PROGRAM EXAMPLE
: see
PLCP
command description.
COMPILED MOTION EXAMPLE
(see profile below)
DEF prog2
; Begin definition of program named prog2
A10
; Set A, V, and D values
V2
D2000
GOBUF1
; First segment of motion
V4
; New A, V, and D values
AD50
D1000
GOBUF1
; Second segment
END
; End definition of prog2
PCOMP prog2
; Compile prog2
PRUN prog2
; Execute prog2
1000
2000
3000
4
2
velocity
distance
[ PE ]
Position of Encoder
Type
Assignment or Comparison
Syntax
See below
Units
Encoder counts, or scaled by SCLD
Range
n/a
Default
n/a
Response
n/a
See Also
ENCCNT, [ FB ], GOWHEN, INFNC, [ PC ], [ PCE ], [ PER ],
PESET, PSET, SCALE, SCLD, SFB, TFB, TPE
Product Rev
GT6K 6.0
GV6K 6.0
The
PE
operator is used to assign one of the encoder register values to a variable, or to make a comparison
against another value.
Stepper axes: If the
ENCCNT1
mode is enabled
PE
reports the encoder position, but in
ENCCNT0
mode (the
factory default setting) the
PE
report represents the commanded position.
NOTE
: When operating in
ENCCNT1
mode, the
PE
value is always encoder counts and is never scaled by
SCLD
.
UNITS OF MEASURE
and
SCALING
: refer to page
16
or to the
SCLD
command.
If you issue a
PSET
command, the encoder position value will be offset by the
PSET
command value. If you
are using a stepper axis in the
ENCCNT1
mode, use the
PESET
command instead.
Syntax:
VARn=PE
where “
n
” is the variable number, or
PE
can be used in an expression such as
IF(PE>2345Ø)
.
Example:
VAR1=PE
; Encoder position is assigned to variable 1
IF(PE<4000)
; If the encoder position is less than 4000,
; do the IF statement
VAR2=PE+4000
; Encoder position plus 4000 is assigned
; to variable 2
www.comoso.com
Содержание Gemini GV6K
Страница 24: ...www comoso com...
Страница 40: ...www comoso com...
Страница 344: ...www comoso com...
Страница 350: ...www comoso com...