Reference Manual

PMAC 2 Software Reference
260 PMAC On-Line Command Specification
input or output word. Adding 1 to the {multiplex address} designates it as a
read-only variable and adding 2 designates it as a write-only variable.
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
point to a 32-bit word of input or output serially multiplexed on the “thumbwheel” port on an
Accessory 34x board.
Note:
The individual bits of the thumbwheel port on an Accessory 34x board
can not be directly assigned to an M-variable. Only 32-bit words
(ports) of input or output can be accessed.
The address on the multiplex port specified here must match the address set by the DIP
switch on board the ACC-34x. The ACC-34x manual contains a table listing all of the
possibilities.
The entire word must either be all input or all output. On power-up/reset, all ACC-34x words
are software-configured as inputs (if the hardware is configured for outputs, all outputs will
be OFF – pulled up to the supply voltage). Any subsequent write operation to an I/O word
on the port with one of these M-variables automatically makes the entire word an output
word, with individual bits ON or OFF, as determined by the value written to the word.
Any subsequent read operation of a word that has been set up for output configures, or tries
to configure, the entire word into an input word, which turns any hardware outputs OFF.
Therefore, it is important that the following rules be observed when working with these M-
variables:
Never use this M-variable form to write to a word that is set up for inputs.
Never use this M-variable form to read from a word that is set up for outputs.
Because both reads and writes are enabled when a TWS type M-variable is used to point
directly to the base address of an accessory 34x port (e.g. M300->TWS:40) their use is very
strongly discouraged. Reads and writes are enabled when the least significant and the next
least significant addresses bits are both zero (e.g. decimal 40 = 01000000 in binary).
In this situation, any accidental read of an output port (say via the Executive programs watch
window) will cause all the output transistors to be turned off (outputs pulled to the supply
voltage)! Alternatively, writing to an input port, will automatically reconfigure it to an output
port! It is therefore safer and more predictable when bits 0 & 1 of the M-variable definition
are intentionally used to disable either the read function or the write function. Setting one of
these bits gives the read-only or write-only form of the TWS M-variable.
An M-variable pointing to an input port is defined as read-only by setting the {multiplex
address} to a legal byte number (from column 2 of Table 1 of the Acc 34x manual) plus 1.
Any attempt to write to a TWS type M-variable defined in this manner (with bit zero of its
address set to 1) is automatically prevented by PMAC firmware. For an output port, the
{multiplex address} should be a legal byte number (from column 2 of Table 1 of the