LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital table doesn't match its own data converted to array

I have a large digital table (over 5 million rows, 1 column), which was produced by comparing data with labview's "DTbl Digital to Digital Comparsion.vi," and it appears that some data gets lost when I convert it to an array. The overall program is bigger, but I've distilled my question to a simple example:

 

The VI has the following block diagram:

block diagram.png

...which is attached to this posting. It's almost 10MB when unzipped, because it contains the large data set.

 

On the front panels below, you can see that the data between the table and the array match up, both at the beginning of the data and at indices in the 400k range. (The data is sparse, mostly 0s, so matching the 1s is what I'm trying to do.) Green lines show where the 1s match up at corresponding indices.

 

matches first 1.png

 

matches into 400k.png

 

Then somewhere after the 400k range, things fail to match up:

mismatch at 500k.png

 

This is confusing me, and I'm hoping someone else can shed some light on it. Certainly, when datasets get big, things often get weird and unruly. Is this a bug in LabVIEW? I am running LabVIEW 2010 SP1 (versoin 10.0.1) on a PXI-1031 on Windows XP SP3. 

 

Can anyone else reproduce this behavior?

 

The program that it's in acquires digital data from a PXI-6259, and then compares the data against expected results. The peculiarity described above makes it appear as though the vectors are failing on X or "don't care" rows.

 

Thanks in advance!

-Arthur

0 Kudos
Message 1 of 4
(2,377 Views)

A little more information: the array overall size is smaller (by 6) than the number of samples in the digital table/waveform. I don't know why I didn't think to check that sooner. 

 

So, now my question is, why is the array size smaller than the sample size of the source data?

 

sizes are different.png

0 Kudos
Message 2 of 4
(2,375 Views)

Hi Artybear,

 

Where did the Digital to Digital comparison vi come from?  I'm not finding it in my installation, but that certainly doesn't mean that it doesn't exist.  I'd also like to know how you're calculating the number of samples?  It looks like something is going wrong in making the sample size/test vector result.  

 

I used the "transitions" entry of the bundle that appears to follow the index of the array, and found a couple of trouble spots.  Ultimately, I found that some values are missing.  For example, element 449999 does not exist in the Test Vector result.  So the "number of samples" and the array size don't match up, and the array entries are off after the 'missing' element.

 

Without seeing how the Test vector result is calculated, I can't say why these values are missing, just that they are and that is what is causing this discrepancy.

 

Regards,

 

-Dave C

Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(2,344 Views)

Hi Dave,

 

The VI that is producing the data is called "Digital Comparison.vi" in the tool pallet. It's a polymorphic VI, and I'm using the Table-to-Table version. The data from there was also routed through "Append Digital Samples.vi" in a loop to concatenate several successive data acquisitions from the PXI-6259.

 

For the time being, I have worked around this by converting my data to array form in the loop, and then just working with the appended array data. That is giving me good results. 

 

-Arthur

0 Kudos
Message 4 of 4
(2,337 Views)