Compare SP to PV for alarm

kurt.brinker

Member
Join Date
Dec 2006
Location
In Town
Posts
263
I am setting up some alarms and one of them consists of making sure my sp and pv are within 10 degrees of each other and if they aren't for more than 10 minutes, the alarm activates. I did something like this awhile back but i am rusty.

I believe i divided the setpoint by the process variable and then put that into a limit function.
For a 25% difference either way, i would be looking at a limit value of 1.25 and .75.

Does that make any sense?
 
If you are just checking for a 10 degree difference, why not just use a Subtract function, then limit -10 to 10, and run a 10 minute timer if it's not?
 
i guess that would work too huh?


since the time i have posted, i wrote in the 25% deal and it looks like its working. Is there anything wrong with it? Your way defintaley would make it easier IMO to read if i didn't know what was going on.
 
Nothing wrong with the 25% deal if that's what you want to monitor. Only you can answer that...

However, your 25% calc as described above is backwards. You should multiply your SP by .25, then subtract and add that value from/to your SP to establish your LIM window.

If you want to do the DIV, it would be dividing your PV by your SP, then evaluating that between 0.75 and 1.25.
 
won't it work either way?

sp/pv or pv/sp

i have my low as 1.25 and my high as .75 on the limit function

for some reason i am thinking of something ron beaufort said about right and left hand limits...... i don't rememebr what though,
 
Last edited:
Well, It will make a difference

If you want to check for a 10 unit deviation.

Say your set point is 40
If your process variable is 30 (min).
PV/SP = 30/40 = 0.75 or a 10 unit difference
SP/PV = 40/30 = 1.33 or a 10 unit difference

If your PV is 50 (max).
PV/SP = 50/40 = 1.25 or a 10 unit difference
SP/PV = 40/50 = 0.80 or a 10 unit difference

So if you want to use 0.75 to 1.25, you'll have to go with PV/SP.
 
You always reference your actual to the target! That's why you divide by the SP when doing a calculated percentage. The target is the "base" of the division.
 
Kurt, you did not mention which plc you are working with, but with rslogix 5000 version 16 for control logix you can create your own alarm as add on and you can reuse it any time, anywhere.

regards,
 
kurt.brinker said:
I am setting up some alarms and one of them consists of making sure my sp and pv are within 10 degrees of each other and if they aren't for more than 10 minutes, the alarm activates. I did something like this awhile back but i am rusty.

I believe i divided the setpoint by the process variable and then put that into a limit function.
For a 25% difference either way, i would be looking at a limit value of 1.25 and .75.

Does that make any sense?

What you are describing is commonly called a deviation alarm. Some PLC brands include them as part of the PID instruction. ControlLogix does. However, the included ones are usually of the +/- a fixed amount which I don't find too useful. If the setpoint doesn't change, it will work fine but so would a standard hi/lo alarm.

What I find more useful is a deviation alarm based on a +/- percent of setpoint like you want. However, I do things a bit different than you are describing.

First off, I prefer to use GRT and LES instead of LIM. It's a preference, but I always have to look up the LIM instruction to find out how it behaves when the value is equal and when the limits are reversed etc. It's just not worth the trouble to me.

Second, I prefer the alarm limits to still be in engineering units so they can be displayed with the setpoint and PV. HiDev = SP * 1.25 and LoDev = SP * 0.75. Then just use PV > HiDev or PV < LoDev to drive the timer for the alarm.
 
Kurt, if your SP and PV are part of a PID block, there is a good chance that PID instruction is already calculating the ERror for you, which would save you a step in your alarm programming. Then you just have to use a compare instruction with that error word address.
 

Similar Topics

Help please. Im new to Omron and have a machine down. I have a compare = for barcode label scan. I've attached two pics. On the Mnemonics you can...
Replies
4
Views
586
Hi everyone! Accidentally closed it and it wont appear again. Checked and unchecked the option and seem to make no difference. Running v7.10.00...
Replies
16
Views
1,792
I'm working on an array that contains a UDT of 5 Items Array[4] DataType[0] - Part 1 - Part 2 - Part 3 - Part 4...
Replies
1
Views
801
Hi. I have 2 files where I would like to see the ladder logic differences (similar to the Rockwell compare function). I am using TISoft Siemens...
Replies
1
Views
1,226
Hello experts, I am just starting with AB programing, I have a questions regarding a compare done in an old RSlogix500 and causing me issues when...
Replies
5
Views
1,893
Back
Top Bottom