Electrically_Bound
Member
I noticed in a PLC 5/04 program I have a 1.#QNAN as a value for a floating point number. After some Googling I have come to know that QNAN stand for Quiet Not A Number - a term used in lexicon of floating point numbers. It looks like that the source of this number has been a caused by dividing 0 by 0. This plc calculates the instantaneous diameter of a roll by dividing the line speed by the winder speed (I'm simplifying this equation a bit). Now if the line stops running, I can see where you would get an impossible result since both speeds are zero.
My real concern is how does the PLC handle this condition? This value is used in different parts of the program by different types of instructions. Will the PLC just keep chugging along until the calculation no longer produces the impossible number or does it cause a fault. I'm thinking about filtering the sppeds before any math is done by effectively saying that IF SPEED = 0 THEN SPEED = .1
Any thoughts on this?
I did find a thread on this forum that discussed QNAN to some extent, but I didn't find any info on how Allen Bradley's plc's respond to this condition.
My real concern is how does the PLC handle this condition? This value is used in different parts of the program by different types of instructions. Will the PLC just keep chugging along until the calculation no longer produces the impossible number or does it cause a fault. I'm thinking about filtering the sppeds before any math is done by effectively saying that IF SPEED = 0 THEN SPEED = .1
Any thoughts on this?
I did find a thread on this forum that discussed QNAN to some extent, but I didn't find any info on how Allen Bradley's plc's respond to this condition.