July 25, 2020

Explain check validity instruction using the example

Explain check validity instruction using the example

Application:-.Write PLC program for an explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.

 

Diagram:-




Explanation:-

Check arability instruction is used to check entered values in the operands. For example, we want to make the multiplication of two values and both values are INT. Here we will check both the entered value are INT and we will ensure these via instruction.


PLC program:-

Write the ladder program for above application using ladder diagram language. Here for ladder logic we can use any supported PLC system like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamps are digital outputs. Value 1 and value 2 are input words.

M Memory:-

Value 1:-MD20

Value 2:-MD24


Result: - MD28


















PLC program Explanation:-

In network 1, we have used check avaibility instruction in multiplication, here we are using MUL instruction for multiplication of two values. Two values are INT but we need to verify with instruction.

So here we have used two INT values in MUL instruction and OK instruction will check both the values (value 1 and value 2) are INT or other data types.

If both value in MD 20 and MD24 are INT, it will allow multiplication or not.









Explain Out range instruction or value outside range instruction using example.

Explain Out _range instruction or value outside range instruction using example.

Application:-Explain OUT_RANGE instruction using an example. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.

 

Diagram:-



























Explanation:-

We can use OUT_RANGE (Value outside range) instruction when the variable is not within a specific range. You can specify the value range for the MIN and MAX inputs. The OUT_RANGE instruction will compare the variable value with the values of MIN and MAX value and sends the result.

For an explanation, we can consider a simple example so we can understand easily. Assume one application in which we need to operate a green lamp if the actual temperature is not between MIN and MAX value which can be set by HMI. And if the actual temperature is not in between MIN and MX value, the alarm lamp (temp not in range) will be ON as shown in the figure. Assume analog scaling of the temperature value, so as sown in figure measured value is 10 degree and MIN limit is 20 degree and the MAX degree is 50 degrees. So for the above example temperature is not within range and the alarm lamp (temp not in range) will be ON.

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic we can use any supported PLC system like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamps are digital outputs. MAX and MIN values are input words.

Digital Output:-

Temp.not in range=Q0.0

M Memory:-

Actual temp. =MW2

MIN temp.:-MW10

MAX temp:-MW20













PLC program Explanation:-

In network 1, actual temperature is measured or stored in MW 2 and in MIN we can set minimum range of the temperature also in MAX we can specify the maximum applicable range of the temperature.

So here we have used OUT_RANGE instruction which will compare a variable with MIN and MAX values and if the variable value is outside range, alarm lamp (temp. out of range) will be ON.

Both instruction IN_RANGE and OUT_RANGE instructions can be used for comparison purposes.













Explain IN Range instruction or value within range instruction using example


Explain IN Range instruction or value within range instruction using example

Application:-Explain IN_RANGE instruction using an example . Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.

 

Diagram:-















Explanation:-

We can use IN_RANGE (Value within range) instruction when the variable is within a specific range. You can specify the value range for the MIN and MAX inputs. The IN_RANGE instruction will compare the variable value with the values of MIN and MAX value and sends the result.

For an explanation, we can consider a simple example so we can understand easily. Assume one application in which we need to operate a green lamp if the actual temperature is between MIN and MAX value which can be set by HMI. And if the actual temperature is not between MIN and MX value, operate a red lamp as shown in the figure. Assume analog scaling of the temperature value, so as sown in figure measured value s 50 degrees and MIN limit is 45 degree and MAX degree is 55 degree. So for the above example temperature is within range and the green lamp should be ON.

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic, we can use any supported PLC system like S7-1200, S7-300, S7-1500, or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamps are digital outputs. MAX and MIN values are input words.

Digital Output:-

Temp OK lamp=Q0.0

Temp not ok Lamp=Q0.1

M Memory:-

Actual temp. =MW2

MIN temp.:-MW10

MAX temp:-MW20









PLC program Explanation:-

In network 1, actual temperature is measured or stored in MW 2 and in MIN we can set minimum range of the temperature also in MAX we can specify the maximum applicable range of the temperature.

So here we have used IN_RANGE instruction which will compare a variable with MIN and MAX values and if the variable value is within range, green lamp (Q0.0) will be ON and if not then red lamp (Q0.1) will be ON as shown in network 2.


Explain less than (<) instruction using example

Explain less than (<) instruction using the example

Application:-Explain less than instruction in the PLC. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.


Diagram:-

































Explanation:-

