LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx task unnamed when subVI called

Solved!
Go to solution

Dear all,

 

I built a subVI based on a state machine architecture.

Inside this VI, I use multiple DAQmx tasks without problem.

When I call this subVI from the main interface, It has errors coming from the tasks that appear to be unnamed.

I don't understand why this subVI is running properly when it is called directly and why it has errors when it is called from outside.

Unnamed Task.PNG

Could you help me please?

Best regards.

Sébastien

 

Here is the diagram of the subVI. The error appear when calling the "DAQmx Write" vi:

SubVI.PNG

 

0 Kudos
Message 1 of 3
(4,679 Views)
Solution
Accepted by topic author MAILFERTSeb

Dear all,

 

I found the solution.

When running the subVI alone, there were no apparent error but when called from outside, the error apperas.

In fact, in my stae machine, one state was repeated until an event occurs and then called "DAQmx start task" at every loop.

This was transparent Inside the subVI (this is really Strange because this is an obvious error) but crashes when called from the main VI.

Sorry but this can help people to know where it can come from.

Best regards.

0 Kudos
Message 2 of 3
(4,650 Views)

[Edit: OP had own solution by the time I finished my post]

 

The error text for the -200547 code describes things pretty clearly.  Apparently, you attempted to write data to the task more than once before starting it, and this isn't allowed.

 

Seems like you need a closer look at your state sequencing logic to figure out why the behavior is different when you run from your "main interface."

 

 

-Kevin P 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 3
(4,646 Views)