150
Gemini GV6K/GT6K Command Reference
GOWHEN
in Compiled Motion: When used in a compiled program, a
GOWHEN
will pause the profile in
progress (motion continues at constant velocity) until the
GOWHEN
condition evaluates true. When
executing a compiled Following profile, the
GOWHEN
is ignored on the reverse Following path (i.e.,
when the master is moving in the opposite direction of that which is specified in the
FOLMAS
command). A compiled
GOWHEN
may require up to 4 segments of compiled memory storage.
Example:
In the example below, the axis must start motion when input 3 becomes active. While input 3 is off, the
program must be monitoring inputs and serving other system requirements, so a
WAIT
statement cannot be
used; instead, a
GOWHEN
and
GO
sequence will delay the profile of the axis.
SCALE1
; Enable scaling
SCLV25000
; Set velocity scaling factor
SCLD10000
; Set distance scaling factor
DEL proga
; Delete program called proga
DEF proga
; Begin definition of program called proga
MC0
; Set to preset move mode
D20
; Set distance end-point
COMEXC1
; Enable continuous command execution mode
V1
; Set velocity
A100
; Set acceleration
GOWHEN(IN.3=B1)
; Delay profile. When the expression is true
; (input 3 is active), allow the axis to start motion
GO1
; Command axis to move. Axis will not start until
; conditions in the GOWHEN statement are true.
; Command processing does not wait, so other system
; functions may be performed.
END
; End definition of program
HALT
Terminate Program Execution
Type
Program Flow Control
Syntax
<!>HALT
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
BP, BREAK, C, ELSE, IF, K, NIF, NWHILE, PS, REPEAT, S, T,
UNTIL, WAIT, WHILE
Product Rev
GT6K 6.0
GV6K 6.0
The
HALT
command terminates program execution when processed. This command allows the user to
terminate command processing at any point in a program. The programmer may want processing to stop
because of an error condition, an input, a variable, or just after a specific motion has been accomplished.
This command is useful when debugging a program.
Example:
DEF prog1
; Define a program called prog1
GO1
; Initiate motion
GOSUB prog2
; Gosub to subroutine named prog2
GO1
; Initiate motion again
END
; End program definition
DEF prog2
; Define a program called prog2
GO1
; Initiate motion
IF(IN=b1X0)
; If onboard input 1 is active (1), and input 3 is inactive (0)
HALT
; If condition is true break out of program
ELSE
; Else part of if condition
TPE
; If condition does not come true transfer position of the encoder
NIF
; End If statement
END
; End program definition
RUN prog1
; Execute program prog2
;
; Upon completion of motion, subroutine prog2 is called.
; If inputs 1 and 3 are in the correct state after the motion is complete,
; program processing will be terminated. In other words, all commands waiting
; to be parsed in the program buffer will be eliminated.
; **** Note: There will not be a return to prog1.
www.comoso.com
Содержание Gemini GV6K
Страница 24: ...www comoso com...
Страница 40: ...www comoso com...
Страница 344: ...www comoso com...
Страница 350: ...www comoso com...