User's Manual
PMAC2A PC104 Hardware Reference Manual
Software Setup
22
Using Flag I/O as General-Purpose I/O
Either the user flags or other not assigned axes flag on the base board can be used as general-purpose I/O
for up to 20 inputs and 4 outputs at 5-24Vdc levels. The indicated suggested M-variables definitions,
which are defined in the PMAC2 Software reference, allows accessing each particular line according to
the following table:
Channel Number
Flag Type
#1 #2 #3 #4
HOME
5-24 VDC Input M120 M220 M320 M420
PLIM
5-24 VDC Input M121 M221 M321 M421
MLIM
5-24 VDC Input M122 M222 M322 M422
USER
5-24 VDC Input M115 M215 M315 M415
AENA
5-24 VDC Output M114 M214 M314 M414
Note:
When using these lines as regular I/O points the appropriate setting of the Ix25
variable must be used to enable or disable the safety flags feature.
Analog Inputs Setup
The optional analog-to-digital converter inputs are ordered either through Option-12 on the CPU or Option-
2 on the axes expansion board. Each option provides two 12-bit analog inputs with a ±10Vdc range. The
M-variables associated with these inputs provided a range of values between +2048 and –2048 for the
respective ±10Vdc input range. The following is the software procedure to setup and read these ports.
CPU Analog Inputs
I903 = 1746 ;Set ADC clock frequency at 4.9152 MHz
WX:$C014, $1FFFFF ;Clock strobe set for bipolar inputs
M105->X:$0710,12,12,S ;ADCIN_1 on JMACH1 connector pin 45
M205->X:$0711,12,12,S ;ADCIN_2 on JMACH1 connector pin 46