LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Trigger and store data with DAQmx

Hello community,

 

in short: I wrote a bad hugh program, that doesn't so what I want and I don't get how to operate Labview.

 

My setup is a cDAQ-9189 board, with a NI 9482 relay and a NI 9215 analog input. My goal is to read from analog input and switch the relays. That are either triggered from outside or from the analog input. And store all aquired data, including the true/false of the switch. Doesn't sound hard,...however I connected the devices. I can't manage to run any of Labviews examples with my analog input to see what happens. I can aquire data and display them in Waveform Chart but if I try to use 'write to file' VI, where documentation says xlsx format is fine.The file is corrupted. Is it recommended to collect data in 'multi samlpe' mode? And than write it to file or how should that be done.

 

Anyway I don't clearly understand if the NI 9215 analog input can give me a time stamp or if I have to produce it myself? Could you please suggest any example or tutorial which is close to my desired behaviour?

 

 Best wishes.

0 Kudos
Message 1 of 2
(131 Views)

Hi Maxine,

 


@maxine_mumann wrote:

I can't manage to run any of Labviews examples with my analog input to see what happens. I can aquire data and display them in Waveform Chart but if I try to use 'write to file' VI, where documentation says xlsx format is fine.The file is corrupted. Is it recommended to collect data in 'multi samlpe' mode? And than write it to file or how should that be done.


  • So you can run example VIs and watch the measured samples in a chart?
  • Why do you want to write to a XLSX file? Most often it's easier (faster) to create a CSV file…
  • Can you attach a "corrupted" XLSX file?
  • What is the desired sample rate? "Multi-sample" mode is recommended for higher sample rates, while "single sample" only works reliable with sample rates <100Hz (IMHO).

You really should attach your VI so we can suggest improvements!

(When you use a recent LabVIEW version you should down-convert your VI to LV2021 or older using File->Save for previous. I prefer LV2019.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(124 Views)