Outrage
Member
Hi All,
Rockwell Compact Logix processor.
I'm using an Add function that I trigger by a using an XIC instruction followed by a ONS. The add takes a value of 0.1 and adds it to my accumulated value and stores the resultant in the accumulated value therefore increasing the accumulated value by 0.1 every pulse.
I've set my accumulator tag up as a Real but I get occurances of the value reading to several decimal places i.e. 1.000001 for example. whereas I would have expected the maths to always give me only one decimal place?
This one rung forms part of an add on instruction, there is no other data manipulation of the accumulator other than writing it to zero on occasion.
Any ideas where the weird maths is coming from?
Cheers,
Lee
Rockwell Compact Logix processor.
I'm using an Add function that I trigger by a using an XIC instruction followed by a ONS. The add takes a value of 0.1 and adds it to my accumulated value and stores the resultant in the accumulated value therefore increasing the accumulated value by 0.1 every pulse.
I've set my accumulator tag up as a Real but I get occurances of the value reading to several decimal places i.e. 1.000001 for example. whereas I would have expected the maths to always give me only one decimal place?
This one rung forms part of an add on instruction, there is no other data manipulation of the accumulator other than writing it to zero on occasion.
Any ideas where the weird maths is coming from?
Cheers,
Lee