zankorel
Member
Hi All,
I have relatively obscure problem with floating point numbers.
My setup is a CompactLogix with a Prosoft MVI Modbus TCP Card. The Prosoft card is retreiving a floating point number from a remote device via Modbus TCP and transferring it to the Compactlogix CPU via the backplane. i then use a CPS instruction to convert the two INT's into a REAL datatype.
Somewhere along the line the data is being corrupted (or timing is screwing up) and the result is that i get a 1.#QNAN (ie not a number) error occasionally.
What i need is a way to detect that the data has errored so i don't use it until it becomes good again. Does anyone have any ideas? Ive tried GRT > 0, but that allows a QNAN through.
I have relatively obscure problem with floating point numbers.
My setup is a CompactLogix with a Prosoft MVI Modbus TCP Card. The Prosoft card is retreiving a floating point number from a remote device via Modbus TCP and transferring it to the Compactlogix CPU via the backplane. i then use a CPS instruction to convert the two INT's into a REAL datatype.
Somewhere along the line the data is being corrupted (or timing is screwing up) and the result is that i get a 1.#QNAN (ie not a number) error occasionally.
What i need is a way to detect that the data has errored so i don't use it until it becomes good again. Does anyone have any ideas? Ive tried GRT > 0, but that allows a QNAN through.