LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

storing output into a array problem

Solved!
Go to solution

Hello,

 

I am trying to store the analog data into a array and then save it as a csv file. But due to some reason I am getting only 1 value in my saved file. Please look at attached pic of the block diagram. I can't move the save file block in the while loop as writing process (0.05 sec) is slowing down the acquisition rate. I am trying to store all the output values into one big array and at the end save all the values into one file. But array seems not to be appending 😞

 

Sine

0 Kudos
Message 1 of 20
(3,606 Views)

You're only getting one datapoint because that is all you are saving. The insert into array function is building an array with exactly one element in it, the array index function then extracts the one data point and saves it to a file. Use auto indexing to accumulate all the data values that you read and then save the array to the file.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 20
(3,602 Views)

You do NOT want to build an array of dynamic signals.

 

I avoid dynamic data like the plague and don't use express VIs you yuo might want to just use the Append Signals function and wire the result of that out through the loop.

Message 3 of 20
(3,594 Views)

Mike thanks for your reply. As per your suggestions I tried enabling autoindexing, but it is giving me another error (error pic and vi are attached).

 

Thanks,

Sine

Download All
0 Kudos
Message 4 of 20
(3,558 Views)

What about my answer did you not understand? DO NOT CREATE A DYNAMIC DATA ARRAY!

 

Either convert the dyanmic data to something else or use my suggestion.

Message 5 of 20
(3,550 Views)

Hi Dennis,

 

I tried your suggestion, but some how can't make it to work. I am attaching the error pic and the vi. Please note that I have enable the auto indexing, if I disable it again, the error goes away but I am only left with the one iteration values.

 

Thanks,

Sine

Download All
0 Kudos
Message 6 of 20
(3,543 Views)

Hi Labview.edu,

 

Dennis is correct. You want to avoid the dynamic data type (the blue wires) in this instance. I think the easiest thing to do is wire the output of your DAQ Assistant into a Convert from Dynamic Data (set it up to convert to waveform data, for instance) and that to the indexed exit tunnel.

 

Try that and you should be ok :).

Message Edited by JeffL on 02-27-2009 10:38 AM
Jeff | LabVIEW Software Engineer
0 Kudos
Message 7 of 20
(3,525 Views)

With autoindexing disabled, I would check if the Append Signals function is configured correctly.

Message Edited by Dennis Knutson on 02-27-2009 09:49 AM
0 Kudos
Message 8 of 20
(3,519 Views)

Hi Dennis,

 

There is not much to configure in append signal function, see attached pic.

 

Thanks,

Sine

0 Kudos
Message 9 of 20
(3,498 Views)
Solution
Accepted by topic author labview.edu
sorry but I didn't look closely at what you were doing. You still need a shift register so that a new result will be appended to a previous result.
Message 10 of 20
(3,485 Views)