Command Descriptions
235
PMAS
is unique among position assignment variables, because its value rolls over to zero each time the
entire master cycle length (
FMCLEN
value) has been traveled. If it is desired to
WAIT
or
GOWHEN
on a master
cycle position of the next master cycle, one master cycle length (value of
FMCLEN
) should be added to the
master cycle position specified in the argument. This allows commands that sequence follower events
through a master cycle to be placed in a loop. The
WAIT
or
GOWHEN
command at the top of the loop could
execute, even though the actual master travel had not finished the previous cycle. This is done to allow a
PMAS
value which is equal to the master cycle length to be specified and reliably detected. When using
PMAS
with
IF
,
UNTIL
, or
WHILE
arguments, the instantaneous
PMAS
value is used. Be careful to avoid
specifying
PMAS
values that are nearly equal to the master cycle length (
FMCLEN
), because rollover may
occur before a
PMAS
sample is read.
The master must be assigned first (
FOLMAS
command) before this command will be useful.
If scaling is enabled (
SCALE1
), the
PMAS
value is scaled by the master scaling factor (
SCLMAS
). If scaling is
disabled (
SCALEØ
), the
PMAS
value is in counts.
Syntax:
VARn=PMAS
where “
n
” is the variable number; or
PMAS
can be used in an expression such as
IF(PMAS>2345Ø)
.
Example:
(refer also to
FOLEN
example #2)
IF(PMAS>4.3)
; If the master has traveled more than 4.3 master user units
; then do the IF statement
OUT.2=b1
; Set onboard output #2 to 1
NIF
; End of IF statement
VAR14=PMAS
; Set VAR14 to the master cycle position
[ PME ]
Position of Master Encoder
Type
Assignment or Comparison
Syntax
See below
Units
Master Encoder counts
Range
n/a
Default
n/a
Response
n/a
See Also
MEPOL, MESND, [
PCME
], [
PE
], PMECLR, PMESET, TPCME,
TPME
Product Rev
GT6K 6.0
GV6K 6.0
Use the
PME
operator to assign the current master encoder position to a variable, or to make a comparison
against another value. The master encoder is connected to the connector labeled “Master Encoder”. If you
issue a
PMESET
command, the encoder position value will be offset by the
PMESET
command value. The
PME
value is always in encoder counts, it is never scaled.
Syntax:
VARn=PME
where “
n
” is the variable number, or
PME
can be used in an expression such as
IF(PME>16ØØØ)
.
Example:
VAR1=PME
; Master encoder position is assigned to variable 1
IF(PME<4000)
; If the master encoder count is less than 4000,
; do the IF statement
VAR2=PME+4000
; Master encoder position plus 4000 is assigned to variable 2
NIF
; End IF statement
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...