Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

global scope of a DAQmx task

Hello all,

 

I create and start a DAQmx task inside a dll. The dll is called from TestStand. After starting the task (so inside the dll) I call the "DAQmx Save Task.vi". I see that the task appears in MAX.

 

Then I try to read the task not in the dll, but just in LabView:

  • I can get the InputBuffer size (DAQmx buffer property node)
  • I can get the Sample Clock Rate (DAQmx Timing property node)
  • ...and on getting the Current Read Position (DAQmx read property node) I get an error: -200983.

The error explanation is "You can get the specified property while the task is reserved, committed or while the task is running".

 

So what is now the problem? The task runs, as it has been started inside the dll. Inside the dll I can even read the task. How to solve this issue?

0 Kudos
Message 1 of 4
(4,000 Views)

You are trying to run the task from two different places.  The DLL and then LabVIEW.  That is strickly not allowed.  The talk has been reserved by the DLL.  You need to make the DLL stop the task and release it in order for something else to use it.


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
Message 2 of 4
(3,987 Views)

Why not do everything in the dll or in LabVIEW?

0 Kudos
Message 3 of 4
(3,983 Views)

Thank you guys. 

 

We have a step type in TestStand, which has a dll module. It starts the DAQ tasks. There is another dl launched from TestStand, which is a datalogger. Both the datalogger and another steps direct in TestStand have to access the task. 

 

We already have 4 year old solution for that, it is the usage of Memory Mapped Files, where the acquires waveforms will be stored in a shared memory - visible for all applications. I just wanted to eliminate this. 

 

Madottati

0 Kudos
Message 4 of 4
(3,941 Views)