User's Manual
PMAC2 User Manual
80 PMAC2 General Purpose I/O Use
M28->Y:$C081,4 ; I/O28 Data Line; J3 Pin 29
M29->Y:$C081,5 ; I/O29 Data Line; J3 Pin 30
M30->Y:$C081,6 ; I/O30 Data Line; J3 Pin 31
M31->Y:$C081,7 ; I/O31 Data Line; J3 Pin 32
Direction Control
The direction control bit for each of these I/O bits is in the corresponding bit in the matching X register.
For example, the direction control bit for I/O03 is located at X:$C080,3; the direction control bit for
I/O30 is located at X:$C081,6. Because the buffer ICs can only be switched by byte, it is best to define 8-
bit M-variables for the direction control. Suggested definitions are:
M32->X:$C080,0,8 ; Direction control for I/O00 to I/O07
M34->X:$C080,8,8 ; Direction control for I/O08 to I/O15
M36->X:$C080,16,8 ; Direction control for I/O16 to I/O23
M38->X:$C081,0,8 ; Direction control for I/O24 to I/O31
These M-variables should take values of 0 or 255 ($FF) only; 0 sets the byte to input, 255 sets the byte to
output.
In addition, the bidirectional buffer IC for each byte has a direction control line accessible as a software
control bit. These control lines and bits must match the ASIC direction bits. The buffer direction control
bits are at PMAC address Y:$E800, with bits 0 to 3 controlling the four bytes of the JIO port. A bit value
of 0 specifies input; 1 specifies output. Suggested M-variable definitions are:
M33->Y:$E800,0 ; Buffer direction control for I/O00 to I/O07
M35->Y:$E800,1 ; Buffer direction control for I/O08 to I/O15
M37->Y:$E800,2 ; Buffer direction control for I/O16 to I/O23
M39->Y:$E800,3 ; Buffer direction control for I/O24 to I/O31
In the default configuration automatically set at power-up/reset, I/O00 to I/O31 are set up as inputs (M32
through M39 = 0). This is done for maximum safety; no lines can be forced into an undesirable high or
low state. Any of these lines that are to be used as outputs must be changed to outputs by user programs
(usually this is done in PLC 1 acting as a reset PLC, scanning through once on power-up/reset, then
disabling itself).
Inversion Control
Each line on the JIO port is individually controllable as to whether it is an inverting I/O point (0=+5V;
1=0V) or a non-inverting I/O point (0=0V; 1=+5V). Registers X:$C084 and X:$C085 contain the
inversion control bits:
X:$C084 bits 0 to 23 control I/O00 to I/O23, respectively
X:$C085 bits 0 to 7 control I/O24 to I/O31, respectively
A value of 0 in the control bit sets the corresponding I/O point as non-inverting. A value of 1 in the
control bits sets the corresponding I/O point as inverting. At power-up/reset, PMAC automatically sets
all of the I/O points on the JIO port as non-inverting.
Alternate Uses
Each general-purpose I/O point on the JIO port has an alternate use as a supplemental fixed-use I/O point
on a supplemental machine interface channel (1* or 2*). The points are individually controllable as to
general-purpose use or fixed use by control registers Y:$C084 and Y:$C085. Refer to these registers in
the memory-I/O map to see the alternate uses of each point. At power-up/reset, PMAC2 sets up all of the
I/O points on the port for general purpose use automatically.
Note:
The direction-control of the buffer ICs must be set properly for the alternate uses
of the I/O points, just as for the general-purpose I/O uses.