LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Builder introducing Error

I have a simple program to read a single point from a 6023E card.  It works great when run in LV.  If I build the VI into an application and run it, I get a bad handle error when I call AI Single Point.  What would cause this?  Is there any way to get to the block diagram of a VI built into an application?
0 Kudos
Message 1 of 7
(3,034 Views)
BTW, this is LV 5.1.1 in WinNT 4.0.  Not my system of choice; the government made me do it.

0 Kudos
Message 2 of 7
(3,036 Views)

There is not a way to view the block diagram of the built application in LV 5.1.  You can do so in newer versions of LV, but that option isn't available in 5.1.

I think the issue you are having is that the built application needs the NI-DAQ drivers.  This is usually the case when you build an application and have issues with certain VIs.  Are you deploying this on a second computer?  Have you installed the drivers on that computer?

reggier

 

0 Kudos
Message 3 of 7
(2,987 Views)
Thanks.  Th app is running on the development PC.  I assume it has daq drivers since it runs in LV without a problem; maybe the build script is looking in the wrong place?  That seems odd.
0 Kudos
Message 4 of 7
(2,974 Views)

Speakers,

If you are running it on the development computer, it should be able to find the drivers correctly.  Is there an error number or message that goes with the problem?

reggier

0 Kudos
Message 5 of 7
(2,952 Views)
Yes, its a -1 bad handle error.  This makes me think that maybe the daq card is inaccessible for some reason, either the card is in use by some other process (there are no other processes that I know of) or the address is incorrect, although if that were the case it wouldn't run in LV either.

0 Kudos
Message 6 of 7
(2,950 Views)

This error is usually due to a bad input parameter to the VI.  Are you using error clusters in the application?  If so, can you place an error handler vi after the AI Single Point?  I would be interested to see what it says.

Also, are you using any strip paths before this VI?  Sometimes statically calling a file or directory will cause this error.

My suggestion would be to put together a very simple program (maybe an NI example from the example finder) that does AI single point.  Build this into a stand alone application and run it to see if you get the same problems.  If it works, you can start converting that to have the same input parameters as your application and see where the error is coming from.

reggier

0 Kudos
Message 7 of 7
(2,932 Views)