Reference Manual

PMAC 2 Software Reference
254 PMAC On-Line Command Specification
the optional second{constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
Note:
Spaces are not permitted between the M-variable name and the arrow
double character in this command.
Remarks
This command causes PMAC to reference the specified M-variable or range of M-variables
to its own definition word. If you just wish to use an M-variable as a flag, status bit, counter,
or other simple variable, there is no need to find an open area of memory, because it is
possible to use some of the definition space to hold the value. Simply define this form of the
M-variable and you can use this M-variable much as you would a P-variable, except it only
takes integer values in the range -1,048,576 to +1,048,575 (-2
20
to +2
20
-1).
When the definition is made, the value is automatically set to 0.
This command is also useful to “erase” an existing M-variable definition.
Example
M100->*
M20..39->*
M0..1023->*. ; This erases all existing M-variable definitions
........................... ; It is a good idea to use this before loading new ones
See Also
M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
M{constant}->{definition}, M{constant}={expression}
Program command M{constant}={expression}
M{constant}->D:{address}
Function
Long Fixed-Point M-Variable Definition
Scope
Global
Syntax
M{constant}[..{constant}]->D[:]{address}
where:
{constant} is an integer from 0 to 1023 representing the number of the M-variable;
the optional second {constant} must be at least as great as the first {constant} – it
represents the number of the end of the range;
{address} is an integer constant from 0 to 65,535 ($0 to $FFFF if specified in hex).
Note:
No spaces are permitted between the M-variable name and the arrow
double character in this command.
Remarks
This command causes PMAC to define the specified M-variable or range of M-variables to a
48-bit double word (both X and Y memory; X more significant) at the specified location in
PMAC’s address space. The data is interpreted as a fixed-point signed (two’s complement)
integer.
The definition consists of the letter D, an optional colon (:), and the word address.
Memory locations for which this format is useful are labeled with D: in the memory map.
Example
M161->D:$0028 ; Motor 1 desired position register specified in hex