LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition using NI cDAQ 9191

Hi All, I am collecting signals using NI cDAQ-9191, that are transmitted to PC using module 9205. I made a custom made program in LabVIEW 14 to save the data.

Terminal configuration is "Differential", data acquisition mode is "continuous", samples to read is 100, sampling rate is 1kHz. Attached is the program.

When I try to save the data for "n" seconds, i got "n x 10" files, each file contain 100 samples only. (If I change the samples to read to 200, i will get "n x 5" files). Why this is so? Is it the limitation of hardware?

Further, when I used chart to display data, it stores 100 samples and then display them, then next 100 and show them. Does cDAQ-9191 transmits 100 samples at a time (100 is samples to read)

if possible, kindly give reference to some white paper or manual from NI.

0 Kudos
Message 1 of 36
(4,048 Views)

Open "save file" settings and change to uppend

Снимок.PNG

0 Kudos
Message 2 of 36
(4,045 Views)

Probably the question was not explained properly.

my program generates only one file, but there are sub-files, called as "groups" in TDMS file hierarchy. It actually creates several sub-files inside a tdms named untitled1, 2 3 ..... Each subfile named "untitled" contains 200 samples as clearly seen in figure. I already chosen 200 samples to read in my cDAQ assistant.

0 Kudos
Message 3 of 36
(4,029 Views)

Hi Jawad,

 

my program generates only one file, but there are sub-files, called as "groups" in TDMS file hierarchy

So why do you call them files/subfiles, when they are groups? Use the correct wording as is used in the LabVIEW help!

 

It actually creates several sub-files group inside a tdms named untitled1, 2 3 .....

Yes, each iteration of your while loop adds a group to the TDMS file.

That's how TDMS and that ExpressVI works…

 

Each subfile named "untitled" contains 200 samples as clearly seen in figure. I already chosen 200 samples to read in my cDAQ assistant.

Yes, in each group the signals have 200 samples - as you have configured in the DAQ assistent.

 

So what is your problem?

Everything works exactly as you have it programmed to work!

 

General comment:

ExpressVIs work as intended: they were designed with certain assumptions on their use case.

When you need a different "use case" then you have two options:

- change the settings of the ExpressVI to fit your needs

- get rid of the ExpressVI and use "plain" LabVIEW functions - with way more options to adapt to your needs!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 36
(4,017 Views)

hi there,

I am a novice to lab view and want to dispaly and save data from cDAQ 9191. I have developed two programs developed. First to display the realtime data and second to save data. I have attached the code for both. The first one is to dispaly real time data. Second code is to store data. I have two questions :1) Please check weather the first code really displays real time data?

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.

 

In fact i am using two codes separately because i cannot combine the features of both at once. ( displaying data with continuous sample mode and saving with N samples mode)

 

Please help to solve this problem  

Download All
0 Kudos
Message 5 of 36
(4,005 Views)

Thanks GerdW for response.

The problem is simple. I want to save the data in one file (no group), whereas at the same time, want to see variation in data.

I want to save the data of 10 sec in one file, and at the same time, want to view the data updated after every 100ms (100 samples).

0 Kudos
Message 6 of 36
(4,012 Views)

just couldn't edit my post here. I'm new to this environment, so please accept my apologies.

0 Kudos
Message 7 of 36
(4,010 Views)

Hi Jawad,

 

I want to save the data in one file (no sub-files groups), whereas at the same time, want to see variation in data.

Each TDMS files consists of groups! You need to have atleast one group…

 

I want to save the data of 10 sec in one file, and at the same time, want to view the data updated after every 100ms (100 samples).

So read 100 samples 100 times (=10s/100ms) to get 10k samples in total. Then save those 10k samples into one group of your TDMS file…

(Things can get very easy once you get rid of ExpressVIs. :D)

Best regards,
GerdW


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

Hi irsa,

 

could you please discuss the problem with your collegue Jawad, before you post the very same VI?

 

No need to create several threads for the very same problem!

Best regards,
GerdW


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

Well Gerd,

Thanks for response.

Irsa is senior and working on another aspect now.

She handed me over these files, and i tried for several weeks understanding this issue. I discussed it with some other people and ultimately dropped here for an answer with proper reference.

The problem is very simple, but after going through several documents and forums, could not find a satisfactory answer. If you can see my post, i asked about reason, "why this is so?" you answered its because I programmed it like this. Then I asked, how should I program to solve my problem. Well, I discussed these things with her previously, and end up with no solution.

looking for solution, not being rolling stone.

0 Kudos
Message 10 of 36
(3,996 Views)