Tag Archives: Mitsubishi PLC program

Why does the other output flash when the Mitsubishi plc presses the total stop button?

Although the total stop is pressed, the user program in the plc is still running, and when the condition is satisfied, the corresponding result is output according to the user control program and the external input condition.
Should not be a problem with plc itself, most of which is caused by an abnormal external input signal.

Mitsubishi plc, how to write programs with alternate and STL instructions, press the button to stop, press the button to start, start to go backwards in the stop position

In the stepping program, the simpler way is to use the pause switch as the normally closed one as the next trigger condition in the stepping program, and the other trigger conditions are connected in series, but only if it is done at each step. Pause, not stop where you want to stop

What does K2Y000 mean in MITSUBISHI PLC?

K4Y0 is 2 bytes y0-y17
K2Y0 is 1 bytes y0-y7

For example: [K85 K2Y000] Corresponds to k85 conversion binary 1010101 to the state of y0-y7.

In the Mitsubishi PLC program, it is often seen that K4M100, K7M500, K1X0, K2Y0, etc. are written.

KnM refers to consecutive 4n bits starting with M. For example, K4M100 is a continuous 4*4=16 addresses starting with M100, which means M100 to M115. These 16 bits are just the length of one word. If it is K7M500, it means 7*4=28 bits starting with M500, more than 16 bits, 32 bits of light rain, so double word instructions should be used when appearing in the program.

These are generally used to transfer instructions and compare instructions. The format used is generally as follows:

= K4M100 K0

The 16-bit contact comparison command, the M100-M115 has a total of 16 bits off, and the contact is turned on.

<> K4M100 K50

16-bit contact comparison command. When the value represented by the 16-bit word of M100-M115 is not equal to 50, the contact is turned on.

D= K7M500 K0

The 32-bit contact comparison command, the M500-M527 has a total of 28 bits off, and the contact is turned on.


16-bit transfer instruction, all of Y0-Y3 are reset.


The 16-bit transfer instruction, X0-X3, a total of 8 bits representing the value is transferred to D0.

DMOV K6M50 D50

The 32-bit transfer command, the value represented by 24 bits of the M50-M523 is transferred to the D50.

CMP K1X0 K1Y0 M10

16-bit comparison instruction, the data composed of X0-X3 is compared with the data composed of Y0-Y3, the former is larger than the latter, M10=1, the former = the latter, M11=1, the former is the latter, M12= 1.

DCMP K5X0 K5M0 M100

32-bit comparison instruction, the data composed of X0-X23 is compared with the data composed of M0-M23, the former is larger than the latter, M100=1, the former = the latter, M101=1, the former is the latter, M102= 1.