How to set up Mitsubishi PLC Set batch?

The Mitsubishi PLC_FX series does not have a batch set command.

However, other instructions can be used instead of the effect.

The simplest is to use the transfer instruction MOV, but the MOV instruction is a group of 4 components. Although simple, it cannot achieve any batch setting. For example, if M11 is used for other purposes and cannot be set with M0~M10 together, then the MOV instruction can’t do anything.

So, I have summarized four methods that enable batch placement of components.

Method 1: WOR instruction.

Use the or instruction to set the components in batches. Use a set of 11 high-order binary numbers to perform an OR operation with K4M0 and store the result in K4M0. The benefit of an OR operation is that the 0 bits in the binary are not reset to other components.

16-bit binary number: 0000 0111 1111 1111

Convert to hexadecimal as: H07FF.

The decimal is K2047.

It takes 11 scan cycles to complete all set, which can be done in one cycle using the FOR\NEXT loop instruction.

Method 2: SET+V instruction.

Note: The [SET M0V0] command can only be used in the FX3U series, and the FX2N series is not available.

Method 3: BON+V instruction.

Method 4: SFTL (SFTR) instruction.