![Galil Motion Control RIO-47**0 Скачать руководство пользователя страница 73](http://html1.mh-extra.com/html/galil-motion-control/rio-47-0/rio-47-0_user-manual_558777073.webp)
DM OUTPUT[10]
Dimension Output Array
OUTPUT[1]=3
Assigns the second element of the array, OUTPUT, the value of
3.
OUTPUT[1]=
Returns array element value
OUTPUT[9]=_TI0 Assigns
the
10th element of the array, OUTPUT, the value for
bank 0 digital inputs
data [2]=@COS[POS]*2
Assigns the third element of the array “data” the cosine of the
variable POS multiplied by 2.
TIMER[1]=TIME
Assigns the second element of the array timer the returned value
of the TIME keyword.
Using a Variable to Address Array Elements
An array element number can also be a variable. This allows array entries to be assigned sequentially using a
counter.
For example:
Instruction
Interpretation
#A Begin
Program
COUNT=0;DM POS[10]
Initialize counter and define array
#LOOP Begin
loop
WT 10
Wait 10 msec
INPUT[COUNT]=_TI0
Record bank 0’s input bit value into array element
INPUT[COUNT]=
Report input bit value
COUNT=COUNT+1 Increment
counter
JP #LOOP,COUNT<10
Loop until 10 elements have been stored
EN End
Program
The above example records 10 input bit values for bank 0 at a rate of one value per 10 msec. The values are
stored in an array named INPUT. The variable, COUNT, is used to increment the array element counter.
The above example can also be executed with the automatic data capture feature described below.
Uploading and Downloading Arrays to On Board Memory
Arrays may be uploaded and downloaded using the QU and QD commands.
QU
array[],start,end,delim
QD
array[],start,end
where array is an array name such as A[].
Start is the first element of array (default=0)
End is the last element of array (default=last element)
Delim specifies whether the array data is separated by a comma (delim=1) or a carriage return (delim=0).
The file is terminated using <control>Z, <control>Q, <control>D or \.
Automatic Data Capture into Arrays
The RIO provides a special feature for automatic capture of data such as inputs or outputs. Up to four types
of data can be captured and stored in four arrays. The capture rate or time interval may be specified.
Recording can be done as a one-time event or as a circular continuous recording.
RIO-47xxx
Chapter 5 Programming
●
67
Содержание RIO-47**0
Страница 2: ......
Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...
Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...
Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...