Details of timers, input and output points, and relays in the PLC

First, the timer

The timer (T) in plc is equivalent to the energized time relay in the relay control system. It provides an infinite pair of normally open normally closed delay contacts. The timer has a set value register (one word length), a current value register (one word length) and a map register (a binary bit) for storing its output contacts. These three quantities use the same address. Numbering. However, the use is different and the meaning is different.

The timers in the FX2N series can be classified into general-purpose timers and integrated timers. They are timed by accumulating clock pulses of a certain period. The clock pulses have three periods of 1ms, 10ms, and 100ms, and the contacts operate when the count reaches the set value. The set value can be set with the constant K or the contents of the data register D.

1. General purpose timer

The general-purpose timer is characterized by the fact that it does not have a power-down hold function, that is, the timer is reset when the input circuit is disconnected or powered off. The general-purpose timer has two types of 100ms and 10ms general-purpose timers.

(1) 100ms general-purpose timer (T0~T199) A total of 200 points, of which T192~T199 are sub-programs and interrupt service program-specific timers. This type of timer is a cumulative count of 100ms clock, the set value is 1 ~ 32767, so its timing range is 0.1 ~ 3276.7s.

(2) A total of 46 points for the 10ms general-purpose timer (T200 to T245). This type of timer is a cumulative count of 10ms clock, the set value is 1 ~ 32767, so the timing range is 0.01 ~ 327.67s.

The following is an example of how a general-purpose timer works. As shown in Figure 1, when the input X0 is turned on, the timer T200 counts up the 10ms clock pulse from 0. When the count value is equal to the set value K123, the timer is normally turned on and Y0 is turned on. It is 123 × 0.01 s = 1.23 s. When X0 is turned off, the timer is reset, the count value becomes 0, its normally open contact is open, and Y0 is also turned OFF. If the external power supply is de-energized, the timer will also be reset.

Figure 1 General-purpose timer works

2. Totalizer

The integrated timer has the function of counting accumulation. If the power is turned off or the timer coil is OFF during the timing, the integrated timer will keep the current count value (current value), and continue to accumulate after power-on or timer coil ON, that is, its current value has a hold function, only the integrated calculation When the timer is reset, the current value becomes 0.

(1) The 1ms integration timer (T246 to T249) is a total of 4 points, which is the cumulative counting of 1ms clock pulses. The timing time range is 0.001 to 32.767s.

(2) The 100ms integration timer (T250 to T255) has a total of 6 points, and the time range for accumulating the count of 100 ms clock pulses is 0.1 to 3276.7 s.

The following is an example of how the integrated timer works. As shown in FIG. 2, when X0 is turned on, the T253 current value counter starts to accumulate the number of clock pulses of 100 ms. When X0 is turned off after t0, and T253 has not counted to the set value K345, the current value of the count is retained. When X0 is turned on again, T253 continues to accumulate from the current value of the hold. After the time t1, when the current value reaches K345, the contact of the timer acts. The accumulated time is t0 + t1 = 0.1 × 345 = 34.5 s. When the reset input X1 is turned on, the timer is reset, the current value becomes 0, and the contact also follows the reset.

Figure 2 The working principle of the integrated timer

Second, PLC input point