Consider a simple temperature controller example for an explanation of less than instruction in the PLC. Here we have taken simple HMI (Human Machine Interface) for display and programmable Logic Controller (PLC) for programming. Consider one temperature control which is displaying the temperature given by temperature sensor, here we haven’t considered analog signal calculation and scaling so we can directly consider actual temp value in the PLC. Here if the actual temp value in the actual temp box is less than set temp, temperature indication will be ON.

If the set temperature is 200 degree and temperature read by temperature controller is 199 degrees, the lamp should be ON because 199degree is less than the set temperature.

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic, we can use any supported PLC system like S7-1200, S7-300, S7-1500, or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamp is a digital output. Set temp is the input word.

Digital Output:-

Temp Lamp=Q0.0

M Memory:-

Set temp.:-MW10

Actual temp:-MW20















Table for an explanation, so the lamp will be ON if the actual temperature is less than the temperature.

Actual temp

Set temp

Result

199

200

1

200

200

0

        202

200

0




PLC program Explanation:-

In network 1, actual temperature (MW10) will be compared with the set temperature (MW20). So if the measured temperature (MW10) is less than set temperature (MW20), the temperature indication lamp (Q0.0) will be ON.

In less than (<) instruction, two operands are compared, we can set data type in comparator instruction.



Explain analog value scaling in the PLC using an example.

Explain analog value scaling in the PLC using an example.

Application:-Make PLC program to scale analog value. Temperature controller value in the display so it can show the actual temperature.



















Explanation:-

Assume one temperature controller system in the plant. The temperature controller is used to controlling the temperature. Here temperature controller is measuring temperature 200 degrees and we want to display this temperature in the HMI. So we need to scale the voltage value.

Generally in the Siemens PLC count value is 0 to 27648 according to voltage value in the range between 0 to 10 V DC. So here we need to scale 0-10 VDC voltage into count to show the actual temperature.

The temperature controller is generating voltage in the temperature range between 0 to 400 degrees maximum. Hence if the temperature is 0 then generated voltage by temperature controller I 0 and if the temperature is 400 degree then voltage generated by controller is 10 VDC.

 

So the calculation for the controller,

If the measured temperature is 200 degree then generated voltage?

Measured temperature X Maximum voltage/ maximum temperature

So,

Output voltage from the controller=200 x 10/400=5 V DC

 

 

 

 

Voltage to PLC count scaling, equation,

Measured PLC count=Measured voltage x maximum PLC count/ Maximum voltage

                                  =5 x 27648/ 10

                                  =13824

Calculation for HMI

Here the measured voltage is 5 V dc from the temperature controller

So

Actual temperature scaling equation for HMI

              =Measured count X max temperature / maximum PLC count value

              =13824 x 400 /27648

              =200 degree

So HMI will show 200-degree temperature.

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic, we can use any supported PLC systems like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

 M memory:-

Start switch S1=I0.0

Digital Output:-

Measured count=MW10

Calculated value=MW12

Actual Temperature=MW14








PLC program Explanation:-

In network 1, we have done the multiplication of measured value and maximum temperature value and stored the result in MW12.

In network 2, after multiplication, we have done the division of calculated value and the maximum count value of PLC and stored result in the MW14.

The above calculation method is the general method for scaling, it can be used for any PLC. Some PLCs are providing special functions or special instructions for scaling. 






Sequential operation of two solenoid valves.

Sequential operation of two solenoid valves.

Application:-Operate two valves in sequence. There are two valves in the system and we need to operate it in sequence, hence first valve 1 will be on and after the 20s the second valve will be ON.




Explanation:-

As per the above application, there are two valves in the system and we need to operate them in sequence. So when the start switch is pressed valve 1 will be on and the second valve will on after a 20-second delay. In this case, we need to use on delay tier because we are giving a delay between two valves.

PLC program:-

Write the ladder program for the above application using ladder diagram language. Here for ladder logic, we can use any supported PLC system like S7-1200, S7-300, S7-1500, or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application start switch is a digital input and valves are the digital outputs. To define digital input address and output address as per below explanation,

Digital inputs:-

Start switch S1=I0.0

Digital Output:-

Valve 1=Q0.0

Valve 2=Q0.1















PLC program Explanation:-

In network 1, we have used NO contact of start switch 1 (I0.0), so when the switch is pressed valve 1 (Q0.0) will be on immediately.

In network 2, we have used No contact of valve 1 (Q0.0) to operate valve 2 (Q0.1). Here we used on delay timer to provide a delay between two valves.