Share this

Detailed Explanation of Timers, Input/Output Points, and Relays in PLCs

2026-04-06 03:12:54 · · #1

I. Timer

In a PLC , a timer (T) is equivalent to an energized time relay in a relay control system. It can provide an unlimited number of normally open and normally closed delay contacts. A timer has a setpoint register (one word long), a current value register (one word long), and an image register (one binary bit) to store its output contacts; these three values ​​use the same address number. However, their applications and meanings differ.

The FX2N series timers are divided into two types: general-purpose timers and accumulating timers. They achieve timing by accumulating clock pulses of a certain period. The clock pulse period has three options: 1ms, 10ms, and 100ms. A contact activates when the count reaches a set value. The set value can be set using a constant K or the contents of the data register D.

1. General-purpose timer

A key characteristic of general-purpose timers is that they lack a power-off retention function, meaning the timer resets when the input circuit is disconnected or power is lost. There are two types of general-purpose timers: 100ms and 10ms.

(1) There are 200 general-purpose timers (T0 to T199) for 100ms, of which T192 to T199 are dedicated timers for subroutines and interrupt service routines. These timers accumulate counts for 100ms clock cycles, with a set value of 1 to 32767, so their timing range is 0.1 to 3276.7s.

(2) 46 general-purpose 10ms timers (T200~T245). These timers accumulate counts for 10ms clock cycles, with a set value of 1~32767, so their timing range is 0.01~327.67s.

The following example illustrates the working principle of a general-purpose timer. As shown in Figure 1, when input X0 is turned on, timer T200 starts counting 10ms clock pulses from 0. When the count value equals the set value K123, the normally open contact Y0 of the timer turns on, and the elapsed time is 123 × 0.01s = 1.23s. When X0 is turned off, the timer resets, the count value becomes 0, its normally open contact opens, and Y0 also turns off. If the external power supply is interrupted, the timer will also reset.

Figure 1. Working principle of a general-purpose timer

2. Accumulation Timer

The accumulator timer has a counting and accumulation function. If the power is off or the timer coil is OFF during the timing process, the accumulator timer will maintain the current count value (current value). When the power is turned on or the timer coil is ON, it will continue to accumulate. That is, its current value has a holding function. Only when the accumulator timer is reset will the current value become 0.

(1) There are 4 1ms cumulative timers (T246~T249) that accumulate and count 1ms clock pulses. The timing range is 0.001~32.767s.

(2) There are 6 100ms cumulative timers (T250~T255) that accumulate and count 100ms clock pulses. The time range is 0.1~3276.7s.

The following example illustrates the working principle of the accumulator timer. As shown in Figure 2, when X0 is turned on, the current value counter of T253 begins to accumulate the number of clock pulses over 100ms. When X0 is turned off after time t0, and T253 has not yet counted to the set value K345, its current count value is retained. When X0 is turned on again, T253 continues to accumulate from the retained current value. After time t1, when the current value reaches K345, the timer's contacts activate. The accumulation time is t0 + t1 = 0.1 × 345 = 34.5s. When the reset input X1 is turned on, the timer resets, the current value becomes 0, and the contacts also reset.

Figure 2 Working principle of the accumulator timer

II. PLC Input Points

The input relay is connected to the input terminal and is a component specifically designed to receive external switching signals from the PLC. The PLC reads the status of the external input signal ("1" when on, "0" when off) through the input interface and stores it in the input image register. Figure 1 shows the equivalent circuit of input relay X1.

Figure 1 Equivalent circuit of the input relay

Input relays must be driven by external signals and cannot be driven by a program, so their coils cannot appear in the program. Since the state of the input relay (X) is in the input image register, the number of times its contacts can be used is unlimited.

The input relays of the FX series PLC are numbered in octal. The numbering range for the FX2N input relays is X000~X267 (184 points). Note that the input relay numbers of the basic unit are fixed, while those of expansion units and modules are numbered sequentially from the closest to the basic unit. For example, the input relays of the basic unit FX2N-64M are numbered X000~X037 (32 points). If expansion units or modules are connected, the extended input relays are numbered starting from X040.

