LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Executable runs the first time executed but then get error -50150 on DAQmx Create Task

I am having a problem with an executable I've created with LabView 7.1.
 
I create my executable just fine with no errors.  I install the application and run the executable and it works fine.  Well, if I then close the application and start it upt again I get an error as it starts executing: "Error -50150 occurred at DAQmx Create Task.vi"
 
If I uninstall the application and reinstall it, it works just fine.
 
Any help?Smiley Indifferent
0 Kudos
Message 1 of 5
(2,767 Views)

Looks like your code enters into an unstable state and thereby terminates.

Check your coding/program flow/ input states as it seems to be the cause for this problem

 

0 Kudos
Message 2 of 5
(2,742 Views)
Hello LabGator,

It sounds like you're problem might stem from the fact that your executable is not properly stopping and clearing your DAQmx Task.  Are you terminating the execution of your executable by just pressing the 'red X' in the top-right corner, or do you have a button press that stops the acquisition and clears the task?  Also, what DAQ product are you using?

If you are terminating your application with the 'red X', it will instantly close your executable and not execute any clean-up code.  You should always place a stop button on your user interface for your program to respond to that clears your DAQmx task using the 'DAQmx Clear Task VI'.  This will clear any resources used by the DAQ card and set it to an unconfigured state for your next run through the program.  If the task is instead aborted without being properly cleared, the DAQ card may be left in an indeterminant state, resulting in the errors you are seeing.  You can probably get around actually reinstalling your executable by just resetting the device in Measurement & Automation Explorer (MAX).  Launch MAX, find your device under Devices & Interfaces >> DAQmx Devices, right click on the device and select 'Reset Device'.

If resetting the device in MAX doesn't work and/or you are still seeing problems after correctly clearing your task, reply to this post and we can try to figure out what else might be going on.

Regards,
Travis Gorkin
Applications Engineering
National Instruments
www.ni.com/support
Message 3 of 5
(2,733 Views)

Thank you for your replies.

I am clearing the DAQmx tasks when I leave the program, and I do stop execution internally to the code, not with the redX.  I do think I may have found a problem with how the executable is formed.

Do you know of a limit in the length of the file location when you create an executable?

I made a new executable in a folder at a higher file hierarchy position and at the same time edited my top level VI to get rid of variable initializations I didn't need.  Then I tried making the executable again and it worked.  Could the file location nam be possibly too long?  I dont think the other changes I made would cause a problem.

thanks.

 

0 Kudos
Message 4 of 5
(2,714 Views)
Hello LabGator,

I cannot find any information or indication of the length of the filename or the position of an executable in a file hierarchy causing an error.  I am wondering if there is something strange going on with how you have your NI-DAQmx task configured.  Can you replicate the error with a DAQmx shipping example?  The following is the full explanation of the error:

"The software has entered an unknown state - usually as a result of a cascade failure induced 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."

Maybe you could attach your code so that we can take a look at what's going on and try to replicate the error.

Regards,
Travis G.
0 Kudos
Message 5 of 5
(2,698 Views)