Welcome to the Industrial Automation website!

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

ADLINK PCIe-7256 Industrial I/O Card Interruption and Relay

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



ADLINK PCIe-7256 Industrial I/O Card Interruption and Relay Status Management

In the field of industrial automation and process control, digital input/output (DIO) cards play a critical role in connecting on-site signals and control systems. When it comes to high reliability switch control, real-time capture of state changes, and long-life actuator driving, traditional non latch relays and polling input acquisition often struggle to balance power consumption, response speed, and system complexity. ADLINK PCIe-7256, as a 16 channel latch relay output and 16 channel optocoupler isolated digital input card, provides engineers with a low-power and high real-time solution through hardware level Change of State (COS) interrupt mechanism and dual coil latch relay design. This article will deeply analyze the architecture characteristics, register programming model, interrupt processing flow of the card, and combine it with practical application scenarios to explain how to use its unique functions to build a stable and reliable industrial monitoring and control system.


Latch relay output: perfect balance between power consumption and state maintenance

Traditional electromagnetic relays require continuous power supply after operation to maintain the contact state, which not only increases system power consumption but also affects their lifespan due to long-term coil heating. PCIe-7256 adopts a dual coil latch relay (DPDT, Form C), and its SET and RESET are triggered by independent pulses. Once the relay is activated, even if the drive signal is removed, the mechanical contacts remain in their current state until a reverse pulse is received. This feature brings two core advantages:

Power off state memory: When the system unexpectedly loses power, the state of all output channels is physically locked, and after re powering on, the previous control logic can be restored without additional initialization, especially suitable for safety interlock and valve holding scenarios.

Extremely low steady-state power consumption: only consumes current at the moment of switching (typical value)+ 12V@141mA Simultaneously activate all channels, with zero power consumption of the coil in steady state, significantly reducing the thermal load on the chassis.

The SET/RESET status of each channel is visually indicated by onboard LEDs, and the JP3/JP4 interfaces on the board support external LED arrays (connected in series with 330 Ω current limiting resistors, compatible with LEDs with Vf<2V), which can extend the status indication to the cabinet panel for easy on-site inspection. In terms of contact parameters, the rated load is 125V AC/0.5A or 30V DC/1A, which meets the majority of industrial ON/OFF control requirements; The mechanical lifespan is up to 2 × 10 ⁵ times (resistive load), and the release/pull in time is only 3ms, which is sufficient to cope with high-speed switch scenarios.


Optocoupler isolated digital input: anti-interference and flexible filtering

The 16 channel digital input adopts PC-3H4 optocoupler to achieve 2500Vrms channel system isolation, with a rated input current of 10mA (maximum 50mA), a logic high level threshold of 5-24V (AC or DC), a low level of 0-2V, and an input impedance of 4.7k Ω. Field signals, whether from proximity switches, limit switches, or 24V DC sensors, can be directly connected without additional level conversion.

It is worth noting that each input channel can independently select AC filtering or non AC filtering mode through onboard jumpers (JP1 corresponds to DI0~DI7, JP2 corresponds to DI8~DI15). The default setting is non AC filtering (DC coupling), in which case the input signal responds directly; When the jumper is placed in the AC filtering position, the built-in RC filter can effectively suppress power frequency interference and contact jitter, especially suitable for AC signal sources or long-distance transmission scenarios. This hardware configurability avoids the delay uncertainty caused by software filtering, allowing engineers to flexibly choose between real-time performance and noise resistance.


Change of State (COS) interrupt: Say goodbye to polling, respond in real-time

Traditional digital I/O cards require the CPU to periodically read input ports to detect status changes, which not only occupies bus bandwidth but also has response delays that depend on polling cycles. PCIe-7256 has built-in COS detection logic, and the state transition (rising edge or falling edge) of each input channel can trigger hardware interrupts, automatically latch the current input data, and notify the CPU for processing. This mechanism frees up the CPU, especially suitable for limit switches, emergency stop buttons, or pulse counting scenarios that require quick response.

Detailed explanation of COS workflow

Enable COS channel: Write 1 to the COS Setup register (Base+0x06, write) to enable the COS interrupt for the corresponding channel. This register is 16 bits, with each bit corresponding to one DI.

Interrupt trigger: When the enable channel undergoes a 0 → 1 or 1 → 0 change, the hardware sets the interrupt request, and at the same time, the COS Latch register (Base+0x06, read) captures a snapshot of the current 16 input levels to prevent the state from changing when the main loop reads.

