![Galil Motion Control RIO-47 series
RIO-47100 User Manual Download Page 72](http://html1.mh-extra.com/html/galil-motion-control/rio-47-series-rio-47100/rio-47-series-rio-47100_user-manual_558776072.webp)
Operand
Function
_BN
*Returns serial # of the board.
_DA
*Returns the number of arrays available
_DL
*Returns the number of available labels for programming
_DM
*Returns the available array memory
_UL
*Returns the number of available variables
TIME
Free-Running Real Time Clock (Resets with power-on).
Note: TIME does not use an underscore character (_) as other keywords.
*:
All these keywords have corresponding commands except for TIME.
Examples of Keywords:
V1=_DA
Assign V1 the number of available array names
V3=TIME
Assign V3 the current value of the time clock
Arrays
For storing and collecting numerical data, the RIO-47xx0 provides array space for 400 elements. This
number is increased to 1000 array elements on the RIO-47xx2. The arrays are one-dimensional, and
up to 6 different arrays may be defined. Each array element has a numeric range of 4 bytes of integer
(2
31
) followed by two bytes of fraction (+/-2,147,483,647.9999). Arrays can be used to capture
real-time data, such as the bit status of a particular I/O bank.
Defining Arrays
An array is defined with the command DM. The user must specify a name and the number of entries
to be held in the array. An array name can contain up to eight characters, starting with an uppercase
alphabetic character. The number of entries in the defined array is enclosed in [ ].
Example:
DM IOSTAT[100]
Defines an array names IOSTAT with 100 entries
DA *[]
Frees array space using Deallocate command
Assignment of Array Entries
Like variables, each array element can be assigned a value. Assigned values can be numbers or
returned values from instructions, functions and keywords.
Array elements are addressed starting at count 0. For example, the first element in the OUTPUT array
(defined with the DM command, DM OUTPUT[7]) would be specified as OUTPUT[0].
Values are assigned to array entries using the equal sign. Assignments are made one element at a
time by specifying the element number with the associated array name.
NOTE: Arrays must be defined using the command, DM, before assigning entry values.
Examples:
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.
Chapter 5 Programming ▫ 72 RIO-47xxx Rev. 1.0r