CON1: Onboard 40 pin IDC pin bank, which needs to be led out to the outside of the chassis through the accompanying 40 pin to 37 pin D-type male conversion cable.
3.1 Definition of CON2 (37 pin D-type) pin
Pin 1-20: Relay contacts (NO, NC, COM), grouped by channel. For example, pin 1 is COM0, pin 2 is NO0, pin 3 is NC0, and so on (see Figure 2.4 in the manual for details).
Pin 21-36: Isolate input signals A and B (DIAn/DIBn), each input channel has two input terminals (positive/negative interchangeable, polarity independent).
Pin 37: Digital Ground (GND).
3.2 Mapping between CON1 (40 pin header) and conversion cable
Convert the cable to map the 40 pin pin pin signal to the DB-37 male head for use with standard cables. The mapping relationship is shown in Figure 2.6, for example, pins 1 and 2 of pin 40 correspond to pins NO8 and CM8 of pin 37. In practical use, if a conversion cable is directly used, the external cable can be plugged into the DB-37 male head for easy connection to the terminal board.
Relay contact type:
Form C (conversion type): Relays R0~R4 and R9~R12 (10 in total), providing three terminals: NC (normally closed), NO (normally open), and COM (common terminal). When the coil is powered off, COM and NC conduct; When the coil is energized (control bit=1), COM and NO conduct.
Form A (normally open): Relays R5~R7 and R13~R15 (a total of 6), with only NO and COM terminals (no NC). When the coil is powered off, COM and NO are disconnected; Conducts when powered on.
After power on or system reset, all relays are in a power-off state (i.e. control bit is 0) to ensure safety.
Register Mapping and Programming Fundamentals
The register of ACL-7225B is extremely simple, occupying only 4 addresses:
Offset address read operation and write operation function
BASE+0 relay R0~R7 status read back setting R0~R7 on/off low byte bits 0-7 corresponding to R0~R7
BASE+1 relay R8~R15 status read back setting R8~R15 on/off low byte bits 0~7 corresponding to R8~R15
BASE+2 reads DI0~DI7 input status with no bits corresponding to DI0~DI7
BASE+3 reads DI8~DI15 input status without bits 0~7 corresponding to DI8~DI15
Programming Example (C Language):
#include <conio.h>
#Define BASE 0x300//Assuming the base address is 0x300
//Turn on relay R0 (set bit 0)
outp(BASE, 0x01); //BASE+0 writes 1, R0 is powered on
//Read all 16 input statuses
unsigned char low = inp(BASE+2); // DI0~DI7
unsigned char high = inp(BASE+3); // DI8~DI15
//Read back the status of the relay
unsigned char relay_status_low = inp(BASE);
unsigned char relay_status_high = inp(BASE+1);
Attention: The write operation directly controls the relay coil, with "1" indicating power on and "0" indicating power off. Read back registers can retrieve the current actual state (consistent with the written value).
Input characteristics and filtering selection
The isolated input adopts PC-814 optocoupler with built-in bidirectional light-emitting diode, so AC/DC does not need to care about polarity. The input resistance is 1.2k Ω, suitable for voltages ranging from 5 to 24V. When the input voltage is higher than about 3V, the optocoupler conducts and the corresponding register bit is read as "1"; When it is below about 1.5V, it is read as "0".
AC filtering function: When the jumper is set to the AC position, the input signal will pass through a low-pass filter, effectively filtering out power frequency noise and spikes, but the response time will be extended from 20 μ s to 2.2ms (about half a cycle under 50Hz signal). This mode is suitable for communication input or strong interference environments; For DC input, it is recommended to use DC mode for faster response.
Input voltage range: Maximum allowable continuous input of 24V AC/DC, exceeding it may cause damage to the optocoupler.

Design of Relay Contact Protection Circuit
When a relay drives an inductive load (such as a motor, solenoid valve, or contactor coil), a back electromotive force (up to several hundred volts) is generated at the moment of disconnection, which can easily cause arcing, erosion, and even adhesion of the contacts. For this purpose, Appendix A of the manual provides four classic protection circuits that engineers should choose based on the power supply type (AC/DC) and load characteristics.
6.1 RC absorption circuit (applicable to AC and DC)
A resistor R and a capacitor C are connected in parallel and series at both ends of the load. R is usually taken as 0.5~1 Ω/V (contact voltage), and C is taken as 0.5~1 μ F/A (contact current). For example, for a 24V/1A load, an AC capacitor with R=22 Ω and C=0.47 μ F (withstand voltage ≥ 200V) can be selected. This circuit can suppress instantaneous discharge when the contact is disconnected, but it may cause small leakage current, which may affect sensitive loads such as timers.
6.2 Diode freewheeling circuit (only applicable to DC)
Connect a diode (such as 1N4007) in reverse parallel at both ends of the load (inductive), with the cathode connected to the positive pole of the power supply and the anode connected to the negative pole of the power supply. When turned off, the energy stored in the coil is dissipated through the diode's freewheeling, which can completely eliminate the back electromotive force, but it will prolong the relay release time (about 5-10 times). When selecting, the reverse withstand voltage of the diode should be more than 10 times the power supply voltage, and the forward current should be greater than or equal to the load current.