Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

ADLINK ACL-7122 Digital I/O Card Installation and Programming

F: | Au:FANS | DA:2026-08-03 | 546 Br: | 🔊 点击朗读正文 ❚❚ ▶ | Share:

This design allows for software shutdown interrupts or cascading multiple interrupt sources through PC4.


Definition of connector pins and external wiring

The six 50 pin IDC male heads (CHO~CH5) on the card are arranged with OPTO-22 standard pins and can be directly connected to ADLINK's TB-24R (24 relay outputs), TB-24P (24 optocoupler inputs), or TB-16P8R (16 inputs+8 outputs) terminal boards. The PA, PB, and PC of each channel each occupy 8 bits, among which the high 4 bits (PC4~PC7) and low 4 bits (PC0~PC3) of the PC can be independently set for input/output.

Typical connection method:

Control external relays: Set PA/PB as the output, connect TB-24R through a ribbon cable, and drive one relay coil for each output position.

Read limit switch: Set PC or PA as input, connect TB-24P, and isolate external 24V signal with optocoupler.

Attention: All I/O are TTL level (high ≥ 2.0V, low ≤ 0.8V). If high voltage/high current loads need to be driven, they must be isolated through OPTO-22 module or relay board to avoid damaging the card.


Register Structure and Programming Fundamentals

The I/O mapping of ACL-7122 is based on four registers (PA, PB, PC, control word) per channel, with the base address set to B. Therefore:

CH0: B+0 (PA), B+1 (PB), B+2 (PC), B+3 (CW)

CH1: B+4~B+7

CH2: B+8~B+11

CH3: B+12~B+15

CH4: B+16~B+19

CH5: B+20~B+23

Control word format (written to CW register):

D7=1 (mode setting flag), D6~D5=00 (mode 0), D4=port A direction (0=output, 1=input), D3=PC high 4 bit direction (0=output, 1=input), D2=port B direction, D1=PC low 4 bit direction, D0 unused (usually 0).

For example, set all ports of CH0 as output: control word=1000 0000b=0x80.

Set the PA input, PB output, PC input, and PC output for CH1: D4=1, D3=1, D2=0, D1=0 → Binary 1 001 1 000 0=0x98.

Power on default: All ports automatically enter input mode, and the output latch is a random value. If output is required, the control word must be written to define the direction first, and then the data must be written to the corresponding port.

Output Read Back: Even if set as output, executing inportb (B+PA) can still read the current latch value, making it easier to verify program logic.

Detailed Analysis of Interrupt Programming

Using interrupts requires three steps:

Hardware settings: Select IRQ through JP6 and set JPx to E or P mode.

Software initialization: Write the appropriate I/O direction to the control word of the corresponding channel (note that PC0/PC3 must be inputs to receive external triggers, as they are interrupt source pins).

Clear interrupt status and allow interrupt: The manual provides a "false read" technique: first write an index to the control word register of the channel (i.e. base address+3,+7,...), and then read once from the PC port of this channel to clear the suspended interrupt and re enable it. Example code:

outportb(BASE+3, 0x00); //Point to CH0 CW (in fact, just write any CW address)

dummy = inportb(BASE+2); //Read PC0, clear interrupt

This operation will reset the interrupt trigger logic, enabling subsequent edge detection.

Writing ISR: Under DOS or Windows 3.1/95, interrupts can be mounted using the setvect() function of d_dos_getvect/d_dos_detvect or Borland C. In the service program, it is necessary to read the corresponding PC port to determine the interrupt source (PC0 or PC3 level), but please note that the input is not latched, and the order cannot be determined. Only the current state can be recognized.

Self triggering test: The manual provides an example program that generates interrupts through software simulation - by applying a jump to the PC0 or PC3 pin of a certain channel (by writing to the PC port), the interrupt can be triggered for debugging.

Interrupt sharing: Due to the output being in three states, multiple ACL-7122s can share the same IRQ. ISR needs to poll the status of each card to determine which card has generated an interrupt.


Common troubleshooting

Based on the manual and on-site experience, the following is compiled:

