Some commonly used function instructions of Mitsubishi PLC

Publisher:清新生活Latest update time:2022-04-21 Source: elecfansKeywords:Mitsubishi Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

(D) CMP (P) Comparison---Compare the data of the two source operating elements algebraically, send the result to the target element, and determine the state of the target element.


Source operating element: K/H KnX KnY KnM KnS TCDV/Z


Target component: YMS

Format: LD X0

CMP(P)K100 C20 M0

When X0 changes from OFF to ON: When K100>C20 current value, M0=1

When K100=C20 current value, M1=1

When K100 < C20 current value, M2 = 1

When CMP is executed in a continuous manner, it is executed once per scan cycle when the conditions are met.


(D) ZMP (P) Interval comparison--------Compare a data with the data interval of two source elements, send the result to the target element, and determine the state of the target element.

Source operating element: K/H KnX KnY KnM KnS TCDV/Z

Target component: YMS

Format: LD X0

ZCP(P) K100 K120 C30 M3

When X0 changes from OFF to ON: When K100>C30 current value, M3=1

When K100≤C30≥K120, M4=1

When K120 < C30 current value, M5 = 1

When ZCP is executed in continuous mode, it is executed once in each scan cycle when the condition is met.

(D) MOV (P) Transfer--------- Transfer the data of the operating component to the target component.

Source operating element: K/H KnX KnY KnM KnS TCDV/Z

Target components: KnY KnM KnS TCDV/Z

Format: LD X0

MOV(P) K100 D10

When X0 changes from OFF to ON, 100 is transferred to D10.

When MOV is executed in a continuous manner, it is executed once in each scan cycle when the condition is met.

For 32-bit data, use DMOV to transfer, and use two components with adjacent component numbers to form a component pair. The first number of the component pair can be an odd number or an even number, but to avoid errors, it is recommended to use an even number as the first number of the component pair.

When the transfer instruction is executed, the constant is automatically converted into a binary number and stored in the target element.

SMOV (P) shift transfer--------Convert the data of the source component into BCD code, then shift the BCD code as required and transfer it to the target component.

Source operating element: K/H KnX KnY KnM KnS TCDV/Z

Target components: KnY KnM KnS TCDV/Z

m: The value range of KHK/H is 1-4, that is, the value of D1 cannot exceed 9999

n: KH

Use format: such as D1=1685 D2=0

XO

SMOV(P) D1 K4 K2 D2 K3

When X0 changes from OFF to ON: convert D1=1685 to BCD code 0001 0110 1000 0101

D2=0 is converted to BCD code 0000 0000 0000 0000

Then move the BCD code of D1 from the 4th bit to the right 2 bits to the 3rd bit in D2, and the 1st and 4th bits remain unchanged. At this time, D2 is 0000 0001 0110 000, D2=160

When SMOV is executed in a continuous manner, it is executed once per scan cycle when the condition is met.

(D) CML (P) Invert and transfer----------Convert the data in the source element into a binary number, invert it bit by bit (0→1, 1→0), and transfer it to the specified target element.

Source operating element: K/H KnX KnY KnM KnS TCDV/Z

Target components: KnY KnM KnS TCDV/Z

Format: For example, D0=11

XO

CML(P)D0K1Y0

When X0 changes from OFF to ON: first convert D0 = 11 to binary 1 0 1 0, then invert it to 0 1 0 1

Then the output of K1Y0 is Y0=0, Y1=1, Y2=0, Y3=1

When CML is executed in a continuous manner, it is executed once in each scan cycle when the condition is met.


Keywords:Mitsubishi Reference address:Some commonly used function instructions of Mitsubishi PLC

Previous article:Checking Siemens PLC Program
Next article:What are the advantages of brushless DC motors

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号