LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add data problem

Hi,

 

I am acquiring multi channel data from a DAQ into a while loop. I am trying to add values from each iterations to the previous ones and writing the final 2D array into a file. With help from Dennis I was able to figure out how, but this apporach is working only on one channel and if i add more than one channel my vi only output the first channel. Pic of Vi is attached.

 

Thanks,

Sine

0 Kudos
Message 1 of 11
(3,079 Views)
bumpSmiley Sad
0 Kudos
Message 2 of 11
(3,049 Views)
bumpSmiley Sad
0 Kudos
Message 3 of 11
(3,027 Views)

Hi Sine,

the code works, but you have to initialize the shiftregister with the same size of data you read from the DAQ function.

I tried it like in the attached example. Maybe there is also another solution, but this works also.

 

Mike

0 Kudos
Message 4 of 11
(3,015 Views)

Hi Mike,

 

Thanks for your reply. I am still not sure how to initialize the shiftregister. In your "example.png" what are these blocks that you have connected. I am new to labview and only know how to use express vis yet. I understand as I am acquiring multichannel data I have to initialize shift reg. with 2D array but I don't know how.

 

Thanks,

Sine

0 Kudos
Message 5 of 11
(2,990 Views)

Place a Convert to Dynamic Data function on your block diagram. Select Single Waveform as the input data type. Right click on the input and select 'Create Constant'. The other function is the Merge Signals.

 

LabVIEW Training

0 Kudos
Message 6 of 11
(2,974 Views)

Hi Dennis,

 

Your's and Mikes suggestion is working, now I can see both the channels. But now time column is all empty. When I try to write the data to a file, all the entries in the time column are zero. In the earlier case when I was getting only one channel out (without connecting anything to shift register, pic attached in first post), time column was there.

 

Thanks,

Sine

0 Kudos
Message 7 of 11
(2,958 Views)
bump
0 Kudos
Message 8 of 11
(2,939 Views)

Please stop doing the 'bump'. Your question will eventually get answered. What you have to understand is that most veteran LabVIEW programmers do no use the assistants/express VIs and do not use dynamic data.

 

It looks like when the shift register gets intialized, the Append Signals does not use the start time or dt from the DAQ Assistant. You can opne the Append Signals and modify the VI. You could also place a single DAQ Assistant outside the loop and wire it's output to the shift register to correctly initialize it. That would be the simplest though I'm sure you could create a cluster with the correct values so that everything would work.

Message 9 of 11
(2,933 Views)

Hi Dennis,

 

I am new to labview just started around 4 weeks ago, a labview guy in our research group suddenly quit and I have to help till they find his replacement. Currently due to my limited knowledge I can only use express vi's.

 

It seems there is not much that can be changed in Append Signal Vi (pic attached). When you say "place a single DAQ Assistant outside the loop" can we have multiple DAQ asst on the same VI? how can I use its output to initialize the shift register correctly?

 

Thanks,

Sine

0 Kudos
Message 10 of 11
(2,922 Views)