Parker Automation Gemini GV6K Command Reference Manual page 105

Servo drive/controller
Table of Contents

Advertisement

IF(VAR2=1)
; If function key 1 was last pressed, do the IF statement
; (slow velocity)
V3.6
; Set velocity to 3.6 units per second
NIF
; End IF statement
IF(VAR2=2)
; If function key 2 was last pressed, do the IF statement
; (fast velocity)
V6.4
; Set velocity to 6.4 units per second
NIF
; End IF statement
D(VAR1)
; Set distance equal to the current (last entered) RP240 numeric
; data
GO1
; Initiate the move
LN
; End loop
; As the loop is running, the user may enter in a new distance value and/or
; choose between two different preset velocities. The display does not change
; when a function key is pressed.
Multiple Numeric Data Entry (example):
VAR2=0
; Initialize variable #2 (VAR2)
VAR3=99
; Initialize variable #3 (VAR3)
VAR4=10
; Initialize variable #4 (VAR4)
VAR5=25000
; Initialize variable #5 (VAR5)
DCLEAR0
; Clear the entire RP240 display
DPCUR2,0
; Place RP240 cursor on line 2, column 0 (bottom left corner)
DWRITE" ACCEL VEL DIST"
DREADI1
; Enable RP240 data read immediate mode
VAR2=DREADF
; VAR2 will capture function key entries (0 - 6)
L
; Begin loop
IF(VAR2<>0)
; If a new function key is pressed, do the following code:
DCLEAR1
; Clear line one of the RP240 display (top line)
IF(VAR2=1)
; If function key 1 is pressed, do the IF statement
; (input acceleration)
DWRITE"ENTER ACCEL VALUE> " ; Send message to RP240 display starting at location 1,0
VAR3=DREAD
; Set VAR3 equal to the numeric data entered on the RP240's keypad
NIF
; End IF statement
IF(VAR2=2)
; If function key 2 is pressed, do the IF statement (input velocity)
DWRITE"ENTER VEL VALUE> " ; Send message to RP240 display starting at location 1,0
VAR4=DREAD
; Set VAR4 equal to the numeric data entered on the RP240's keypad
NIF
; End IF statement
IF(VAR2=3)
; If function key 3 is pressed, do the IF statement (input distance)
DWRITE"ENTER DIST VALUE> " ; Send message to RP240 display starting at location 1,0
VAR5=DREAD
; Set VAR5 equal to the numeric data entered on the RP240's keypad
NIF
; End IF statement
VAR2=0
; Prohibit repeated execution of this code
VAR2=DREADF
; Re-enable VAR2 to capture new function key entry
NIF
; End IF statement
A(VAR3)
; Set acceleration equal to the numeric value of VAR3
V(VAR4)
; Set velocity equal to the numeric value of VAR4
D(VAR5)
; Set distance equal to the numeric value of VAR5
GO1
; Initiate the move
LN
; End loop
; As the loop is running, the user may select among the three variables he wants
; to enter data into. These three variables correspond with acceleration,
; velocity, and distance. Each time the function key variable changes from 0
; (to 1, 2 or 3), then a new message is displayed and the VARi=DREAD command
; will put the current value of that variable in location 1,30 (upper right hand
; corner of the display). For example, the user can choose
; repeatedly change VAR4 by entering a value on the RP240 numeric keypad and
; pressing the
key. Each time through the loop, the VAR4 data is loaded
ENTER
; into the V command.
; Send message to RP240 display starting at location 2,0
www.comoso.com
VEL
(
F2
) and then
Command Descriptions
103

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gemini gt6k

Table of Contents