The input relay is connected to the input, which is a component that is specifically designed to accept the plc external switching signal. The PLC reads the external input signal state ("1" when it is turned on and "0" when it is turned 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 The equivalent circuit of the input relay

The input relay must be driven by an external signal and cannot be programmed, so it is not possible to have its coil in the program. Since the input relay (X) is in the state of the input image register, the number of times its contacts are used is not limited.

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

Third, plc output point

The output relay is used to transfer the internal signal output of the plc to an external load (user output device). The output relay coil is driven by the command of the PLC internal program, its coil state is transmitted to the output unit, and the external load is driven by the hard contact corresponding to the output unit. Figure 1 shows the equivalent circuit of output relay Y0.

Figure 1 equivalent circuit of the output relay

Each output relay corresponds to one of the normally open hard contacts in the output unit, but the output relays programmed in the program, whether normally open or normally closed, can be used countless times.

The output relay of the FX series PLC is also octal numbered. The FX2N number range is Y000~Y267 (184 points). Like the input relay, the output relay number of the base unit is fixed, and the extension unit and expansion module numbers are also numbered in order of the closest to the base unit.

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

Fourth, auxiliary relay

The auxiliary relay is the most abundant type of relay in the plc. The general auxiliary relay is similar to the intermediate relay in the relay control system.

The auxiliary relay cannot directly drive an external load, and the load can only be driven by the external contacts of the output relay. The normally open and normally closed contacts of the auxiliary relay can be used indefinitely when programmed in the PLC.

The auxiliary relay is composed of M and decimal numbers (only the input and output relays use octal numbers).

1. General auxiliary relay (M0~M499)

The FX2N series has a total of 500 general-purpose auxiliary relays. When the general auxiliary relay is running in the PLC, if the power supply is suddenly turned off, all the coils are turned OFF. When the power is turned on again, the remaining ones remain OFF except for being turned ON by an external input signal, and they have no power-off protection function. General-purpose auxiliary relays are often used as auxiliary operations, state temporary storage, shifting, etc. in logic operations.

According to the need, the M0 to M499 can be changed to the power-off holding auxiliary relay by program setting.

2. Power-off holding auxiliary relay (M500~M3071)

The FX2N series has 2,572 power-off auxiliary relays from M500 to M3071. Unlike conventional auxiliary relays, it has a power-off protection function that remembers the state of the power interruption transient and reproduces its state after power-on. It maintains its original state when the power is turned off because the lithium battery in the PLC holds the contents of their image registers when the power is interrupted. Among them, M500~M1023 can be set as general auxiliary relay by software.

The following uses the reciprocating motion control of the car to illustrate the application of the power-off holding auxiliary relay, as shown in Figure 1.

Figure 1 The role of the power-off retention auxiliary relay

In the forward and reverse movement of the car, the M600 and M601 control output relays drive the car movement. X1 and X0 are limit input signals. The running process is X0=ON→M600=ON→Y0=ON→car right line→blackout→car stop midway→power on (M600=ON→Y0=ON) then right line→X1=ON→M600=OFF, M601 =ON→Y1=ON (left line). It can be seen that since the M600 and M601 have power-off retention, after the power failure is stopped in the middle of the car, once the power is restored, the M600 or M601 still remembers the original state, and they will control the corresponding output relays, and the car will continue to move in the original direction. If the auxiliary relay is not powered off, the car will not move again when the car is cut off in the middle.

3. Special auxiliary relay

There are a large number of special auxiliary relays in the PLC, each with their own special functions. There are 256 special auxiliary relays in the FX2N series, which can be divided into two types: contact type and coil type.

(1) Contact type The coil is automatically driven by the PLC, and the user can only use its contacts. E.g:

M8000: Run monitor (turned on during PLC operation), M8001 is opposite logic to M8000.

M8002: Initial pulse (only momentarily turned on at the beginning of the run), M8003 is opposite logic to M8002.

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

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

Figure 2 M8000, M8002, M8012 waveform diagram

(2) Coil type The PLC performs a specific action after the coil is driven by the user program. E.g:

M8033: If the coil is energized, the output image memory and data register contents are maintained when the PLC is stopped.

M8034: If the coil is energized, the output of the PLC is completely disabled.

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

Fourth, the state device (S)

The state machine is used to record the status of the system in operation. It is an important programming component for programming a sequence control program. It is used in conjunction with the step sequence command STL described later.

As shown in Figure 3-6, we briefly introduce the role of the stater S with the robot action. When the start signal X0 is valid, the robot is lowered, and the workpiece is clamped to the lower limit X1. When the tightening in-position signal X2 is ON, the robot is stopped when it reaches the upper limit X3. The whole process can be divided into three steps, each step is recorded with a state machine S20, S21, S22. Each state device has its own set and reset signals (such as S21 set by X1 and X2 reset) and has its own operations (drive Y0, Y1, Y2). From the start of the start, the state of the next state action automatically returns to the original state as the state action shifts from top to bottom. In this way, the work of each step does not interfere with each other, and it is not necessary to consider the interlocking of components between the unsynchronized ones, so that the design is clear and concise.

Figure 3 The role of the state machine (S)

There are five types of state machines: initial state device S0 ~ S9 a total of 10 points; zero return state device S10 ~ S19 a total of 10 points; general state machine S20 ~ S499 a total of 480 points; with state power off state controller S500 ~ S899 A total of 400 points; state machine for alarm (can be used as external fault diagnosis output) S900 ~ S999 a total of 100 points.

Note when using the state machine:

1) The state machine has the same number of normally open and normally closed contacts as the auxiliary relay;

2) When the state device is not used with the step sequence command STL, it can be used as the auxiliary relay M;

3) The FX2N series PLC can set S0 to S499 to the state device with power-off hold function by program setting.

Five, the register

When plc performs input/output processing, analog quantity control, and position control, many data registers are required to store data and parameters. The data register is 16 bits and the most significant bit is the sign bit. Two data registers can be used to store 32-bit data, with the most significant bit still being a sign bit. There are several types of data registers: 1. The general purpose data registers (D0 to D199) have a total of 200 points. When M8033 is ON, D0~D199 have power-off protection function; when M8033 is OFF, they have no power-off protection. In this case, when the PLC is RUN → STOP or power failure, the data is all cleared. 2. The power-off data register (D200~D7999) has a total of 7800 points, of which D200~D511 (12 points in total) has the power-off hold function, which can change the general-purpose data register and the power-off hold function data by using the parameter settings of the external device. Register allocation; D490 ~ D509 for communication; D512 ~ D7999 power off function can not be changed by software, but they can be used to clear their contents. According to the parameter setting, D1000 or above can be used as a file register. 3. The special data registers (D8000 ~ D8255) have a total of 256 points. The purpose of the special data register is to monitor the operating state of the PLC. Such as scan time, battery voltage, etc. Undefined special data registers that the user cannot use. See the user manual for details. 4. Index Register (V/Z) The Mitsubishi FX2N series PLC has 16 index registers of V0 to V7 and Z0 to Z7, which are 16-bit registers. The index register V/Z is actually a special purpose data register, which is equivalent to the index register change in the microcomputer, and is used to change the component number (index). For example, when V0=5, D20V0 is executed. The number being executed is D25 (D20+5). The index register can be read and written like other data registers. When 32-bit operation is required, V and Z can be used in series (Z is low and V is high).

Photography Backdrop

Background Frame,Photography Backdrop,Photo Studio Background,Photography Studio Backdrop

SHAOXING SHANGYU FEIXIANG PHOTOGRAPHIC CO.,LTD , https://www.flying-photography.com

Posted on