Dm (dimension array), General, N is the number of entries from 1 to 8000 – Yaskawa LEGEND-MC User Manual
Page 103: Dm? returns the number of array elements available

93
LEGEND-MC User’s Manual
DM (Dimension Array)
[General]
DESCRIPTION:
The DM command defines a single dimensional array with a name and total elements. The first element of
the defined array starts with element number 0 and the last element is at n-1.
ARGUMENTS: DM c[n]
where
c is a name of up to eight alphanumeric characters, starting with an uppercase alphabetic character.
n is the number of entries from 1 to 8000.
DM? Returns the number of array elements available.
USAGE:
OPERAND USAGE:
_DM contains the available array space. For example, before any arrays have been defined, the operand
_DM will return 8000. If an array of 100 elements is defined, the operand _DM will return 7900.
RELATED COMMANDS:
EXAMPLES:
While Moving
Yes
Default Value
---
In a Program
Yes
Default Format
---
Command Line
Yes
Can be Interrogated
Yes
Used as an Operand
Yes
Distributed Control
No, Local
"DA" Deallocate
Array
DM Pets[5],Dogs[2],Cats[3]
Define dimension of arrays, pets with 5
elements; Dogs with 2 elements; Cats with 3
elements
DM Tests[1000]
Define dimension of array called Tests with
1000 elements