LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating DAQmx data with timestamps w/ export to Excel File

Hello! I'm looking to take measurements of a few analog channels and output them to an Excel file with timestamps. Pictured is my current "setup"; however, I get very messy timestamps and have yet to implement any type of logging. If you need more information, please don't hesitate to ask. Thank you.

0 Kudos
Message 1 of 4
(327 Views)

How to Search DAQmx Examples in LabVIEW

Use the built-in DAQmx TDMS Logging. You can open TDMS file with Excel.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
Message 2 of 4
(279 Views)

Hi rde,

 


@rde_builder wrote:

Hello! I'm looking to take measurements of a few analog channels and output them to an Excel file with timestamps. Pictured is my current "setup"; however, I get very messy timestamps and have yet to implement any type of logging. If you need more information, please don't hesitate to ask. Thank you.


What are "messy timestamps"?

 

  • Why don't you apply DAQmx scaling to your AI tasks? No need to scale the data on your own…
  • Use TDMS to store measurement data. DAQmx can do that for you - as explained in the DAQmx example VIs!
  • There's no timing visible in your image: do you even attempt to read samples at regular intervals (aka fixed samplerate)?
Best regards,
GerdW


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

Showing a picture of part of your code is not very helpful.  But then your description of "what you want to do" is a bit sparse, as well.  Here are some questions:

  • Do you intend your program to output the data to Microsoft Excel, a spread-sheet routine that is part of Microsoft Office?  [It can be done, but why add this extra complication over a simple comma- (or tab-) delimited text file, one that (say) Notepad could read, and that LabVIEW can also read without needing the Report Generation Toolkit?
  • Do you know enough LabVIEW to create your LabVIEW "programs" using the framework of creating a LabVIEW Project (a .lvproj file that lives "inside" a folder with a similar name, where you place all your VIs, TypeDefs, project documentation, etc.)?  If so, compress the Project Folder to a .zip file (in Windows, right-clik folder, choose "Send to:" and then "Compressed (zipped) File") and attach it to your reply.  If you are using the latest version of LabVIEW, you might want to "Save for Previous Version" and specify, say, LabVIEW 2019 or 2021.
  • Are you sampling at random times?  Say, when you push a "Sample" button?  Most of us sample at a set rate (1 Hz, 1 kHz, 2.5 MHz) and take multiple samples (often 1000) at a time.  Do you know about Waveforms?  This obviates the need to save a TimeStamp for every sample.
  • Don't you want to "visualize" the data that you are collecting?  How?
  • You should really talk to a colleague who knows something about sampling, acquiring data, viewing data, etc.

Bob Schor

0 Kudos
Message 4 of 4
(236 Views)