Interrupt handling: After the CPU responds to the IRQ, it reads the COS Latch register to obtain the changed input value and executes the corresponding logic (such as alarm, status update, actuator linkage).

Clear Interrupt: Write 1 to the COS_CLR bit of Interrupt Control Register (Base+0x08) to clear the interrupt request and automatically reset the COS Latch register, allowing the next change to continue triggering.

Note that COS Latch data only remains valid until the interrupt is cleared, and automatically resets to zero after clearing. Therefore, the service routine must complete data reading before clearing the interrupt.

Dual interrupt source mode: Channel 0/1 rising edge trigger

In addition to COS mode, PCIe-7256 also supports rising edge interrupts based on DI channel 0 and/or channel 1 (mode 2). In this mode, interrupts are only generated when the input signal jumps from low to high, making it suitable for capturing positive edge pulses (such as encoder zero position signals or start commands). Two interrupt sources can be enabled separately or simultaneously, and the interrupt sources are distinguished by the interrupt status register (Base+0x08, read).

Important constraint: COS mode and channel 0/1 rising edge mode share the same interrupt signal line and cannot be enabled simultaneously. If the corresponding enable bits are set simultaneously, the hardware will enter an undefined state (clearly marked as "Forbidden" in the manual). Therefore, when programming, it is necessary to ensure:

If COS is enabled (Bit8=1), Bit9 and Bit10 must be 0.

If Ch0 (Bit9=1) or Ch1 (Bit10=1) is enabled, Bit8 must be 0.

The read and write properties of the interrupt control register (Base+0x08) are different: write operations are used to enable/clear interrupts, while read operations are used to query interrupt and enable states. The clear operation is completed by writing "1" to the corresponding clear bit (Bit0~Bit2), which will not affect the enable configuration.


Key points of register mapping and low-level programming

All registers of PCIe-7256 are 16 bits wide and must be accessed using 16 bit I/O instructions. The base address is automatically assigned by the PCIe plug and play system and does not require manual setting. The register mapping is shown in the following table (offset address relative to Base):

Offset address write operation read operation

0x00 relay output CHO~7 control undefined (not supported)

0x02 Relay output CH8~15 Control relay output status feedback (CHO~15)

0x04 undefined isolated digital input status (CHO~15)

0x06 COS Setup Register COS Latch Register

0x08 Interrupt Control Register Interrupt Status Register

Relay control coding details

Each latch relay is determined by two control bits (S and R):

SET (1,0): The normally open (NO) contact is closed, the normally closed (NC) contact is open, and the corresponding output state is "1".

RESET (0,1): NO is open, NC is closed, and the corresponding output state is "0".

Prohibition of (1,1) or (0,0): The former may lead to uncertain states, while the latter has no effect and should be avoided.

Therefore, in actual programming, the 16 bit output data needs to be mapped into a 32-bit control word, with the high bit being the SET bit and the low bit being the RESET bit. But the official library function _7256-DO simplifies this process by simply passing in 16 bit data (bit=1 represents SET, bit=0 represents RESET), and the library automatically converts it into a dual coil pulse sequence. However, if performing direct operations on the underlying registers, it is necessary to follow the two bit encoding rule.

Difference between input register and read back register

Isolation input register (Base+0x04): reflects the actual level of the current DI pin (after optocoupler and filtering), updated in real time.

COS Latch register (Base+0x06): an input snapshot that freezes only when a COS interrupt is triggered, used to confirm the state at the time of the interrupt.

Relay read back register (Base+0x02): reads the actual state of the current relay contact (SET=1, RESET=0), which is consistent with the written value (unless there is a mechanical fault).


Board ID and Multi Card Management

When multiple PCIe-7256 are installed in the same system, assign a unique Board ID (0-15) to each card through the S1 DIP switch (4 bits). This ID is not related to the base address, but serves as a logical handle when calling library functions, ensuring that the software can accurately address specific cards. Set the rules as shown in Table 2-1 (binary encoding, 1=ON, 0=OFF), for example, ID=0 corresponds to all switches being OFF, and ID=15 corresponds to all switches being ON. The initialization function _7256Initialize will automatically detect all cards and return the number of cards that exist, and subsequent functions will be distinguished by the boardID parameter.


Software Drivers and Development Suggestions

ADLINK provides the PCIS-DASK SDK (supporting Windows 7/8.1), which encapsulates all underlying register operations, including DLLs and C/C++libraries. Appendix A lists the main functions:

_7256Initialize: Must be called first to complete PCIe resource allocation and board enumeration.

_7256-DO/_7256-DO-Read_Sack: Relay write/read back.

