Reference Manual

Turbo PMAC/PMAC2 Software Reference
Turbo PMAC On-line Command Specification 360
Example:
For an Acc-34x board with base address 0 on the multiplexer port (all DIP switches ON): the the M-
variable for the input port would be:
M80->TWS:1 ;Input port at {base+1}
The definition for the output port would be:
M81->TWS:6 ;Output port at {base+6}
See Also:
M-Variables (Computational Features)
On-line commands M{constant}, M{constant}->,
M{constant}->TWR:{address}
Serial I/O Multiplexer Board (Acc-34x) Manuals
M{constant}->X/Y:{address}
Function: Short Word M-Variable Definition
Scope: Global
Syntax: M{constant}[..{constant}]->
X[:]{address},{offset}[,{width}[,{format}]]
M{constant}[..{constant}]->
Y[:]{address},{offset}[,{width}[,{format}]]
where:
{constant} is an integer from 0 to 8191 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 $000000 to $FFFFFF (0 to 16,777,215 if specified in
decimal).
{offset} is an integer constant from 0 to 23, representing the starting (least significant) bit of the
word to be used in the M-variables, or 24 to specify the use of all 24 bits;
{width} (optional) is an integer constant from the set {1, 4, 8, 12, 16, 20, 24}, representing the
number of bits from the word to be used in the M-variables; if {width} is not specified, a value of 1
is assumed;
{format} (optional) is a letter from the set [U, S, D, C], specifying how Turbo PMAC is to
interpret this value: (U=Unsigned integer, S=Signed integer, D=Binary-coded Decimal,
C=Complementary binary-coded decimal); if {format} is not specified, U is assumed.
This command causes Turbo PMAC to define the specified M-variable or range of M-variables to point to
a location in one of the two halves (X or Y) of Turbo PMAC’s data memory. In this form, the variable
can have a width of 1 to 24 bits and can be decoded several different ways, so the bit offset, bit width, and
decoding format must be specified (the bit width and decoding format do have defaults.
The definition consists of the letter X or Y, an optional colon (:), the word address, the starting bit
number (offset), an optional bit width number, and an option format-specifying letter.
Legal values for bit width and bit offset are inter-related. The table below shows the possible values of
{width}, and the corresponding legal values of {offset} for each setting of {width}.
{width} {offset}
1 0 -- 23
4 0,4,8,12,16,20
8 0,4,8,12,16
12 0,4,8,12
16 0,4,8
20 0,4
24 0