Possible causes and solutions for the fault phenomenon

The system is unable to recognize card base address conflicts or check for SW1 settings beyond the range. Refer to Appendix A to confirm unoccupied addresses (such as 2F8h as COM2, 3F8h as COM1, etc.)

If there is no level change in the output port, forget to write the control word or if the control word is incorrect, make sure to write CW first and then write the data; Check D7=1, correct direction position

Interrupt does not trigger JPx not set to E/P, or IRQ is blocked to confirm JPx jumper; Check if the IRQ in the system BIOS is assigned to ISA instead of PCI; Viewing the masking register with inportb (0x21) in DOS

Interrupt triggered multiple times or randomly triggered but not cleared correctly (false read not executed). In each ISR, a read operation must be performed on the PC port to clear the edge detection flag

When multi card sharing is interrupted, the response is abnormal. ISR does not poll all cards. In ISR, read the PC ports of each card in sequence to determine which one has changed

Insufficient high-level output driver, unused buffer or heavy load PA/PB. The minimum high-level is 2.4V and the current is 24mA. If the load is too large, a driving transistor needs to be added

  • National Instruments PXI-8364 MXI-Express Interface
  • National Instruments PXIe-8360 Interface Card
  • National Instruments 196859B-01 Ordering Part Number
  • National Instruments PXIe-1073 5-Slot Chassis
  • National Instruments NI 9209 Voltage Input Module
  • National Instruments USB-5133 Digitizer
  • National Instruments PXI-1044 Chassis
  • National Instruments NI 9266 785046-01 Module
  • National Instruments USB-6216 DAQ Device
  • National Instruments NI 9266 Output Module
  • National Instruments NI 9230 Vibration Module
  • National Instruments PCI-6230 DAQ Card
  • National Instruments PXI-6123 DAQ Card
  • National Instruments PCI-6255 DAQ Card
  • National Instruments PXI-8433 Serial Module
  • National Instruments PXIe-4138 Source Measure Unit
  • National Instruments 781044-01 PCIe-6321 DAQ Part Number
  • National Instruments PXIe-6356 X Series DAQ Module
  • National Instruments PCI-6513 Industrial Digital Output Card
  • National Instruments 183345A-04 Ordering Part Number
  • National Instruments PCIe-6351 X Series DAQ Card
  • National Instruments PXI-4070 FlexDMM Module
  • National Instruments PXI-6225 Multifunction DAQ Module
  • National Instruments 781496-01 Ordering Part Number
  • National Instruments 779592-01 Ordering Part Number
  • National Instruments SCXI-1121 Module
  • National Instruments NI 9148 Chassis
  • National Instruments PXI-6255 DAQ Module
  • National Instruments USB-4065 DMM
  • National Instruments PXI-6221 DAQ Module
  • National Instruments PXIe-1065 Chassis
  • National Instruments NI 9210 Input Module
  • National Instruments 778948-01 Output Module
  • National Instruments cRIO-9014 Controller
  • National Instruments cDAQ-9171 Chassis
  • National Instruments USB-6363 DAQ Device
  • National Instruments NI 9467 GPS Module
  • National Instruments USB-6351 DAQ Device
  • National Instruments NI 6581 Adapter Module
  • National Instruments 781045-01 Output Module
  • National Instruments PCI-6225 DAQ Card
  • National Instruments TRC-8543 CAN Cable
  • National Instruments PXIe-1073 Chassis
  • National Instruments USB-6003 DAQ Device
  • National Instruments NI 9476 Output Module
  • National Instruments myRIO-1900 Embedded Controller
  • National Instruments NI-9263 Analog Output Module
  • National Instruments 158561A-01L Ordering Part Number
  • National Instruments 785024-01 Ordering Part Number
  • National Instruments PCI-6510 Industrial Digital I/O Card
  • National Instruments USB-6259 Multifunction DAQ Device
  • National Instruments USB-8452 I2C SPI Interface Device
  • National Instruments PXI-8432 Serial Interface Module
  • National Instruments PXIe-5644R Vector Signal Transceiver
  • National Instruments PXI-2569 Relay Module
  • National Instruments 781174-01 Module
  • National Instruments 782000-01 Module
  • National Instruments PXI-5152 Digitizer
  • National Instruments PXI-6284 DAQ Card
  • National Instruments PCI-1428 Frame Grabber
  • National Instruments PXI-1050 Chassis
  • National Instruments NI USB-8486 Fieldbus
  • National Instruments NI 9862 CAN Module
  • National Instruments NI 9146 FPGA Chassis
  • National Instruments PXI-8108 Controller
  • National Instruments NI SWB-2816A Matrix Module
  • National Instruments NI 9269 Analog Output Module
  • National Instruments PCI-6031E Multifunction DAQ Card
  • National Instruments PXI-6713 Analog Output Module
  • National Instruments NI 9216 RTD Input Module
  • National Instruments NI-9237 Strain Bridge Input Module
  • National Instruments PXI-5124 High Resolution Digitizer
  • National Instruments USB-6343 X Series DAQ Device
  • National Instruments PXIe-6536 Digital I/O Module
  • National Instruments CAL-4330 Calibration Fixture
  • National Instruments PXI-4110 Programmable Power Supply
  • National Instruments 781503-01 Input Module
  • National Instruments FP-AI-V10 Module
  • National Instruments PXI-5114 Digitizer Card
  • National Instruments PXIe-8398 MXI Module
  • National Instruments cRIO-9056 Controller
  • National Instruments PCI-6509 DIO Device
  • National Instruments cRIO-9053 Controller
  • National Instruments 781056-01 Output Module
  • National Instruments 782606-01 Input Module
  • National Instruments cRIO-9112 Chassis
  • National Instruments PXIe-1078 Chassis
  • National Instruments PCIe-6536 DIO Board
  • National Instruments NI-9425 Input Module
  • National Instruments PCI-5122 Digitizer Card
  • National Instruments 779072-01 Relay Module
  • National Instruments 783703-01 DAQ Module
  • National Instruments PXI-6515 Digital Module
  • National Instruments 781099-01 DAQ Device
  • National Instruments PXI-8183 PXI Controller
  • National Instruments sbRIO-9626 Single-Board RIO Controller
  • National Instruments PXIe-1435 Camera Link Frame Grabber
  • National Instruments NI 9237 Strain Bridge Input Module
  • National Instruments PXIe-4353 Thermocouple Input Module
  • National Instruments PCIe-6320 X Series DAQ Card
  • National Instruments NI 1454 Compact Vision System
  • National Instruments PCIe-6321 X Series DAQ Card
  • National Instruments PXIe-5172 PXI Oscilloscope Module
  • National Instruments cDAQ-9134 CompactDAQ Controller
  • National Instruments cRIO-9063 CompactRIO Controller
  • National Instruments PXI-4070 DMM Card
  • National Instruments cFP-BP-4 Backplane
  • National Instruments 779521-01 Bridge Module
  • National Instruments cDAQ-9172 Chassis
  • National Instruments NI 9236 Strain Module
  • National Instruments PXI-1042Q Chassis
  • National Instruments SCXI-1102 Input Module
  • National Instruments 776990-01 Input Module
  • National Instruments PXI-1045 PXI Chassis
  • National Instruments PCIe-6251 DAQ Device
  • National Instruments NI 9219 Universal Analog Input Module
  • National Instruments NI 9215 BNC Analog Input Module
  • National Instruments PXIe-6570 Digital Pattern Instrument
  • National Instruments NI-9477 Digital Output Module
  • National Instruments NI 9145 EtherCAT Chassis
  • National Instruments PCI-6521 Industrial Digital I/O Card
  • National Instruments NI 9239 BNC Voltage Input Module
  • National Instruments NI 9265 Current Output Module
  • National Instruments NI 9212 Thermocouple Input Module
  • National Instruments PXI-6229 Multifunction DAQ Module
  • National Instruments NI-9146 Chassis
  • National Instruments PXIe-5622 Digitizer
  • National Instruments PXI-6704 Output Module