LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why i get different value when subtracting two elements of different arrays then the actual value in a timed loop

Hi Everyone
 
I have a probem in substracting the two elements of two different  1-D arrays. The problem is, I am taking out data from a CCD camera which gives me data in form of 2-D array. So i select 1-D array out of it. Now this CCD output is in a timed loop, hence i am getting data in each loop. I select a perticular array output of the CCD and this is then passed to shift register and in all the loops later on, one of the element of the output array of the CCD is substracted from the same indexed element of the selected array. For reference i have pasted the snap shot of the block diagram. In this snap shot you see three probes. The value at the prob 1 is 232, at probe 2 is 255 and at 3 is 4294967273, where as actually i sould have a value of -23 since i am substacting prob 1 and probe 2 values. Since the value of probe 2 will always remain at 255 as i have fixed it by choosing an array form CCD and i checked the value of probe 1 which never goes above 255 so why do i get this false value here.
 
Can you please help me in problem.

Regards
Chauhan
0 Kudos
Message 1 of 3
(2,401 Views)
Your data is U32 (unsigned integer) which does not have negative values. According to unsigned integer math, "negative" results will wrap.
 
You need to work in a datatype that is appropriate for what you want to do. How many significant bits do you have in the raw data?


Message Edited by altenbach on 03-17-2008 11:15 AM
Message 2 of 3
(2,393 Views)
Thanks dear

It solved my problem.

Regards
Chauhan
0 Kudos
Message 3 of 3
(2,377 Views)