Command Descriptions
63
Example:
DEF
DATP5
; Define data program 5
DATA=1,2,3,4
; Enter data
DATA=5.62,6.52,7.12,8.47
; Enter data
END
; End program definition
A(DAT5)
; Load data from data program 5 and store in axis acceleration.
; Axis acceleration = 1
V(DAT5)
; Load data from data program 5 and store in axis velocity.
; Axis velocity = 2
D(DAT5)
; Load data from data program 5 and store in axis distance.
; Axis distance = 3
A(DAT5)
; Load data from data program 5 and store in axis acceleration.
; Axis acceleration = 4
A(DAT5)
; Load data from data program 5 and store in axis acceleration.
; Axis acceleration = 5.62
DATPTR
Set Data Pointer
Type
Data Storage
Syntax
<a_><!>DATPTRi,i,i
Units
n/a
Range
1st i = program # 1 to 50
2nd i = data element # 1 to 6500
3rd i = increment setting of 1 to 100
Default
1,1,1
Response
n/a
See Also
[ DAT ], DATA, [ DATP ], DATSIZ, DATTCH, [ DPTR ], TDPTR
Product Rev
GT6K 6.0
GV6K 6.0
The
DATPTR
command moves the internal data pointer to a specific data element in the specified data
program (
DATPi
). This command also establishes the number of data elements by which the pointer
increments after writing each data element from a
DATTCH
command, or after recalling a data element with
the
DAT
command.
The data program selected with the first integer in the
DATPTR
command becomes the active data program.
Subsequent
DATTCH
,
TDPTR
, and
DPTR
commands will reference the active data program. You can use the
TDPTR
command to ascertain the current active data program, as well as the current location of the data
pointer and the increment setting (see
TDPTR
command description for details).
The
DPTR
command can be used to compare the current pointer location (the number of the data element to
which the data pointer is pointing) against another value or variable, or to assign the pointer location
number to a variable.
As an example, suppose data program #1 (
DATP1
) is configured to hold 15 data elements (
DATSIZ1,15
),
the data pointer is configured to start at the first data element and increment 1 data element after every
DATTCH
value is stored (
DATPTR1,1,1
), and the values of numeric variables #1 through #4 are already
assigned (
VAR1=2
,
VAR2=4
,
VAR3=8
,
VAR4=64
). If you then enter the
DATTCH1,2,3,4
command, the
values of
VAR1
through
VAR4
will be assigned respectively to the first four data elements in the data
program and the pointer will stop at data element #5. The response to the
TPROG
DATP1
command would
be as depicted below (the text is highlighted to illustrate the location of the data pointer after the
DATTCH1,2,3,4
command is executed). The response to the
TDPTR
command would be
*TDPTR1,5,1.
*DATA=2.0,4.0,8.0,64.0
*DATA=
0.0
,0.0,0.0,0.0
*DATA=0.0,0.0,0.0,0.0
*DATA=0.0,0.0,0.0
Once you have stored (taught) the variables to the data program, you can use the
DATPTR
command to
point to the data elements and then use the
DAT
data assignment command to read the stored variables to
your motion program.
During the process of writing data (
DATTCH
) or recalling data (
DAT
), if the pointer reaches the last data
element in the program, it automatically wraps around to the first datum in the program and a warning
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...