Power PMAC Clipper User Manual
Connections and Software Setup
52
Also the direction control and polarity must be at the default settings. Complete instructions for use of
this I/O are covered in detail in the Power PMAC User Manual.
For the multiplexed digital I/O on ACC-34 boards, the application will access the I/O points through their
image words in Power PMAC memory. The values in the image words for output ports are automatically
copied to the actual outputs on the ACC-34 boards, and the values in the image words for input ports are
automatically copied from the actual inputs on the ACC-34 boards.
The data structure elements (32-bit unsigned integers) for these image words are
MuxIo.PortA[n].Data
(inputs) and
MuxIo.PortB[n].Data
(outputs), where n (= 0 to 31) is the index for the board as set by the
DIP switches on the board. Standard Power PMAC bit addressing may be used:
MuxIo.PortA[0].Data.0 // first input bit
MuxIo.PortA[0].Data.0.4 // first four input bits (nibble)
MuxIo.PortB[0].Data.0 // first output bit
MuxIo.PortB[0].Data.0.4 // first four output bits (nibble)
An M-variable can be assigned to the entire element, an individual bit of the element, or to a consecutive
set of bits. When the assignment is made through the IDE, an application-specific name can be given to
the variable. For example:
ptr PartClamp->MuxIo.PortB[1].Data.17 // 1-bit value
ptr LocatorArray->MuxIo.PortA[0].Data.8.12 // 12-bit value
Typical setup for multiplexed I/O control:
Sys.WpKey = $AAAAAAAA
MuxIo.Enable=0
MuxIo.pOut = Clipper[0].GpioData[0].a
MuxIo.OutBit = 8
MuxIo.pIn = Clipper[0].GpioData[0].a
MuxIo.InBit = 0
MuxIO.PortA[0].Enable=1;
MuxIO.PortA[0].Dir=0;
MuxIO.PortA[0].AutoParityCheck=0
MuxIO.PortB[0].Enable=1;
MuxIO.PortB[0].Dir=1;
MuxIO.PortB[0].AutoParityCheck=0
MuxIO.ClockPeriod=250;
MuxIO.Enable=1
Содержание Power PMAC Clipper
Страница 5: ......
Страница 30: ...Power PMAC Clipper User Manual Connections and Software Setup 30...