Dynamic/Inverse (3): Initially set to H, the first falling edge is open and the next falling edge is closed.
3.3 CCO Output Configuration (Parameter 6)
Static/Positive Logic (0): The user program activates CCO to become H; when the counter value equals the register value, CCO becomes H and remains until a new activation command is received.
Static/Inverse (1): When activated, CCO=H, and when equal, CCO=L and maintain.
Dynamic/Positive Logic (2): CCO=L when activated; When equal, CCO generates positive pulses of 25... 100 µ s, which are repeated every time they are equal.
Dynamic/Reverse Phase (3): When activated, CCO=H; When equal, CCO generates negative pulses of 25... 100 µ s.
The short pulse output in dynamic mode can trigger XOB 20/25 through the interrupt input of PCD (such as INB1) to achieve real-time response.
3.4 Configuration of Input A and B
A and B can be independently inverted (parameters 7 and 8). For counting mode, inverting input is equivalent to physically reversing the direction of the motor. Parameter 7 also affects the polarity of input A in measurement mode.
3.5 Counting Mode (Parameter 2)
X1 mode (0 or 1): Only evaluates the rising edge of signal A, and the B level determines the direction (counting up when B=H, counting down when B=L, or taking the opposite). Suitable for simple counting tasks, not recommended for incremental encoders.
X2 mode (2): Evaluate the rising and falling edges of signal A, and determine the direction of phase B (90 ° offset). Double the number of pulses per cycle.
X4 mode (4): Evaluate the rising and falling edges of A and B, with the direction still determined by the phase. Provide the highest resolution (4x).
X3 mode (3): No practical use, not discussed.
Measurement mode
PCD2.H110 supports three measurement modes: frequency measurement, cycle length measurement, and pulse length measurement. All measurements are performed using two 16 bit counters, one as a time base counter (1 MHz or 1 kHz clock) and the other as a measurement counter. The measurement can be configured as single or automatic continuous.
4.1 Frequency measurement (500 Hz... 100 kHz)
The measurement window is defined by the user (set in milliseconds through parameter 10), and counts the pulses input by A during the window opening period. The result is read in the form of pulse count or converted Hz. In automatic mode, the measurement is continuously cycled, and a TCO pulse is generated at the end of each window. The result is latched and a new measurement begins immediately. The TCO pulse width is approximately 1.6 µ s. The resolution depends on the number of pulses captured within the window: to achieve 1% accuracy, at least 1000 pulses are required. For example, a 100 kHz signal requires a 10 ms window, while a 500 Hz signal requires a 2 s window. For signals below 100 Hz, it is recommended to use periodic measurement.
4.2 Cycle length measurement (corresponding to frequencies of 0.27 mHz... 500 Hz)
Measure the time between two consecutive rising edges. The time base is 1 MHz (1 µ s resolution). The user sets the time base frequency division value n (0... 65535) through parameter 10, and the actual measured value is equal to the measured counter value multiplied by (n+1) µ s. Formula: n=(T × 10 ^ 6/clk) -1, where T is the expected period (seconds) and clk is the expected number of clock pulses (used to adjust resolution). For example, if T=10 s and clk=10000, then n=999. The measurement results are read out in pulses or converted seconds.
4.3 Pulse length measurement
Measure the duration of input A being high (or low) level. Similarly, use a time base of 1 MHz and a user-defined frequency division value n. Parameter 7 can invert the input A to achieve negative pulse measurement. Configure parameter 9=0 (single) or 1 (automatic continuous).
4.4 Measurement Control and TCO Output
The Enable M input (terminal 3) can enable measurement statically or dynamically, and the logic can be reversed.
The TCO output (terminal 5) can generate static level changes or dynamic pulses at the end of each measurement to trigger CPU interrupts or external devices.

Programming and Configuration
The programming of PCD2.H110 is carried out in SAIA PG4 programming software (Windows platform), which supports instruction lists (IL) and function blocks (FB), as well as GRAFTEC (Sequential Function Diagram). The support for FUPLA (functional block diagram) is currently in preparation. The user needs to install the library files from the floppy disk (order number PCD9.H11E), including D2H110_SRC, D2H110_SQU, help files, and module base address template file D2H110_S.MBA.
5.1 Module Base Address File (. MBA)
The user must edit the file, specifying the actual number of H110 modules (NbrModules, 0... 16) used and the hardware base address for each module. The base address corresponds to the I/O slot address on the PCD backplane (such as 32, 64, 112, 208, etc.). This file needs to be manually copied to the project directory.
5.2 Initialization Function Block Initiat
Initiat accepts 12 parameters for configuring all operating modes of the module. Call example:
text
CFB init