LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument Control Build Specifications

Solved!
Go to solution

Dear Sir:

 

      I am trying to build a working *.exe instrument control program.  This is a simple program which only queries my test instrument with a *IDN? command. 

 

      The program fails to call my instrument driver and the program also runs on boot up when (running under normal conditions) it should wait for me to input the GPIB address of my test instrument. 

 

      Let's begin with the failure of Labview to communicate with the instrument driver.   This is some background information.

 

       When I run the program as simple *.VI in the Labview environment, the program runs perfectly.    No issues.

 

       When I use Agilent Connection Expert or MAX to communicate to the test instrument, communication is established and there are no issues - I receive a reply, connectivity is established. 

 

        After I build the *.VI into a *.EXE program, this is where the program's issues arise. 

 

       The *.EXE program fails to initialize correctly and fails to establish connectivity with my test instrument.

 

        Here are some issues that I have noticed about the program running in *.EXE mode

 

1)  The program runs on "boot up" when you click on the *.EXE program.   In *.VI mode, the program does not run on boot but waits for the user to input the GPIB address of the test instrument - program run is designed to be enabled by the user.

 

      I do not believe this is the source of the problem but only an incidental consequence of the problem.   If I stop the program and input the GPIB address, I receive a message about not being able to communicate to the driver. 

 

2)  Once the *.EXE program runs, there is a condition whereby the operating system cannot close the program and WINDOWS itself cannot shut down itself unless I manually close all the programs associated with the *.EXE program in the WINDOWS operating environment. 

 

3)  If the labview program and *.EXE program are closed but the operating system is still running,  Agilent Connection Expert and MAX can no longer communicate with the test instrument.   They no longer see the test instrument.

 

It is obvious that the *.EXE program is making a change which is causing the operating system to "hang" on shutdown and is also preventing the other programs from operating as they should. 

 

I believe the source of my problem may be how I programmed my build specifications.     In reply,  can you please tell me what are the minimum requirements for the build specification so that my test instrument can reply to a simple *IDN? query?   What files are normally required for a successful build?

 

Other information as to the source of my issues are welcome as well.

 

Thank you.

 

      

0 Kudos
Message 1 of 7
(2,645 Views)

Are you running the EXE on your development machine or a different machine?  Does it run on the development machine?

 

I would also post your VI so others can look at it and give better suggestions on what might be giving you issues.

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

The *.EXE does not run on the development computer system, nor any other computer system.

 

     The *.VI does run on the development  computer system in the labview environment.

 

      I will post the *.VI soon.

 

      Can you tell me the required files to include in a typical VISA - 488.2 build?   Please reply to this question with the filename extensions that are usually included in a typically build for rudimentary communication (driver filename extension, library filename extension, etc.).  Thank you.

 

 

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

You do not need to include any drivers to run on the development computer because they are already there.  When you move the exe to a non development computer then you will need to include anything the exe needs to work.

 

Since the exe does not work on your development machine you will need to figure why.  And it is hard to figure out without any code to look at.

 

 You can also add error indicators to the vi that will be visible on the front panel of the exe.  Then you can try to track down what is having problems.

0 Kudos
Message 4 of 7
(2,629 Views)

Thanks for you advice.

 

I think this problem is a lot easier than you might think.   I just started using Labview and the *.VI is super simple.  I am away from my development computer right now so I can't post it.  

 

The information I need to know right now are the typical files that are needed to be added in the build.  

 

I found this quote that I found on a webpage to be interesting, (although I am not building an installer):

 

"  Do I need to include NI-488.2 2.7.3 module if I use only basic GPIB Write.vi and GPIB Read.vis in my project?

 


 

Yes, if you are making an installer ..."

 

This is a link to the webpage:

 

http://forums.ni.com/t5/LabVIEW/Uninstalling-LabVIEW-after-an-application-EXE-build/td-p/1553310

 

My program involves only simple reads and writes using NI-488.2 calls to a test instrument.   A simple list of files specified with filename extensions to get me started would be appreciated.

 

 

 

 

0 Kudos
Message 5 of 7
(2,619 Views)

Ok, one more time for you then. 

 

In general you will not need to add any additional installers or files to a exe build if you are going to run it on your development machine.  Because all the files required are already on that machine because of the development environment.  Otherwise you vi would not work.  One thing to watch is file paths with executables.

 

The reason you add installers and/or additional files to a build is because a new machine would not have any LabVIEW software on it.

 

 

So if your exe does not run on your development machine, but your VI does, something is funky with your code.

0 Kudos
Message 6 of 7
(2,608 Views)
Solution
Accepted by topic author noobie_programmer

Thank you for your input.   I can see why you were led to believe my code was flunky but that wasn't the case.  

 

The solution turned out to be changing my source file settings for my build specifications.   I had to customize the VI properties to not run when the program opened and allow the user to close the VI.   The initial default build settings are very inconvenient for new LABVIEW users, like myself.   

 

 

 

 

 

 

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