LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert 1d-array digital waveform to string

Hi.

 

My problem is converting a 1d-array digital waveform (output from Daq assistant) into a string that can be written to a text file.

 

I'm currently using a producer/consumer structure, but dont know how to store the data in the consumer loop.

 

Right now Im using HWS express save, but I'd like the possibility to edit the files after a measurement has been done. eg. cut out the irrelevant part of the measurement. 7

 

So how do I solve this problem?

 

regards

Carl Zandén 

 

 

 

 

0 Kudos
Message 1 of 6
(4,728 Views)

Hi Carl,

you can use the "get digital data componets" function to get a "data" array and a "transition" array. You can transform both arrays to string arrays and store them.

 

Mike

0 Kudos
Message 2 of 6
(4,725 Views)

Hi

 

I don't really see how to do that. Im getting continous que elements and I want to add correct channel data in the correct coloumn. But I don't really understand how to do that. I know of the digital components function where I can retrieve Y component (which strangely is a 2d-array?) But how do I get them to add upp in a correct manner in a string?

 

Do I have to take each waveform out of the 1d-array first and do the manipulation and then in some way stitch them together?

 

Regards

Carl Zandén 

 

 

 

0 Kudos
Message 3 of 6
(4,700 Views)

Hi Carl,

you can use the digital functions in the receiver loop, tTransform your data into string and store your strings in a shiftregister.

 

Mike

0 Kudos
Message 4 of 6
(4,682 Views)

Hi!

 

Thank you very much for trying to help me. Sorry that I don't understand how you mean.

 

Do I have to use 1 shift register for every channel? And then put them together after the consumer loop? Otherwise I don't see how to put them in the right order. The problem is getting the next que item in the correct position.

If you could show me with a simple example I would be very grateful.

 

Regards

Carl Zandén 

 

 

0 Kudos
Message 5 of 6
(4,671 Views)

Hi Carl,

it's only one solution. Another solution would be to insert the transformation between the receive loop and the store vi. You only have to use the "get digital components" function and create strings out of the array.

 

Mike

0 Kudos
Message 6 of 6
(4,668 Views)