III. PLC Output Points

Output relays are used to transmit internal PLC signals to external loads (user output devices). The output relay coil is driven by instructions from the PLC's internal program. Its coil state is transmitted to the output unit, and the corresponding hard contacts of the output unit then drive the external load. Figure 1 shows the equivalent circuit of output relay Y0.

Figure 1 Equivalent circuit of the output relay

Each output relay has a unique normally open hard contact in the output unit, but the output relays that are programmed in the program, whether normally open or normally closed, can be used an unlimited number of times.

The output relays of the FX series PLC also use octal numbering, with the FX2N numbering ranging from Y000 to Y267 (184 points). Similar to the input relays, the output relay numbers of the basic unit are fixed, and the numbering of expansion units and modules also follows the sequence closest to the basic unit.

In practical use, the number of input and output relays depends on the specific system configuration.

IV. Auxiliary Relays

Auxiliary relays are the most numerous type of relay in a PLC. Generally, auxiliary relays are similar to intermediate relays in a relay control system.

Auxiliary relays cannot directly drive external loads; the load can only be driven by the external contacts of the output relays. The normally open and normally closed contacts of the auxiliary relays can be used an unlimited number of times during PLC programming.

Auxiliary relays are numbered using a combination of M and a decimal number (only input/output relays use octal numbers).

1. General purpose auxiliary relays (M0~M499)

The FX2N series has 500 general-purpose auxiliary relays. When the PLC is running, if the power supply is suddenly interrupted, all coils of these general-purpose auxiliary relays will be OFF. When the power is restored, except for those that become ON due to external input signals, the rest will remain OFF; they do not have power-off protection. General-purpose auxiliary relays are commonly used in logic operations for auxiliary calculations, state storage, and shifting.

As needed, M0 to M499 can be programmed to become power-off holding auxiliary relays.

2. Power-off retention auxiliary relays (M500~M3071)

The FX2N series includes 2572 power-off retention auxiliary relays, ranging from M500 to M3071. Unlike ordinary auxiliary relays, these relays feature power-off protection, meaning they can remember the state at the moment of power interruption and reproduce that state upon power restoration. They maintain their original state during power failure because the PLC's lithium battery retains the contents of their image registers during power outages. Relays M500 through M1023 can be configured as general-purpose auxiliary relays via software.

The application of the power-off holding auxiliary relay is illustrated below through the control of the trolley's reciprocating motion, as shown in Figure 1.

Figure 1. Function of the power-off holding auxiliary relay

During the forward and reverse movement of the trolley, M600 and M601 control output relays drive the trolley's movement. X1 and X0 are limit input signals. The operation process is as follows: X0=ON→M600=ON→Y0=ON→Trolley moves right→Power outage→Trolley stops midway→Power on (M600=ON→Y0=ON) and moves right again→X1=ON→M600=OFF, M601=ON→Y1=ON (leftward movement). It can be seen that because M600 and M601 have power-off retention, after the trolley stops midway due to a power outage, once the power is restored, M600 or M601 still remembers the original state and will control the corresponding output relays, allowing the trolley to continue moving in the original direction. Without the power-off protection auxiliary relays, if the trolley loses power midway and is then powered on again, the trolley will not be able to move.

3. Special auxiliary relays

PLCs contain a large number of special auxiliary relays, each with its own specific function. The FX2N series has 256 special auxiliary relays, which can be divided into two main categories: contact type and coil type.

(1) Contact type: Its coil is automatically driven by the PLC, and the user can only use its contacts. For example:

M8000: Run monitor (connected during PLC operation), M8001 is the opposite logic of M8000.

M8002: Initial pulse (only momentarily activated at the start of operation), M8003 is the opposite logic of M8002.

