Tag Archives: PLC programming

PLC ladder programming Instruction control bits

        ① set and reset. When the condition becomes ON”, the set will be put in operation ON”, but not as output (OUT), when the condition becomes OFF”, the reset will not reset on the operation of OFF”. When the condition becomes ON”, the reduction in operation position reset OFF”, but does not output non-directive (OUT NOT), when the condition becomes OFF”, the reset will not reset on the operation ON”. In the following example, no matter how IR00100, IR00100 reset ON” IR20000 will reset when ON”, and can remain ON” until the IR00101 reset ON”. When IR00101 set ON”, the reset IR20000 reset OFF”. Set and

No function code set and reset. From the handheld programmer to enter them as FUN and SET key or FUN and RSET button, followed by the address.

       ② rise differential differential and the falling edge. Rise differential and the falling edge of the so-called differential refers to the input signal front porch and back operations. Rise differential differential command is used to enable and falling in a cycle time of the built-in ON”. In implementing the conditions OFF” to ON”, the rising differential instruction makes a cycle of operation ON”, in the implementation of conditions ON” to OFF”, the falling differential instruction makes a cycle of operation ON”. Both of these instructions requires only one line mnemonics.

Here, in IR00000 to ON”, IR20001 in a cycle will reset ON”. Then perform DIFU (13) 20001, no matter how IR00000, IR20001 will be OFF”. Falling edge differential instruction IR00001 to OFF” after (IR20002 OFF” until this time), the IR20002 will be built in a cycle ON”, and will be implemented in the next DIFD (14) 20002 post OFF”.
Rise differential and the falling edge of differential

       ③ maintain. Use directives to keep based on two perform conditional operations. Doing so will keep the instructions attached to two on the command line. When the first command line execution at the end of the condition for ON”, keep instructions operating position ON”. When the end of the second command line execution as ON”, keep instructions operating position OFF”. Even if it is located in the internal interlocking parts of the program, keeping the operation of the directive will save it to the ON” or OFF” State.
In the example shown in Figure 1-33, when IR00002 is ON” and IR00003 to OFF”, the HR0000 will be set ON”. HR0000 remain ON” until another IR00004 or IR00005 reset ON”. Keep instructions as the others, need more than one command line, the command line in the instruction encoding before they control.

Siemens S7-200 PLC’s Belt conveyor Control Programming Example

Three conveyor belts, respectively, by the motor M1, M2, M3 driven.

Requirements: After pressing the start button SB1, a startup sequence for M1, M2, M3, interval of 3s.
After the stop button SB2, Sequential stopping for M3, M2, M1, interval of 3s.
Three motors M1, M2, M3, respectively, through the contactor KM1, KM2, KM3 three-phase AC power supply is turned on, PLC control coil contactor

Siemens S7-200 PLC Duty Cycle Adjustable of the pulse source Programming Example

When I0.0 changes from 0 to 1, T102 normally closed contact closure, T101 is started and start time: When the T101 SV reaches the set PT  (50 × 100ms = 5s)
, T101 is turned on, T101 normally open contact closure, T102 is started, the start time; When the
T102 current value of SV reaches its set value PT (5s), T102 is turned on, normally closed contacts disconnect T102, T101 reset, T101 makes the current value SV = 0, T101 normally open contacts disconnect, T102 reset, T102 NC contact is closed, T101 restarted, begin the next cycle.

Siemens S7-300 plc’s Controls Belt Programming Example

An electrical start of the conveyor belt, At the beginning of the conveyor belt has two push button switches: S1 for START and a STOP of the S2.
At the end of the conveyor belt also has two buttons switches: the S3 for START and STOP for the S4. You can start or stop the belt from either end. In addition, when an object on the conveyor belt reaches the end, the Sensor S5 Make  Conveyor belts Shutdown

PLC Flash power oscillation circuit Programming

When 00002 is turned on, TIM000 start timing, while 10000 is ON; after 0.8s TIM000 normally open contact closure, normally open contact disconnect, TIM001 start timing, while 10000 is OFF;
After 0.6s, TIM001 the normally closed contacts open, TIM000 coil power, the normally closed contact closure, normally open contacts to open 10,000 and is ON; at the same time, TIM001 coil is energized, the normally closed contact is closed. After scanning one cycle, TIM000 coil is energized again, so repeated, 10000 can be obtained at a specific interval on-off output, TIM000 decision on delay time, TIM001 decision off delay time.

PLC floor control loop

