LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition using NI cDAQ 9191

Hi Jawad,

 

you got a solution: what's wrong with that suggestion?

 

Irsa is senior and working on another aspect now.

Irsa posted the (basically) very same VI and was asking for the same problem…

 

@Irsa:

1) Please check weather the first code really displays real time data?

Yes, you get "real time" data: they are instantly displayed (after those filters) and there is no additional wait in the loop…

Please keep in mind: the term "real time" has a different meaning than you imply in your question!

 

2) I want to combine the two programs means that dispaly of realtime data and saving data in a TDMS having single group for all the data.

See my answer/suggestion for Jawad.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 36
(1,203 Views)

Hi GerdW,

the only wrong with your provided solution is that it will give me 1k groups (with the approach I'm following).

 

Then save those 10k samples into one group of your TDMS file…

 

I just stuck at this very point. How to save those 10k samples into one group? Can you please mention in code where I'm applying some wrong approach?

0 Kudos
Message 12 of 36
(1,195 Views)

Hi Jawad,

 

the only wrong with your provided solution is that it will give me 1k groups (with the approach I'm following).

What is your current approach?

How can you get 1000 groups when you (probably) try to write just 100 times to your TDMS file?

 

How to save those 10k samples into one group?

Collect the samples in an array, then save the whole array to your file ONCE.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 36
(1,191 Views)

I have collected data from 9 channels in an array but unable to write it into measurement file. The code without express VI is attached with this post. what is wrong with the code?  

0 Kudos
Message 14 of 36
(1,180 Views)

Hi Jawad,

 

The code without express VI

You still want to use a lot of ExpressVIs in your VI.

 

See this:

check.png

Jusrt 2 ExpressVIs left: "To DDT" and "Write Measurement File"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 36
(1,175 Views)

can i have the code for this?

 

0 Kudos
Message 16 of 36
(1,182 Views)

No, I didn't save the VI after creating the post…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 36
(1,159 Views)

Actually i am a novice in LV so get stuck with very small things. Can you plz name the VI used after filter in the for loop?

0 Kudos
Message 18 of 36
(1,153 Views)

Ok i have created the code same as given by you in figure. But my issue is to save all the data into one group. So that after saving the data in TDMS file format , the file should be like the second picture. Not the first picture in the attachment, which has divided data into many groups named "untitled". It would be difficult for me to process the data afterwards. What i understand is that this is due to settings of my DAQ assistant where i have "continous sample" mode, at a rate of "1000" samples per second and "100"samples to read. Hence it has divided the data into groups, each group having 100 samples. How to save the file in such a way that it saves all the samples, say 6000 or 10,000 samples in a single group?

 

0 Kudos
Message 19 of 36
(1,147 Views)

I have run the code as shown in figure given by you yesterday. It didn't resolved the issue with multiple number of groups in stored TDMS file. The TDMS still saves as a form of multiple groups not single group. The code also changed the data in waveform charts. The data waveform now looks like contaminated or carrying irrelevant information as shown in attachment "wrong waveform". But the actual data should look like "correct waveform" attachment.

I even tried to write data after storing in array, by a little bit rearrangement in the code. But problem persisted. I have attached both the codes here. Whats wrong with the code now? 

Note: code#1 is same code you created yesterday

code#2 is made by saving data in array first, and then writing to measurement file

0 Kudos
Message 20 of 36
(1,138 Views)