M8011, M8012, M8013, and M8014 are special auxiliary relays that generate clock pulses of 10ms, 100ms, 1s, and 1min, respectively.

The waveforms of M8000, M8002, and M8012 are shown in Figure 2.

Figure 2 Waveform diagrams of M8000, M8002, and M8012

(2) Coil type: The PLC executes a specific action after the coil is driven by the user program. For example:

M8033: If its coil is energized, the output image memory and data register contents will be retained when the PLC stops.

M8034: If its coil is energized, all PLC outputs will be disabled.

M8039: If its coil is energized, the PLC will operate according to the scan time specified in D8039.

IV. State Unit (S)

A state register is used to record the state of the system during operation. It is an important programming element for writing sequential control programs, and it is used in conjunction with the step sequence control instructions (STL) described later.

As shown in Figure 3-6, we use the robot's movements to briefly illustrate the function of state register S. When the start signal X0 is valid, the robot descends, begins clamping the workpiece at the descent limit X1, and stops when the clamping completion signal X2 is ON, reaching the upper limit X3. The entire process can be divided into three steps, each recorded by a state register S20, S21, and S22. Each state register has its own set and reset signals (e.g., S21 is set by X1 and reset by X2), and its own operation (driving Y0, Y1, and Y2). From start to finish, the state transitions from top to bottom, and the next state action automatically returns the previous state to its original state. This ensures that each step's operation is independent, eliminating the need to consider interlocking between asynchronous components, making the design clear and concise.

Figure 3. Function of the state unit (S)

There are five types of state registers: initial state registers S0 to S9 (10 points in total); return-to-zero state registers S10 to S19 (10 points in total); general state registers S20 to S499 (480 points in total); state registers with state retention after power failure (S500 to S899, 400 points in total); and state registers for alarm purposes (which can be used as external fault diagnosis outputs) S900 to S999 (100 points in total).

When using state machines, the following should be noted:

1) Like auxiliary relays, state devices have countless normally open and normally closed contacts;

2) When the state unit is not used in conjunction with the step sequence control instruction STL, it can be used as an auxiliary relay M;

3) The FX2N series PLC can be programmed to set S0 to S499 as state devices with power failure retention function.

V. Registers

When performing input/output processing, analog signal control, and position control, PLCs require numerous data registers to store data and parameters. Data registers are 16-bit, with the highest bit being the sign bit. Two data registers can be used to store 32-bit data, with the highest bit still being the sign bit. Data registers come in the following types: 1. General-purpose data registers (D0~D199), totaling 200 points. When M8033 is ON, D0~D199 have power-off protection; when M8033 is OFF, they have no power-off protection. In this case, when the PLC switches from RUN to STOP or experiences a power outage, all data is cleared. 2. Power-off Retention Data Registers (D200~D7999): 7800 points in total. D200~D511 (12 points in total) have power-off retention functionality. The allocation between general-purpose data registers and data registers with power-off retention functionality can be changed using external device parameter settings. D490~D509 are for communication purposes. The power-off retention function of D512~D7999 cannot be changed by software, but their contents can be cleared using instructions. D1000 and above can be used as file registers according to parameter settings. 3. Special Data Registers (D8000~D8255): 256 points in total. Special data registers are used to monitor the PLC's operating status, such as scan time and battery voltage. Undefined special data registers cannot be used by the user. See the user manual for details. 4. Index Registers (V/Z): Mitsubishi FX2N series PLCs have 16 index registers (V0~V7 and Z0~Z7), all of which are 16-bit registers. The index register V/Z is actually a special-purpose data register, functioning similarly to the index register in a microcomputer. It's used to change the element's number (index). For example, if V0=5, then when executing D20V0, the executed element is D25 (D20+5). Index registers can be read and written like other data registers. When 32-bit operations are required, V and Z can be used in series (Z is the low-order bit, V is the high-order bit).

Read next

CATDOLL Cici Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22