Pages - Menu

July 25, 2020

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.













No comments:

Post a Comment