Array Size - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 4. Ladder Diagram (LD) Programming
4.8.1

Array Size

Tip:
If the array assigned to input IN of ARRAY_SIZE is passed to a parameterized C block for
processing, also pass the value of output Q to the block. In the C block logic, use the value of output
Q to ensure all array elements are processed without exceeding the end of the array. For a two-
dimensional array, this method works only if all elements are treated identically; for example, all are
initialized to the same value.
Operands
Parameter Description
Array of any data type whose elements
IN
are counted.
If a non-array variable is assigned to IN,
the value of Q is 1.
Q
Number of elements in the array
assigned to input IN.
Example
The two-dimensional array TestArray has its Array Dimension 1 property set to 4 and its Array
Dimension 2 property set to 3. ARRAY_SIZE calculates 4 × 3 and writes the value 12 to the variable
Elements.
140
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Counts the number of elements in the array assigned to input IN and
writes the number to output Q.
In an array of structure variables, the number of structure variables is
written to Q; the elements in the structure variables are not counted.
Allowed Operands
Data flow, I, Q, M, T, S, SA, SB, SC, G, discrete
symbolic, I/O variable
DINT or DWORD variable.
Data flow, I, Q, M, T, G, R, P, L, AI, AQ, W,
symbolic, I/O variable
Optional
No
No
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents