Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 50150 occurred at DAQmx Stop Task.vi

Hello,

I have run into a problem with my VI. i built this program on a Windows 10 machine with LabVIEW 18 and had no real issues until i moved the program to one of our lab machines which is running LabVIEW 16 on Windows 7. 

 

The VI i made switches 2 MUXs attached to my DAQ and then generates either a 25kHz or 0.5 Hz sine wave. This is then passed through the first MUX which selects a driven electrode, passes through some medium and the second MUX. Then finally the DAQ reads the analog signal. so in basic it generates and measures an analog waveform.

 

The error im experiencing is very random, could happen at any point during the tests:

 

Error -50150 occored at DAQmx Stop Task.vi:

 the software has entered and unknown state-usually as a result of a cascade failure induce by an unexpected series of state inputs. The operation could not be completed as specified and you should immediately terminate all further transactions if you are able to do so.

Task Name: _unnamedTask<37BB>

 

The Task Name part changes pretty often and usually after pressing continue the test continues as expected. However, the error will reappear after sometime. 

 

Im assuming Im doing something wrong on my end and would greatly appreciate and help that i can get. Ive attached my VI and an image of the error.

 

Thank you!

Download All
0 Kudos
Message 1 of 2
(1,952 Views)

I don't see any obvious causes for suspicion in the DAQmx code.  The only highly speculative thing I'd want to venture seems like it'd throw an error during config calls or at DAQmx Start, not at the call to DAQmx Stop.   Anyway, here goes:

 

I've observed that calls to DAQmx Clear can possibly finish and return execution control to my code before all the resource clearing has actually finished.  When code clears a task and then *immediately* tries to reconfigure a similar task using many of the same resources (channel, timing system, task buffer, etc.), I've sometimes seen errors at the attempt to reconfigure and start. Usually a brief delay like less than a half second is enough to allow the task clearing to *truly* complete before I ask to reclaim ownership over the same resources again. 

 

Again, I'm fairly skeptical of my suggestion because I wouldn't expect the problem to only show up when you finally get to DAQmx Stop.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(1,928 Views)