![Galil Motion Control RIO-47120 User Manual Download Page 72](http://html1.mh-extra.com/html/galil-motion-control/rio-47120/rio-47120_user-manual_3280393072.webp)
Special Operands (Keywords)
The RIO provides a few additional operands that give access to internal variables that are not accessible by
standard RIO commands.
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:
66 Chapter 5 Programming
RIO-47xxx