LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Logging on RT works in interactive mode but not headless

Solved!
Go to solution

I created a little program to run a cRIO 9047 headless. Press the user1 button, acquisition and logging start on a NI9203 module. I am using DAQmx to configure the acquisition and logging. The DAQmx Configure Logging.vi seems pretty basic, and I've checked to make sure that my file path is correct with a little "probe.vi" that writes a txt file to the crio with the file path (or any other info) i wire to it. 

 

When I run the application interactively by running my startup VI from the project window the tdms file is created in the expected directory (/home/lvuser/natinst/bin/Logged Files/<filename>) and the logging seems to work fine. When I build the application and set as startup and restart, i get the same file paths in my probes as i did running interactively but no tdms file is created. 

 

TheWolfmansBrother_0-1727703944346.png

 

The probe vi write the path to a txt

TheWolfmansBrother_1-1727704013974.png

I tried concatenating the file extension on, even though when running interactively it wasn't necessary. 

Tried changing my directory to the application base path from the location i have in an ini file. 

Tried changing the name to just a single word instead of "09302024 0915 AM.tdms" format.

 

Not sure what i am doing wrong here, not reporting any errors and the actual acquisition seems to be working (using some error reporting). 

 

I could just create TDMS files manually or write the acquisition to a txt file, but was trying to do this the easy way with the DAQmx logging. 

 

DAQmx 21.8 on LV2020SP1

 

0 Kudos
Message 1 of 4
(181 Views)
Solution
Accepted by topic author TheWolfmansBrother

Is the application running at all when compiled? Does it produce an error?

There used to be a bug in DAQmx that broke DAQmx logging on RT, though that was fixed in 21.8: https://www.ni.com/en/support/documentation/bugs/22/ni-daqmx-21-8-bug-fixes.htm

Maybe you could double check the DAQmx version on the cRIO?

 

0 Kudos
Message 2 of 4
(169 Views)

I added a VI to help show what I've got going. 

 

I experience the same issues when running this as a startup VI as I do my real project. 

 

process:

I added it to target open the VI and click run arrow, it loads it to the cRIO, i can se the front panel and the acquisition occur (running interactively). I can then go into the cRIO files and find the tdms file.

 

If i build an RT application and set this file as startup, no tdms file is created in the directory. I get no errors, and the LED i have setup to flash on the cRIO flashes when there is no error and acquisition is running. 

 

 

0 Kudos
Message 3 of 4
(164 Views)

Yup, so despite having DAQmx 21.8 installed on my machine, I recently replicated and deployed an older image to this cRIO and it is running DAQmx 20.1. I will go ahead and update the software, thanks. 

0 Kudos
Message 4 of 4
(161 Views)