September 6, 2020

Explain MAX instruction using example.

 Explain MAX instruction using example.

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


Diagram: -









Explanation:-

Here we will understand the concept using an example. MAX instruction is used to define MAX value out of two values. So this instruction will compare two value and update the result in the output register.

For example assume we want to show MAX value out of two values. So we can take two values entry (MW10 and MW12 register for two value entry) in the HMI and one output field for output (the result will be updated in the MW14 register). In this entry field, we will enter two values here 50 and 60 so the output result will be 60.

PLC program:-

Write the ladder program for MIN instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC 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:-

IN 1:-MW40

IN 2:-MW42

OUT:-MW44

Network 1:- MAX instruction operation


 






PLC program Explanation:-

In network 1, we have taken MAX instruction. Here we are entering 50 in the MW 50 and 60 in the MW42 so the result will be updated in the MW 44 register. And it will be 60



Explain MIN instruction using example.

Explain MIN instruction using example.

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

 

Diagram:-









Explanation:-

Here we will understand the concept using an example. MIN instruction is used to define MIN value out of two values. So this instruction will compare two value and update the result in the output register.

For example assume we want to show MIN value out of two values. So we can take two values entry (MW10 and MW12 register for two value entry) in the HMI and one output field for output (the result will be updated in the MW14 register). In this entry field, we will enter two values here 50 and 60 so the output result will be 50.

PLC program:-

Write the ladder program for MIN instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC 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:-

IN 1:-MW40

IN 2:-MW42

OUT:-MW44

Network 1:- MIN instruction operation











PLC program Explanation:-

In network 1, we have taken MIN instruction. Here we are entering 50 in the MW 40 and 60 in the MW42 so the result will be updated in the MW 44 register. And it will be 50.



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. 





August 29, 2020

Explain 4:1 Multiplexer using an example.

Explain 4:1 Multiplexer using an example.

Application:-Make the 4:1 multiplexer. Write the PLC program for 4:1 multiplexer using ladder diagram language.

Diagram:-



Explanation:-

As shown in the above diagram we can see 4:1 multiplexer. S0 and S1 are the selection input for the multiplexer. So according to selection and input status output will be generated.

We can understand this concept simplified Boolean equation

Y = (S1=1 AND S0=1 AND I3=1) OR (S0=0 AND S1=1 AND I2=1) OR (S1=0AND S0=1 AND I1=1) OR (S0=0 AND S1=0 AND I1=1).


PLC program:-

Write the ladder program for 4:1 multiplexer instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC 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.


Digital Inputs:-

Selection switch 0:-I0.0

Selection switch 1:-I0.1

Input 1:-I1.1

Input 2:-I1.2

Input 3:-I1.3

Input 4:-I1.4

Digital Outputs:-

Output 1:-Q1.0


Network 1:- 4:1 Multiplexer ladder diagram



PLC program Explanation:-

In above network S1and S0 are the selection inputs.

When S1 and S0 are high or 1 and I4 is 1, output Q1.0 will be high.

When S0 is off and S1 is selected and I3 is on, output Q1.0 will be high.

When S1 is off and S0 is selected and I2 is on, output Q1.0 will be high.

When S0 is off and S1 is off and I1 is on, output Q1.0 will be high.

July 26, 2020

Explain MOD (modulo) instruction in the PLC.

Explain MOD (modulo) instruction in the PLC.

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

Diagram:-






Explanation:-

The MOD instruction is used to divide the stored value in source A by the value stored in source B. After division, it stores the remainder in the destination.

For example Source value is 7 and source B value is 2

Then the remainder is Source A /Source B=7/2=1 (Remainder value).

PLC program:-

Write the ladder program for MOD instruction using ladder diagram language. Here for ladder logic we can use any supported PLC 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:-

Source A:-MW10

Source B:-MW12

Remainder:-MW14











PLC program Explanation:-

In network 1, we have used MOD instruction. In this Source, A is divided by source b and the remainder will be stored into MW14 register.





Division of two operands using an example.

Division of two operands using an example.

Application:-DIV instruction in the PLC. Write PLC program for explanation using ladder diagram language.

Components:-Programmable logic controller, HMI panel, Ethernet cable, 24 V DC power source.

Diagram:-






Explanation:-

The subtraction DIV instruction is used for subtraction of two values for any data records to understand this instruction take one example. Consider one RTD sensor, it is giving data of temperature to the programmable logic controller in a standard format and this data is 250 degree (room temperature) so you need to calculate this value and need to divide by a factor of 10 so you will get the actual temperature.

This is a simple example for an explanation. We can use this concept in any application or any data calculation.

 

PLC program:-

Write the ladder program for DIV instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC 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:-

RTD reading:-MW10

Factor:-MW12

Actual value:-MW14


















PLC program Explanation:-

In-network 1 we have taken DIV instruction for our example. RTD sensor is reading data in the MW10 and factor entered in the MW12. Once DIV instruction will be executed, it will show results in the MW14.

Here RTD reading is 250 degree and factor is 10 so it will show 25 (250/10) in the actual temperature.


Multiplication of two operands using MUL instruction in the PLC.

Multiplication of two operands using MUL instruction in the PLC.

Application:-Explain MUL instruction in the PLC. Write PLC program for explanation using ladder diagram language.

Components:-Programmable logic controller, HMI panel, Ethernet cable, 24 V DC power source.

Diagram:-










Explanation:-

The MUL instruction is used for the multiplication of two values for any data records. For example, we want a multiplication of two values. We have taken HMI for entering data, here we have taken value 1 and value 2 are the data fields and result data field will show the result of the instruction.

Once the instruction is executed result will be displayed in the result output field.

 

PLC program:-

Write the ladder program for MUL instruction using ladder diagram language. Here for ladder logic, we can use any supported PLC 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:-

Value 1:-MW10

Value 2:-MW12

Result:-MW14











PLC program Explanation:-

In-network 1 we have taken MUL instruction for multiplication of two different values. Value 1(MW10) will be entered from the HMI and value 2 (MW12) will be entered from the HMI. Instruction is executed and generates output in the MW 14 word.

You can use MUL instruction for any application in which you need to calculate the multiplication of two values.



















































Subtraction of two operands using subtract instruction in the PLC.

Subtraction of two operands using subtract instruction in the PLC.

Application:-Explain subtraction instruction in the PLC. Write PLC program for explanation using ladder diagram language.

Components:-Programmable logic controller, HMI panel, Ethernet cable, 24 V DC power source.

Diagram:-


























Explanation:-

The subtraction instruction is used for subtraction of two values for any data records. For example, we want two subtract one value from the second value in the application like weight 1 and weight 2 and we want to show the subtraction of two weight like we want to subtract weight 1 from weight 2 and show on the HMI.

So for that, we have two take two input field in the HMI system and make weight 1 input field and weight 2 input field so the user can enter a value in the input field. And also users can monitor subtraction value in the result field.

PLC program:-

Write the ladder program for subtraction 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:-

Weight 1:-MW10

Weight 2:-MW12

Actual value:-MW14



















PLC program Explanation:-

In-network 1 we have taken subtraction instruction for the subtraction of two weights. Weight 1(MW10) will be entered from the HMI and weight 2 (MW12) will be entered from the HMI. Instruction is executed and generates output in the MW 14 word.