Parker Automation Gemini GV6K Command Reference Manual page 68

Servo drive/controller
Table of Contents

Advertisement

recall a data program, and not create one, specify only the first integer and not the second integer. For
example,
recalls data program #7 (
DATSIZ7
Example:
DEL DATP5
; Delete existing data program #5 (DATP5)
DATSIZ5,200
; Create data program #5 (DATP5) with 200 data elements
DEF TEACH
; Begin definition of program called TEACH
COMEXC0
; Disable continuous command execution mode
MA1
; Enable the absolute positioning mode
HOM1
; Home (absolute position counter set to zero after homing)
DATPTR5,1,1
; Set data pointer to data element #1 in DATP5, and increment the
; pointer by one element after every DATTCH value or DAT command
REPEAT
; Set up a loop for teaching the positions
JOY1
; Enable joystick mode so that you can start moving the
; axis into position with the joystick. Command processing stops
; here until you activate IN.2 to disable the
; joystick mode and execute the rest of the commands in the
; repeat/until loop (assign the motor positions to the variables and
; then store the positions from the variables to the data program).
VAR1=1PM
; Store the current position in variable #1
DATTCH1
; Store variable #1 into consecutive data elements
WAIT(IN.2=b0)
; Wait for the "joystick release" input to be de-activated
UNTIL(DPTR=1)
; Repeat loop until the data pointer wraps around to data element #1
HOM1
; Home (absolute position counter set to zero after homing)
DATPTR5,1,1
; Set data pointer to data element #1, read one data element at a time
REPEAT
; Set up a repeat/until loop to read all data elements
D(DAT5)
; Read position data from the data program to the distance command
GO1
; Make the move to the positions that were taught
T.2
; Wait 0.2 seconds
UNTIL(DPTR=1)
; Repeat loop until the data pointer wraps around to data element #1
END
; End definition of program called TEACH
DATTCH
Data Teach
Type
Data Storage
Syntax
<a_><!>DATTCHi<,i,i,i>
Units
i = number of a numeric variable
Range
i = 1-225
Default
n/a
Response
n/a
See Also
[ DAT ], [ DATP ],DATPTR, DATSIZ, DATTCH, VAR
The Data Teach (
) command stores the values from the specified numeric variables (
DATTCH
currently active data program (i.e., the data program specified with the last
command). The value that is in the specified variable at the time the
value that is stored in the data program.
If the
command is issued without having first issued the
DATTCH
a zero is entered in the first integer of the
disabled.
As indicated by the number of integers in the syntax, the maximum number of variables that can be stored
in the data program per
DATTCH
current location of the data pointer. The data pointer's position can be moved to any data element in any
data program by use of the
DATPTR
pointer will increment by the number specified in the third integer of the
element in the data program can be edited by setting the data pointer to that element and then issuing the
command.
DATTCH
As an example, suppose data program #1 (
the data pointer is configured to start at the first data element and increment 1 data element after every
value is stored (
DATTCH
DATPTR1,1,1
assigned (
,
,
VAR1=2
VAR2=4
66
Gemini GV6K/GT6K Command Reference
) as the active data program.
DATP7
command (e.g.,
DATSIZ
command is 4. The variables are stored in the data program, starting at the
command. After each successive
) is configured to hold 15 data elements (
DATP1
), and the values of numeric variables #1 through #4 are already
,
). If you then enter the
VAR3=8
VAR4=64
www.comoso.com
Product
GT6K
GV6K
VAR
or
DATSIZ
DATPTR
command is executed is the
DATTCH
command, an error will result. If
DATSIZ
), the
command is
DATSIZØ
DATTCH
value is stored, the data
DATTCH
command. Any data
DATPTR
DATSIZ1,15
command, the
DATTCH1,2,3,4
Rev
6.0
6.0
) into the
),

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gemini gt6k

Table of Contents