_7256-DI: Read the current input status.

_7256_SOS_Channel: Set the COS enable mask.

_7256-IND_Control: Select the interrupt source (COS or Ch0/Ch1 rising edge).

_7256_SLR_SRQ: Clear interrupt request (corresponding clear bit needs to be passed in).

_7256_SOS_Latch: Read COS latch data.

_7256_gET_SRQ_Status: Query the current interrupt source status.

Attention should be paid to the design of interrupt service routines (ISR) during development: since interrupt clearing and latch clearing are performed synchronously, it is necessary to read the latch data first and then clear the interrupt, otherwise the data will be lost. In addition, if choosing Ch0/Ch1 rising edge mode, it is necessary to ensure that the input signal is not jitter. If necessary, a Schmitt trigger can be added externally or hardware filtering jumper can be used.

Typical application scenarios and selection considerations

Scenario 1: High voltage relay array control

In semiconductor testing equipment, it is necessary to switch multiple high-voltage signals. The latch relay of PCIe-7256 can maintain its state for a long time without generating heat, and each channel has independent LED indicators and external LED interfaces for maintenance personnel to quickly locate abnormal channels. 16 way double pole double throw contacts can simultaneously control two independent load circuits, saving the number of boards.

Scenario 2: Safety limit monitoring system

The status changes of multiple limit switches on the automated production line require quick response. After enabling COS interrupts, any switch action triggers CPU processing, and the delay depends only on the interrupt response time (microsecond level), which is much better than the millisecond level delay of software polling. Optocoupler isolation effectively prevents common ground interference caused by motor start stop, ensuring signal accuracy.

Scenario 3: Remote Terminal Unit (RTU) simulation

In the SCADA system, PCIe-7256 can be used as a PC based RTU to collect remote signals through DI and output remote control commands through relays. After a power outage, the relay maintains its state and automatically recovers upon restoration, meeting the strict requirements of the power system for "maintaining the final state".

Comparative advantage with competitors

Compared to ordinary non latch relay cards, PCIe-7256 has significant advantages in power-off holding and low power consumption; Compared to a simple input card, its COS interrupt reduces CPU burden and improves system throughput. Although the single card price is slightly higher, in situations where high reliability and fast response are required, the overall cost of this solution (eliminating external holding circuits and high-speed polling overhead) is more competitive.


Installation and configuration precautions

Anti static treatment: Before operation, be sure to wear a grounding wristband and and perform it on an anti-static workbench.

Driver priority: The PCIS-DASK driver must be installed before inserting the hardware to avoid misidentification by the operating system.

Jumper setting: Pre set the filtering selection for JP1/JP2 based on the input signal type (DC/AC, with or without contact jitter). The factory default is non AC filtering. If connected to AC 24V or mechanical contacts, it is recommended to enable filtering.

External LED connection: Ensure that the forward voltage drop of the LED is below 2V and the polarity is correct, otherwise it may not light up or be damaged. The onboard 330 Ω current limiting resistor has been integrated and does not require external string connection.

Power margin: When all relays are closed simultaneously, the maximum current of+12V reaches 500mA, and the maximum current of+3.3V is 45mA. It is necessary to ensure sufficient power supply.


Troubleshooting and Common Problems

Problem 1: Relay cannot be set/reset

Check if the driver is loaded and if the register is written correctly (prohibit writing (1,1)).

Confirm that the+5V relay power supply is normal (powered by onboard PCIe, no external required).

If the read back value does not match the write, it may cause mechanical jamming of the relay, and multiple reset/set pulses can be attempted.

Problem 2: COS interrupt not triggered

Confirm that the COS Setup register is correctly written (corresponding to bit 1).

Check if the interrupt control register has enabled Ch0/Ch1 mode incorrectly (the two are mutually exclusive).

Confirm whether the amplitude of the input signal change meets the logic high and low levels (needs to cross the threshold).

Read the interrupt status register. If COS Int_Status remains 0, it may indicate that the interrupt is not enabled or has been cleared.

Problem 3: The system cannot recognize multiple cards

Check if each card's Board ID is duplicated (must be unique).

Ensure sufficient power supply to PCIe slots, as some older motherboards may not provide sufficient power.

