01-31-2019 10:04 AM
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!
01-31-2019 03:06 PM
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