206
Gemini GV6K/GT6K Command Reference
[ NMCY ]
Master Cycle Number
Type
Following; Assignment or Comparison
Syntax
See
below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
FMCLEN, FMCNEW, FMCP, [ FS ], [ PMAS ], TFS, TNMCY, TRGFN
Product Rev
GT6K 6.0
GV6K 6.0
The
NMCY
command is used to assign the current master cycle number to a numeric variable, or to make a
comparison against another value. The master must be assigned first (
FOLMAS
command) before this
command will be useful. For a complete discussion of master cycles, refer to the Following chapter in the
Programmer's Guide.
The value represents the current cycle number, not the position of the master (or the follower). The master
cycle number is set to zero when master cycle counting is restarted, and is incremented each time a master
cycle finishes (i.e., rollover occurs). It will often correspond to the number of complete parts in a
production run. This value may be used for subsequent decision making, or simply recording the cycle
number corresponding to some other event.
Syntax:
VARn=NMCY
where “
n
” is the variable number, or
NMCY
can be used in an expression such as
IF(NMCY>=5)
.
Example:
IF(NMCY>500)
; If the master has moved through 500 cycles ...
WRITE"500 cycles have occurred" ; Send string to serial port
NIF
; End of IF statement
VAR12=NMCY
; Set VAR12 to equal the number of cycles that have occurred on
; the master
[ NOT ]
Not
Type
Operator (Logical)
Syntax
See below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
[ AND ], IF, NWHILE, [ OR ], REPEAT, UNTIL, WAIT, WHILE
Product Rev
GT6K 6.0
GV6K 6.0
The
NOT
operator is used in conjunction with the program flow control commands (
IF
,
REPEAT
..
UNTIL
,
WHILE..NWHILE
,
WAIT
). The
NOT
operator complements a logical expression. If an expression is true, the
NOT
operator will make the expression false. If an expression is false, the
NOT
operator will make the
expression true. This is illustrated by the following examples:
If variable #1 equals 1, then the following is a true statement:
IF(VAR1<3)
By using the
NOT
operator, the same statement becomes false:
IF
(NOT
VAR1<3)
If variable #2 equals 2, then the following statement is false:
WHILE(VAR2=3)
By using the NOT operator, the same statement becomes true:
WHILE
(NOT
VAR2=3)
To evaluate an expression (
NOT
Expression) to determine if the expression is true, use the following rule:
NOT TRUE = FALSE
NOT FALSE = TRUE
In the following example, variable #1 is displayed, then is incremented by 1 as long as
VAR1
is not equal to 10.
Example:
VAR1=1
; Set variable 1 equal to 1
WHILE(NOT VAR1=10) ; Compare variable 1 to 10, and logically not the expression
WRVAR1
; Write out variable 1
VAR1=VAR1 + 1
; Set variable 1 to increment 1 by 1
NWHILE
; End WHILE 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...