Hardware Reference Manual
Software Setup
19
General-Purpose Digital Inputs and Outputs
If one Acc-1P is present on the PMAC2A PC/104 stack configuration then its jumpers E5 and E6 should
be set at the default position 1-2. In this case, the lines on its J7 general-purpose I/O connector will be
mapped into PMAC’s address space in register Y:$C080. Jumpers E5 and E6 should be configured on
position 2-3 only when two Acc-1Ps are used. In this case, the I/O lines can be accessed at address
Y:$C0C0.
If no Acc-1P is present on the PMAC2A PC/104 stack configuration, and only Acc-2P is used, then
jumper E5 on the Acc-2P board should connect pins 1 and 2. In this case the lines on its JOPT general-
purpose I/O connector will be mapped into PMAC's address space in register Y:$C080.
If both Acc-1P and Acc-2P are used, then jumper E5 on the Acc-2P board should connect pins 2 and 3
and its I/O lines can be accessed at address Y:$C0C0.
Typically, these I/O lines are accessed individually with M-variables. Following is a suggested set of M-
variable definitions to use these data lines.
Jumper E6 on Position 1-2
M0->Y:$C080,0
; Digital Output M00
M1->Y:$C080,1
; Digital Output M01
M2->Y:$C080,2
; Digital Output M02
M3->Y:$C080,3
; Digital Output M03
M4->Y:$C080,4
; Digital Output M04
M5->Y:$C080,5
; Digital Output M05
M6->Y:$C080,6
; Digital Output M06
M7->Y:$C080,7
; Digital Output M07
M8->Y:$C080,8
; Digital Input MI0
M9->Y:$C080,9
; Digital Input MI1
M10->Y:$C080,10
; Digital Input MI2
M11->Y:$C080,11
; Digital Input MI3
M12->Y:$C080,12
; Digital Input MI4
M13->Y:$C080,13
; Digital Input MI5
M14->Y:$C080,14
; Digital Input MI6
M15->Y:$C080,15
; Digital Input MI7
M32->X:$C080,0,8
; Direction Control bits 0-7 (1=output, 0 = input)
M34->X:$C080,8,8
; Direction Control bits 8-15 (1=output, 0 = input)
M40->X:$C084,0,24
; Inversion control (0 = 0V, 1 = 5V)
M42->Y:$C084,0,24
; J7 port data type control (1 = I/O)
In order to properly setup the digital outputs an initialization PLC must be written scanning through once
on power-up/reset, then disabling itself:
OPEN PLC1 CLEAR
M32=$FF
;BITS 0-8 are assigned as output
M34=$0
;BITS 9-16 are assigned as input
M40=$FF00
;Define as inputs and outputs
M42=$FFFF
;All lines are I/O type
DIS PLC1
;Disable PLC1 (scanning through once on
;power-up/reset)
CLOSE
Note:
After loading this program, set I5=2 or 3 and ENABLE PLC 1.
Jumper E5 in Position 2-3
M0->Y:$C0C0,0
; Digital Output M00
M1->Y:$C0C0,1
; Digital Output M01
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com