LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

first time using daqmx read/write

I will try to explain my application, I go to an industry install my "hardware" and start labview, I'm aquiring some values of voltage....

I need record it, because when I come back to my office I need see those values again, see the waveform again.. so I can make an analysis to my client.

 

and I can't read it again if I didn't wirte the data to a file, right?

0 Kudos
Message 11 of 18
(973 Views)

@EduU wrote:

 

and I can't read it again if I didn't wirte the data to a file, right?


yes.......

0 Kudos
Message 12 of 18
(968 Views)

@EduU wrote:

Cross, I limit the buffer size because I need do it, I need have only 7200 samples per second, this can get me some problems?



You don't need to limit the buffer.  Just leave it alone.  You are more likely to run into problems if you do limit the buffer.

 


EduU wrote:

I understand your code, but this is only to read and show in a graph, How can I save it in a file, and after when I want to see this file 

I read it again?

 

Write to a TDMS? Text? Binary? Which format is better for my application? Because the data I'm aquiring is I16.


Again, why I16 (raw data)?  Why not the actual voltages (doubles)?  Or are you actually doing Digital Ports?

 

The simplest way to log your data is with the DAQmx Configure Logging.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 18
(966 Views)

Apok, so I can write it to a text file and read it after?

 

I'm LabVIEW 7.1 I had the vi that write and read it as I16, so I didn't need make any change.

This VI can work on labview 2012 or no?

0 Kudos
Message 14 of 18
(965 Views)

@EduU wrote:

Apok, so I can write it to a text file and read it after?

 

I'm LabVIEW 7.1 I had the vi that write and read it as I16, so I didn't need make any change.

This VI can work on labview 2012 or no?


Will you still be using 7.1 or are you strictly using 2012 now?  I only ask because I'm not sure the DAQmx Configure Logging will work the LabVIEW 7.1.

 

But yes, once you save a file, you can write a viewer for it and read the data.  I am suggesting TDMS since DAQmx has a configuration to log to a TDMS file for you (makes life really easy there) and there is a TDMS viewer VI in the File I/O->TDMS palette.  All of the major coding is done for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 18
(961 Views)

@EduU wrote:

Apok, so I can write it to a text file and read it after?


yes......use the fore mentioned post( write/read from spreadsheet file.vi's) there are plenty of examples on this forum...do a search Smiley Wink

0 Kudos
Message 16 of 18
(962 Views)

Cross, I have a program based on LabVIEW 7.1 now I'm upgrading it to LabVIEW 2012, I will try this way you showed me.

 

I was talking about I16, because after I read the file I need the values of the voltages so my program can run a lot of subvi's that make some calculations.

If i read and record it direct as a waveform, can I take the values in a array after?

 

Apok, I will see if I will use spreadsheet file. 

 

In labVIEW 7.1 I have a problem that the size of the file can reach only 2gb, it's give me almost 5 hours from continuos aquiring. After that I get an error.

In labVIEW 2012, if I save it as TDMS which is the size limit from a single file?

0 Kudos
Message 17 of 18
(926 Views)

@EduU wrote:

Cross, I have a program based on LabVIEW 7.1 now I'm upgrading it to LabVIEW 2012, I will try this way you showed me.

 

I was talking about I16, because after I read the file I need the values of the voltages so my program can run a lot of subvi's that make some calculations.

If i read and record it direct as a waveform, can I take the values in a array after?

 

Apok, I will see if I will use spreadsheet file. 

 

In labVIEW 7.1 I have a problem that the size of the file can reach only 2gb, it's give me almost 5 hours from continuos aquiring. After that I get an error.

In labVIEW 2012, if I save it as TDMS which is the size limit from a single file?


You want to save as the waveform so you have all of the timing information.  Also, but using the DAQmx Configure Logging, you will get a lot of useful metadata automatically.  You can just read the analog data as a 2D array.  Again, don't use the raw (which is what gives you the I16s).  Use the converted and scaled voltages (normal read).

 

Your file size is limited by file system.  I don't remember what the modern file systems can handle, but you should be able to go beyond 2GB and easily to 4GB if needed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 18
(921 Views)