02-05-2015 12:15 PM
I am using DAQ Assistant to read linear displacement from a NI 9401 in a cDAQ 9178 chassis. On some ocassions, when I load the VI and start logging the position before there is any movement, the NI 9401 outputs values as high as 4,294,967,241. It slowly counts down and then when there is actual movement, the NI 9401starts counting the position from 0. On other ocassions, it starts normally from a position of 0. Does anyone know what this large value refers to and why it is being output?
Solved! Go to Solution.
02-05-2015 12:48 PM
I have just discovered that I have negative movement prior to positive movement which is the reason the value is counting down slowly. The initial top number that it begins to count down from is 4,294,967,295. Does this mean that this is the highest value it will count up to? If so, at that point does it go back to 0 or does it top out and stop counting?
02-05-2015 02:27 PM
Numbers like that are near the extreme values possible for an I32. I suspect that your negative movement caused a counter rollover which was interpretted as a maximum or near maximum negative number.
Lynn
02-05-2015 02:54 PM
@johnsold wrote:
Numbers like that are near the extreme values possible for an I32. I suspect that your negative movement caused a counter rollover which was interpretted as a maximum or near maximum negative number.
You are actually at the limit of U32 (unsigned 32 bit integer). So the backwards movement would cause the rollover from 0 to 4294967295 and slowly going down as you move backwards.
03-05-2015 12:53 PM
Thank you. This makes sense. This will be a problem regardless even if I use double precision so I will develop a work around.