09-27-2023 08:44 AM
Hi all,
I'm using a cRIO-9054 system, the NI-9234 module, and the NI-9219 module. I'm new with the programming in LabVIEW and I started to build a LabVIEW project (LabVIEW 2023Q3 version) that allows me to acquire and record continuously datas from a single channel (or NI-9234 or NI-9219 module). Since the DAQ assistant was highly not recommended I started to use the various DAQ boxes.
So far, thanks to the project linked below I'm able to acquire and log datas on my laptop. The most relevant problem is that when I log datas, the actual dt that I obtain is out of my control even if I tried to control the rate in the DAQ Timing.vi with a shared variable. Occasionally, it happens to run into the "Error 200279" and even if I tried to consult some manual I wasn't able to get the solution to this problem.
Many thanks,
Nando
Solved! Go to Solution.
09-27-2023 08:56 AM
See Error -200279: Unable to Keep Up With Acquisition in NI-DAQmx
You cannot change the timing configuration once the task has been started. There is no point in updating the rate using shared variables as they will never be read again after the program goes into the while loop.
09-27-2023 09:22 AM
Thanks for replying. I agree with you with your observation about the thing that it's not feasible to update the rate value in real time (I use it to avoid to open too many windows and modify the constant value). I already tried to consult the link that you have suggested but it wasn't helpful.
According to you, if it is not possible to change the timing configuration once the task has been started, what is the way to control the timing? I apologise if my questions may look trivial but as said before I'm new.
I take this opportunity to ask you if there's a way to run simultaneously both the vi in the host and in the hardware.
09-27-2023 12:08 PM
what is the way to control the timing?
If you want to change the sample rate of the sample clock, you need to stop the task. This will interrupt the ongoing acquisition. See Change DAQmx Sampling Rate While Continuously Acquiring Data
Another way is to sample at a higher sampling rate, and then re-sample the data. See Using the Align and Resample Express VI - NI
if there's a way to run simultaneously both the vi in the host and in the hardware.
There isn't. You cannot run a VI both in the host and cRIO. The same VI can be run separately on its own instance in the host and cRIO, but they are independent.
There is a shipping project that you can refer to. On the splash screen, click Create Project >> Sample Projects >> Real-Time
This example demonstrates what functionalities should be implemented in the host or cRIO.