Command Descriptions
225
[ PCE ]
Position of Captured Encoder
Type
Assignment
or
Comparison
Syntax
See
below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
ENCCNT, INFNC, [ PCMS ], [ PE ], PSET, SCALE, SCLD, SFB, TPCE,
[ TRIG ], TRGLOT, TTRIG
Product Rev
GT6K 6.0
GV6K 6.0
Use the
PCE
operator to assign the captured encoder position to a variable, or to make a comparison against
another value.
Syntax
:
VARn=PCEc
where “
n
” is the variable number, and “
c
” designates trigger
A
or
B
, or
M
for the
MASTER TRIG
input; or
PCE
can be used in an expression such as
IF(PCEB>2345Ø)
.
Inputs on the
DRIVE I/O
connector:
Input # Pin #
GT6K & GV6K Function (
INFNC
default
)
1
37
INFNC1-A
(General-purpose. If assigned, TRG-A must be on Input #1)
2
38
INFNC2-A
(General-purpose. If assigned, TRG-B must be on Input #2)
3
39
INFNC3-A
(General-purpose)
4
34
INFNC4-A
(General-purpose)
5
35
INFNC5-A
(General-purpose. If assigned, MASTER TRIGGER must
be on Input #5)
About Position Capture
: The encoder position can be captured only by an input that is defined as a
“trigger interrupt” input with the
INFNCi-H
command (see
INFNC
command). When a “trigger interrupt”
input is activated, the encoder position is captured and the position is available through the use of the
PCE
operator and the
TPCE
display command.
Stepper Axes
: By default, stepper axes capture only the
commanded position. To capture the encoder position, the axis must be in the Encoder Capture Mode (see
ENCCNT
command).
Position Capture Status, Longevity of Captured Position
: Use the
TTRIG
and
TRIG
commands to
ascertain if a trigger interrupt input has been activated.
TTRIG
displays the status as a binary report, and
TRIG
is an assignment/comparison operator for using the status information in a conditional expression
(e.g., in an
IF
statement). Once the captured encoder position value is assigned/compared with the
PCE
operator, the
TTRIG
/
TRIG
status bit for that trigger input is cleared; but the position information remains
available until it is overwritten by a subsequent position capture from the same trigger input.
Position Capture Accuracy
: The encoder position capture accuracy is ±1 encoder count.
Scaling and Position Offset
: If scaling is enabled (
SCALE1
), the encoder position is scaled by the distance
scaling factor (
SCLD
). If scaling is not enabled (
SCALEØ
), the value assigned will be actual encoder counts.
(
NOTE
: When using a stepper axis operating in
ENCCNT1
mode, the
PCE
value is always encoder counts
and is never scaled by
SCLD
.) If you issue a
PSET
(establish absolute position reference) command, any
previously captured encoder positions will be offset by the
PSET
command value.
Example:
INFNC1-H
; Assign trigger input TRIG-A as trigger interrupt input
VAR1=PCEA
; Assign captured encoder position to variable 1
; (position was captured when trigger input TRIG-A became active)
IF(PCEA<4000)
; If the captured encoder position is less than 4000,
; do the IF statement
VAR2=PCEA+10
; Add 10 to the captured encoder position
; (captured when trigger input TRIG-A became active) and
; assign the sum to variable #2
NIF
; End IF statement
www.comoso.com
Summary of Contents for Gemini GV6K
Page 24: ...www comoso com...
Page 40: ...www comoso com...
Page 344: ...www comoso com...
Page 350: ...www comoso com...