tracking position with real values

ChadOut

Member
Join Date
Jan 2013
Location
Texas
Posts
1
I am trying to track position with Siemens ladder logic.

I have only a (real value) from HMI.

Using ADD_R


If input 1 is -1000

and input two is +2000


will out be null or +1000 ?
 
Last edited:
I am trying to track position with Siemens ladder logic.

I have only a (real value) from HMI.

Using ADD_R


If input 1 is -1000

and input two is +2000


will out be null or +1000 ?

It will be -1000.0 + 2000.0 = 1000.0 = +1.0000e+3)

You might experience rounding errors like +9.99999e+2 or 1.000001e+3.

So you must never compare a real value on sharp equality, it must be compared within dead band limits.

Kalle
 

Similar Topics

I've looked through the posts on this topic and seen some pretty good ideas on how to do this. I've written a routine to track pallets along a...
Replies
3
Views
4,533
Hey guys..I'm taking a PLC class and one of the examples in the Math Instructions chapter involves using the ADD, SUB, GRT and LES instructions...
Replies
4
Views
4,807
I am attempting to reject a bottle If the label fails. The rejection works fine at normal line speed but at low speed the rejector fires (air...
Replies
35
Views
1,143
Is it possible to gather OPC data through a 1783-NATR? Searching around, it sounds like OPC data might be blocked by any NAT... Is there any work...
Replies
2
Views
246
Hi All. I have a very specific question about tracking using an encoder and bitshift register. We would like to use a Compact or Control Logix PLC...
Replies
40
Views
1,718
Back
Top Bottom