Run _7256Initialize to check the number of cards returned. If it is less than the actual number, check the PCIe resource allocation in the BIOS.

  • Micro Innovation GF1-10TVA-100 Touch Panel
  • Micro Innovation GSO-57EQD-000 Operator Panel
  • Micro Innovation XN-2AI-U Analog Input Module
  • Micro Innovation CAN-4AI/UI Analog Input Module
  • Micro Innovation ZSB-1.5/8-S/S/-/PE Base Terminal
  • Micro Innovation AG XVH-340-57CAN-1-10 HMI Panel
  • Micro Innovation GSO-57EQD-000 Micro Panel
  • Micro Innovation XN-2AI-PT/NI-2/3 Input Module
  • Micro Innovation AG GF0-57SQD-000 Display Panel
  • MICRO INNOVATION AG XN-16DI-24VDC-P Input Module
  • Micro Innovation XN-2AI-PT/NI-2/3 Input Module
  • Micro Innovation MC2-442-57CQB-1-2G Display Panel
  • Micro Innovation XN-16DO-24VDC-0.5A-P Module
  • Micro Design MC200PROFI Programmable Module
  • Micro Innovation XV-252-57MPN-1-10 Micro Panel
  • Micro Innovation CAN-4AI/UI Analog Input Module
  • Micro Innovation GT1-MPI-A000 Panel
  • Micro Innovation MC2-440-10TVB-1-21 Display Panel
  • Micro Innovation XVS-430-57MPI-1-1S 6" HMI
  • Micro Innovation XV-442-57CQB-1-1AB Monitor
  • Micro Innovation ZSB-1.5/8-S/S/-/PE Base Terminal
  • Micro Design 895A Microfiche Reader
  • MICRO INNOVATION XNE-8DI-24VDC-P Input Module 8550100794
  • MICRO INNOVATION MICRO PANEL GF0-10CVD-002
  • Micro Innovation XN-PLC-CANopen Controller 85 50 274124
  • Micro Innovation Display Panel GS0-57E0D-000
  • MICRO INNOVATION CAN-32DI/P2X16 Input Module
  • MICRO INNOVATION XN-2DO-R-NO Relay Output Module
  • MICRO INNOVATION XNE-16DI-24VDC-P Input Module
  • Micro Innovation AG XN-2AI-U Analog Input Module
  • Micro Innovation XN-BR-24DC-D Power Supply
  • Micro Innovation MH2-342-57EIB-1-20 Panel
  • Micro Innovation XV-252-57MPN-1-10 Micro Panel
  • Micro Innovation Display Card EIB2-TP
  • Micro Innovation XV-252-57MPN-1-10 6" HMI
  • Micro Innovation XN-B3T-SBC 16x DO Base Module
  • Micro Innovation XVH-330-57MPI-1-10 Panel
  • Micro Innovation XN-BR-24VDC-D Power Module
  • Micro Innovation EIB2-TP EIB2TP Module
  • Micro Innovation GF0-10CVD-100 Touch Panel
  • MICRO INNOVATION XV-230-57CNN-1-10 HMI-PLC
  • MICRO INNOVATION XN-2DO-R-CO Relay Output Module
  • KMK MICRO INNOVATION GS2-90EMD-000 Micro Panel
  • Micro Innovation XN-2AO-U Analog Output Module
  • Micro Innovation XN-1AO-I Analog Output Module
  • Micro Innovation CAN-32DI/P-2x16 Rack Module
  • Eaton Micro Innovation MC2-440-10TVB-1-11 HMI
  • Micro Innovation AG CAN Bridge 8551224177
  • Micro Innovation XN-2AI-I Analog Input Module Set
  • Micro Innovation XN-4DI-24VDC-P Input Module
  • Micro Innovation Winbloc CAN-16DO/0.5A-PK Module
  • Micro Innovation Micro Panel GFO-10SVD-002 HMI
  • Micro Innovation CAN-24DI/8DO/0.5A-PK Module
  • Micro Innovation DP-24DI/8DO/0.5A-PK I/O Module
  • Weidmuller Micro Innovation CAN-BRIDGE ZSFA 1,5R
  • Micro Innovation CAN-3AI/1AO-UI Profibus Module
  • Micro Innovation PDP-TP Profibus DP Module
  • Micro Innovation CAN-3AI/1AO-UI Analog Module
  • Micro Innovation MC2-430-12TSB-10 HMI Panel
  • Micro Innovation XNE-8DO-24VDC-0.5A-P I/O Module
  • MICRO INNOVATION AG WINBLOC CAN-32DI/P-2x16 85 51 224182
  • MICRO INNOVATION AG WINBLOC CAN-4AO/UI 85 51 224195
  • Micro Innovation Xv-252-57cnn-1-10 HMI Panel
  • Micro Innovation XN Basis XN-S4T-SBBS-CJ 225200
  • Micro Innovation GF1-10TVD-100 Micro Panel
  • Micro Innovation XN-B3T-SBC 16-Fold DO Base Module
  • MICRO INNOVATION AG WINBLOC CAN-3AI/1AO-UI 85 51 224192
  • KMK Micro Innovation GS2-90EMD-000 Micro Panel
  • Micro Innovation MC2-430-10TVB-1-10 PanelView Terminal 24VDC
  • Micro Innovation XNE-8DO-24VDC-0.5A-P I/O Module 8550100795
  • MICRO INNOVATION GF1-10TVB-100 Touch Panel
  • MICRO INNOVATION AG WINBLOC CAN-4AI/UI Analog Input Module
  • MICRO INNOVATION AG WINBLOC CAN-32DO/0.5A-P-2x16 Output Module
  • MICRO INNOVATION AG CAN-32DI/P-2X16 8551224182 Input Module
  • MICRO INNOVATION MK2-230/232-57 Circuit Board 85 28 200000
  • MICRO INNOVATION CAN-BRIDGE 8551224177 CAN Bridge
  • Micro Innovation MC2-430-10TVB-1-10 Panel 24VDC
  • MICRO INNOVATION MC2-432-57CQB-1-10 HMI Panel
  • MICRO INNOVATION AG CAN-BRIDGE 85 51 224177 CAN Bridge
  • MICRO INNOVATION CAN-4AI/UI Analog Input Module
  • MICRO INNOVATION CAN-32DI/P-2X16 Input Module
  • SIGMATEK MDD111 09-404-111 Drive Module
  • SIGMATEK DVI021 Display Interface Module
  • SIGMATEK 00-450-024 C-IPC Processor
  • SIGMATEK MDD-111 MDD111 Drive Module
  • SIGMATEK ICA011 20-102-011 Interface Module
  • SIGMATEK 01-250-010-D NC4Kompakt Control Module
  • SIGMATEK CRIF081 12-751-081 Interface Module
  • SIGMATEK S1026-8AF61-R4E-Z57 Drive Module
  • SIGMATEK 9305.081.02 9227.082.00 Control Module
  • Sigma Tek 5000B-36 Attitude Indicator
  • SIGMATEK CEZ201 12-051-201-O Counter Module
  • SIGMATEK DPS001 Power Supply Module
  • SIGMATEK 994 395 01z Via Interface Module
  • SIGMATEK PC411-K 01-310-411-K Industrial PC
  • SIGMATEK 9816.324.00 Demag NC4 Keyboard
  • SIGMATEK ET261 90010C-71 Operator Terminal
  • SIGMATEK DDI 164 05-006-164 Input Module
  • SIGMATEK CCP 082 C-DIAS Processor Module
  • SIGMATEK CEZ201 12-051-201-O PLC Module
  • SIGMATEK MDD 1111 06178867 Drive Module
  • SIGMATEK S1 073-6AC61-RE-Y08-Z Drive Module
  • SIGMATEK MDD 111 Drive Module MDD111
  • SIGMATEK CSDI161 Safety Module 12-891-161
  • SIGMATEK C-IPC Processor 01-450-024
  • SIGMATEK DIAS DAM122 Analog Mixing Module
  • Sigma Tek 5000B-36 Attitude Gyro Indicator
  • SIGMATEK TMS012 Motherboard Module 05-250-012-T
  • SIGMATEK CCP-531 PLC Module
  • SIGMATEK DIAS DNC4 I/O Module 05-250-011
  • SIGMATEK AI088 Analog Input Module
  • SIGMATEK CEZ201 Counter Module
  • SIGMATEK CIC011 Industrial Computer Module
  • SIGMATEK MDM021 Motor Drive Module
  • SIGMATEK DTO163 Digital Output Module
  • SIGMA-TEK 5000B-36 Attitude Gyro
  • SIGMATEK DM161 Digital Input Module
  • SIGMATEK CCP-531 PLC Control Panel
  • SIGMATEK HZS773 Touch Terminal Operator Panel
  • SIGMATEK MDP101 3 KVA 45-65Hz Driver
  • SIGMATEK ETV1251 Touch Panel 12-230-1251
  • SIGMATEK CIO021 Safety Module 12-013-021
  • Sigma Tek 4000H-5 Directional Gyro
  • SIGMATEK TAE531 I/O Module 01-240-531
  • SIGMATEK DAI081 Input Module 05-009-081
  • SIGMATEK DCP640 Drive Control Module
  • SIGMATEK DCP643 Slides Module A6-29
  • SIGMATEK SCP011 Safety Module 20-890-011