LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable cannot find DAQmx Task, but can in programming mode

I am running in LV 10 with a PXI system.  I perform an analog read using DAQmx and feed the VI a Project Task that I have defined.  The program runs fine at this point.  I am able to read analog signals.  However, when I Build the project into and executable and run it, I get an error message:

 

Error -200428 : Value passed to the Task/Channels In control is invalid.

The value must refer to a valid task or valid virtual channels.

0 Kudos
Message 1 of 10
(4,730 Views)

Hey Roese,

 

I found this Knowledge base article that may be of some assistance.

 

http://digital.ni.com/public.nsf/allkb/7705D38D59EF562886256F79007E4B5A?OpenDocument

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(4,711 Views)

Thanks for the article.  I think, however, that it was written prior to the development of the Project Window for LabVIEW, and does not address the "Project" task.  The strange thing for me is that I am using the exact same procedure for developing Project Tasks on another machine (Also with LV 10), and I have no problem. I am able to create and run the executable without error.  Maybe there is a different version of NI-DAQ on each machine.  I'll have to check that out.  They both have been upgraded with SP1 from Feb of this year.

0 Kudos
Message 3 of 10
(4,675 Views)

Which PXI system are you using? Also, are you running LabVIEW on the PXI system or do you have it hooked up with your computer?

 

Did you look into what versions of DAQmx you have?

Jake H | Product Manager
0 Kudos
Message 4 of 10
(4,649 Views)

LabVIEW is loaded on the PXI chasis.   It is a 1036 Chassis with a PXI-8101 controller.  The DAQmx version is 9.2.3

0 Kudos
Message 5 of 10
(4,612 Views)

Have you tried creating a debuggable executable to find where your problem is occuring? I've linked an article that covers the process and has some useful links on it.

 

http://digital.ni.com/public.nsf/allkb/3087D91EEADBAF3D862571D1004AF192?OpenDocument

 

Jake H | Product Manager
0 Kudos
Message 6 of 10
(4,602 Views)

I created a debuggable exe, but I can't pinpoint the issue.   When I run the program, I still get the same error and I have to shutdown the program.  Like I mentioned earlier, I have developed programs using the same project tasks scenarios on other PXI systems, and created working executables. Both systems use LV 10....the only difference is that one has Windows XP and the other has Windows Vista.  (the one that doesn't work)  But I don't think that is it.  I have built executables on  PXI systems with LV 9 and Windows Vista.

0 Kudos
Message 7 of 10
(4,584 Views)

Hey Roese,

 

Do you have any functional globals in your executable? This error can occur when these are not set up right. Here are some Links to check out. The first one talks about how to save tasks in functional globals and the second gives you some examples.

 

http://digital.ni.com/public.nsf/allkb/28F74AC9AF379659862570F800602A41?OpenDocument

 

http://sine.ni.com/devzone/cda/epd/p/id/1668

 

I hope that this helps.

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(4,562 Views)

Hi,

 

I have exactly the same issue even with very simple VI. The VI work fine in development mode but when I build the real time application and deploy it a desktop PC running labview RT nothing works anymore.

Did you find a solution?

Thanks

 

Boris

0 Kudos
Message 9 of 10
(4,412 Views)

Hi Boris,

 

when you define your tasks in MAX and you want to deploy your executable to a different PC you also have to deploy the MAX settings (task definitions) to that other computer...

 

You can export MAX settings and there is an option to include MAX settings in the app builder (either with the executable or with an installer)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 10
(4,406 Views)