03-02-2009 01:13 PM
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
03-02-2009 08:43 PM
03-03-2009 07:47 AM
03-03-2009 08:11 AM
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
03-03-2009 11:39 AM
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
03-03-2009 12:17 PM
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.
03-03-2009 01:50 PM
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
03-03-2009 04:35 PM
03-03-2009 04:55 PM
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.
03-03-2009 05:46 PM
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