Real value change detection

tidwellc87

Member
Join Date
May 2018
Location
Dallas
Posts
9
I'm working on a function block program in Unity Pro and I'm trying to detect when a real changes in value. Basically, want to make a bit true if the real changes in any direction by any value. Any ideas on how to do this?
 
Store the existing value on a scan, do a compare on the next scan and raise a bit if it is different for some period of time?

Some more code around how often you store the value for compare, etc.
 
Where is the source of this REAL value coming from ?


If it is an analog input, they invariable change all the time, due to noise pickup, sensor drift, etc.


You will need to specify to the function block a value that is used to "filter" the changes, in other words, specify the minimum change before you flag it as a valid change.
 

Similar Topics

OK I'm ashamed that I'm here asking this as I think in 23 years I would have ran into this before. But here we are. Created an AOI to manipulate...
Replies
6
Views
1,963
Hi, I am currently reading a Modbus value from a Device, through TCP, going into our 400 series plc. The Modbus value is a real value, and it is...
Replies
27
Views
7,432
Hi all, Let's say we have a nice real (analog) value that has already been scaled with an SCP in Studio5000. Is there a slick method to...
Replies
6
Views
1,558
My company imposes programming standards and insists on using AOIs for AI, AO, DI, DO points. I like AOIs and use them as subroutines when I have...
Replies
10
Views
2,998
Hi Guys, i'm begginer and i'm trying to convert a real value (not fix value) to BCD. It works if i put fix real value but when i put variable...
Replies
2
Views
1,913
Back
Top Bottom