In the elevator shaft on each floor is equipped with a magnetic sensors, respectively 1YG, 2YG, 3YG, 4YG, 5YG, while the car is equipped with a side length of the magnet separator plate, if the elevator up from the first floor, then magnet separator plate and then click insert sensor. When the magnet separator plate inserted into the sensor, the sensor inside the reed contact is closed, the corresponding floor control relay 1JZ ~ 5JZ pull.

According 1JZ ~ 5JZ operation, control 1JZ1 ~ 5JZ1 appropriate action. Seen from the circuit 1JZ1 ~ 5JZ1 have pull self-holding function, so 1JZ1 ~ 5JZ1 always has one and only one pull.

Mitsubishi PLC SET, RST instruction

SET: set command, keeping the action ON the directive.

RST: reset instructions, keeps the action OFF directive.

SET command can be used to Y,M,S,T,C Y,M and S,RST directives can be used to reset or D,V and z-zero Word elements.

If X0 figure 1 normally open contact connected, Y0 to ON and keep the State, even if the X0 normally open disconnect, it still remains in the ON state. X1 normally open contact closes, Y0 becomes OFF and remain in the State, even if the X1 normally open disconnect, it still remains in the OFF state (see waveforms in Figure 1).

On the same programming element, can be SET multiple times and RST commands, the last executed instructions will determine the current status. RST command registers the data d, B line z rent v content cleared, RST command is also used to reset the totalizer counter and timer T246~T255.

SET, RST directive function of rs and digital circuit trigger similar features, SET and RST commands can be inserted between other programs. If they don’t have another program, the final instruction effective.

X0 in Figure 2 normally open contacts is switched on, the totalizer timer T246. Reset the X3 normally open contact is switched on, the C200 reset the counter, their current values are clear 0, normally open disconnect, normally closed contacts are closed.

In any case, the RST command takes precedence. When the counter is reset, enter the counting pulses do not work.

If you do not want the counter and totalizer timer power hold function, can the user program starts running them with the initial pulse M8002 reset


Mitsubishi PLC PLS, PLF instruction

PLS (Pulse): rising differential output directive.

PLF: falling edge of differential output directive.

PLS and PLF command can only be used for the output relays and auxiliary relays (does not include special auxiliary relays). M0 in the figure only in the X0 normally open from open to close (X0 rising edge) when a scan cycle for ON,M1 only on X0 normally open contact connected become disconnected (X0 the falling edge) _ when a scan cycle is ON.

When the PLC from RUN to STOP, and then from STOP to RUN when its input signal still is ON,PLS M0 instruction will output a pulse. However, if you use the battery backup (latches) the auxiliary relays instead of M0, PLS order in this case no output pulses

Mitsubishi FX series PLC master command (MC / MCR)

FX series PLC basic logical instruction 20 or 27, step instructions 2, command more than 100 pieces (different series). FX2N this section, for example, described its basic logic instructions and step ladder instruction and its application.

FX2N total 27 basic logical instructions, containing some 20 basic logic series PLC instructions.

Master instruction (MC/MCR)

(1) MC (master instruction) for public contacts connected in series. After the implementation of MC, left bus behind the MC contacts.

(2) MCR (master reset instructions) it is MC reset instruction instructions, the MCR instruction bus left of the restore location.

Programming often occur in such a situation, multiple coils and controlled by one or a group of contacts, if each coil of string into the same contact in the control circuit, will take up a lot of storage units, using master instruction can solve this problem. MC, MCR instruction used is shown in Figure 1, move left bus right using MC N0 M100, Y0, Y1 are under the control of X0, where N0 is the nesting level N0 use unlimited number of nonnested structures using MCR N0 restore to the original left the bus. If X0 disconnect you can skip MC, MCR instructions between down implementation.


MC, MCR instruction for use:

1) MC, MCR instruction of the target component to y and m, but not with special auxiliary relays. MC 3 program step, MCR 2 program step;

2) master contacts contacts in ladder diagram in the vertical (as in Figure 3-22 M100). Master contact is normally open contacts connected to the bus and left, is to control a set of circuit total switches. And contacts must be connected to the master contact LD or LDI instruction.

3) MC command input contact is disconnected, the accumulation in the MC and MCR timer, counter, reset/set commanddriven component state before remain unchanged. Non-totalizing timers and counters will reset with OUT of orderdriven components, such as in Figure 3-22 X0 disconnect, Y0 and Y1 becomes OFF.

4) if used in a MC extent MC instructions are called nested. Nesting levels up to grade 8, number N0 N1 N2 N3 N4 N5 N6 N7 order increases, each level corresponds to the return of MCR instruction, starting from the number of nesting levels reset.