September 6, 2020

Explain NEG instruction in the PLC using an example.

Explain NEG instruction in the PLC using an example.

Application:-Understand the concept of NEG instruction in the PLC. Write the PLC program using ladder diagram language to understand the concept.


Diagram:-




Explanation:-

The negative instruction is used to invert the sign of the arithmetic value. It’s generally used to invert the sign of the value in the programming. So here we understand this instruction by example.

For explanation purpose, we can take the input register we can enter a value from the HMI and can see the result of this instruction. Take MW 10 register for input and link with HMI input I/O field and also take one output word address MW12 in the output field so we can monitor value in the display.

 

PLC program:-

Write the ladder program for NEG instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC a system like S7-1200, S7-1500, or any other PLC which can support this instruction. In our application, we have used S7-1200 PLC for reference.

M Memory:-

Input value:-MW10

Output value:-MW12

Network 1:- NEG instruction operation


 









PLC program Explanation:-

In network 1, we have used NEG instruction. Here MW10 register is for input value and it is linked with the HMI input I/O field so if the user will enter value 10 in the HMI, it will be inverted into -10. This result will be stored in the MW 12 register so the user can monitor in the HMI. 





1 comment:

  1. i read your blog which was informative and knowledge full i hope you will publish more blog like that
    plc courses in lahore

    ReplyDelete