LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rebuild 1d array in single 32 bit integer

Hi, i have a problem

 

in my measurement i get permanently measurement data as an 1d arrays. This data goes in a queue, and from there i want to unpack this array in a singel 32 integer word stream and this very very fast, because the measurement data input is up to 50 MHz.

 

The question is: How can i unpack this 1d array in a single 32 word stream???

 

THX for answer

 

there is a picture, where you can see the measurement data in put in this queue and the data output.

0 Kudos
Message 1 of 6
(3,625 Views)

The data is allready in a DoubleWord (unsigned) format.

What kind of data-type do you want to store to disk?

If you want to sent the data over a serial connection (TCP/IP) you can use 'Typecast'

You propably want to turn of the 'Prepend Array Size?' boolean on the top of the write to file primitive.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 6
(3,616 Views)

THX for the answer,

at first i don't need to send the data via ethernt.

i only want to unpack the 1d array in a 32 bit integer word by word to delete some bits from each 32 bit word...like in the picture.

here i open this file (this 1 d array and i can easy unpack this array in single words, but it is not possible to do it direkt in the record-programm (last picture)...why??

0 Kudos
Message 3 of 6
(3,604 Views)
sorry here is the new picture, ( the programm which opens the data)
0 Kudos
Message 4 of 6
(3,603 Views)

Hi chefcomma...,

instead of transform your data to bool, using the delete from array function and transfer it back, you should use the logical shift function.

 

Mike

Message 5 of 6
(3,572 Views)

As Mike already indicated, all you need is a "-3" shift (or scale by 2^-3). On integers, both are identical, so use the one that better documents the code for readability.

 

You actually only have an array with a single element, so you should leave the "count" unwired to get a scalar output instead. No need to index out later. (top image)

If you want to read the entire array at once, wire a -1 to the count and do the same operation on the entire array. (bottom image)

 

Simple as that! 🙂

 

Message Edited by altenbach on 01-06-2009 09:52 AM
Message 6 of 6
(3,547 Views)