Hardware Reference Manual
Software Setup
30
General-Purpose Digital Inputs and Outputs
If one Acc-1P is present then its jumper 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 at base address
Y:$78500. If a second Acc-1P is used then its E6 jumper should be configured 2-3 and its I/O lines can
be accessed at base address Y:$78540.
The inputs and outputs on the thumbwheel port of the Acc-1P boards may only be used as discrete, non-
multiplexed I/O. As in the case of the JOPTO port they are defined according to the setup of the address
selection jumper E6.
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.
JOPTO port first ACC-1P, Jumper E6 on Position 1-2
M4050->Y:$78500,0
; Digital Output M00
M4051->Y:$78500,1
; Digital Output M01
M4052->Y:$78500,2
; Digital Output M02
M4053->Y:$78500,3
; Digital Output M03
M4054->Y:$78500,4
; Digital Output M04
M4055->Y:$78500,5
; Digital Output M05
M4056->Y:$78500,6
; Digital Output M06
M4057->Y:$78500,7
; Digital Output M07
M4066->Y:$78500,0,8,u ;all outputs as an 8bit word
M4058->Y:$78500,8
; Digital Input MI0
M4059->Y:$78500,9
; Digital Input MI1
M4060->Y:$78500,10 ; Digital Input MI2
M4061->Y:$78500,11 ; Digital Input MI3
M4062->Y:$78500,12 ; Digital Input MI4
M4063->Y:$78500,13 ; Digital Input MI5
M4064->Y:$78500,14 ; Digital Input MI6
M4065->Y:$78500,15 ; Digital Input MI7
M4067->Y:$78500,8,8,u ; all inputs as an 8bit word
M4068->X:$78500,0,8 ; Direction Control bits 0-7 (1=output, 0 = input)
M4069->X:$78500,8,8 ; Direction Control bits 8-15 (1=output, 0 = input)
M4070->X:$78504,0,24 ; Inversion control (0 = 0V, 1 = 5V)
M4071->Y:$78504,0,24
; port data type control (1 = I/O)
In order to properly setup the JOPTO digital I/O an initialization PLC must be written scanning through
once on power-up/reset, and then disabling itself:
OPEN PLC12 CLEAR
M4068=$FF
;BITS 0-8 are assigned as output
M4069=$0
;BITS 9-16 are assigned as input
M4070=$FF00
;Define inputs and outputs
M4071=$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.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com