LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error and weird behaviour in executable launch

Hello folks,

 

This post is regarding a weird behaviour i am experiencing with an executable i built. 

 

LABVIEW version(Includes Runtime engine) LV2012 SP1 f3

DAQmx: 9.6.1

 

The behaviour is listed below in detail. 

In a nutshell, the exectuable runs on the development computer but does not run on the Target computer. Also, Irresepctive of which PC i run the executable on, i cannot access the block diagram even after enabling debugging everywhere. 

 

On the target PC, the app fires up but does not run further, no error codes appear on the screen, it's like the app freezes after firing up. And to add to the misery, i cannot access the block diagram to debug and know what's going on. 

 

Also, I have tried including the dynamic vis to my build script. No bueno. 

 

What I see on running the app is addressed below:

 

TARGET COMPUTER:

  • DAQmx 9.7 and LV2012 SP1 f4 RTE have been installed manually.
  • App does not run: No broken run button, the app launches but does nothing when the vi is run. No error messages.
  • The block diagram is still inaccessible, even after selecting the “Enable debugging” option in the build specifications.

 

 

DEVELOPMENT COMPUTER:

  • The app launches and runs perfectly.
  • The block diagram is still inaccessible, even after selecting the “Enable debugging” option in the build specifications.
  • DAQmx 9.7 and LV2012 SP1 f4 RTE were not installed as the app recognized the already installed Labview environment.

 

Additional steps that I have tried,

  •  Created and ran only an executable on the target PC, the attempt was unsuccessful. The vi showed similar characteristics as mentioned above in the target PC section.
  •  Created and ran an installer with additional install options(LV2012 f4 RTE and DAQmx 9.7)on the target PC, the attempt was again unsuccessful. The vi showed similar characteristics as mentioned above in the target PC section.  No error messages.
  •  Tried both the steps mentioned above on the development computer and the attempts were successful. .

 

To the best of my knowledge, I believe, the issue here is with the environment I am creating for the executable and the installer to run with/off of. After having carefully followed the installation procedure for the Run-Time Engine and the DAQmx drivers, I still do not know what I am missing. 

 

Please advise.

 

Thanks guys, 

RP.

0 Kudos
Message 1 of 13
(3,481 Views)

As a quick check, if you build some other very simple VI into an application, will it run on the target computer?

 

When you say that you can't see the block diagram even with debugging enabled: are you unable to connect to the remote executable at all, or you can connect but then can't see the block diagram? If you cannot connect with the remote debugger at all, you might want to see http://digital.ni.com/public.nsf/allkb/70F4B35F94227F058625738E00198720

 

Have you put in any sort of debugging help in the application? For example, add a one-button message box that pops up when you start the program, or have it write to a file at each step, or add a few instances of the General Error Handler to pop up a message if an error occurs.

0 Kudos
Message 2 of 13
(3,464 Views)

Have you tried to upgrade the development PC to LabVIEW 2012 SP1 f4 ?

I believe that you are only able to run a program as long as the development version and the RTE is the same.


I might be wrong, but there should be no harm done in updating LabVIEW.

 

How are you tying to view the block diagram on the target machine?

0 Kudos
Message 3 of 13
(3,457 Views)

Hi RP,

 

You may want to check out this KnowledgeBase:

 

Remotely Debugging Executables in LabVIEW

http://digital.ni.com/public.nsf/allkb/8DA679805915DE40862572D5007B2F70

 

What is the application supposed to do on launch?  Does it access any external files or DLLs?  Do you have any initialization steps with "check for" conditions that might not be met?  If you look in the task manager, is the exe thread using system resources?

 

Is your program coded to stop on an error?  Are you using error handling/reporting? Executables will not auto-handle errors, so you won't get the automatic pop-ups you'd see in the development environment.

 

You mentioned dynamic VIs- are these being included in the executable build (As "Always Included")? An installer?  Are you using hard-coded or dynamically generated paths? The path is likely to have changed here for the exe, refer to

 

KnowledgeBase: Why Does My Executable Not Work When Using the Current VI's Path Constant?

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

 

As an additional debugging step, you may want to try dropping in one-button dialogs or similar alerts to see if/where the application is hanging.  If nothing else, try dropping one at the start of the code to ensure that it's begun to execute- this really sounds like a hang rather than a failure to start. 

 

Regards,

Tom L.
0 Kudos
Message 4 of 13
(3,445 Views)

Hey guys, 

 

So, got the application to work. Almost. 

 

The problem was that the executable was missing the hardware config from the Device. 

 

Now, the new issue is as following: 

 

The goal of the vi is to generate a report of the test conducted. So, the way the vi works is that, the second the vi is run, an empty word file is created with only the company logo,  

Field headings, which are populated after the test is conducted. 

 

The logo is a .jpg file, which has a relative path into the executable.

The field heading are String constants wired into a 'concatenate strings.vi' which are in turn wired to into the report generation vis.

 

What's happening is that when i run the app on the target pc, Only the logo appears on the word template. Even when i conduct the whole test and stop the vi, the results aren't populated in the word file. Which is a little weird.

 

Does any one know whats doing that?

 

Please refer to the attached word files.

 

Right - It is the file format desired. 

 

Wrong - It is the file format achieved. 

 

 

Please advise.

 

Thanks,

RP. 

 

 

Download All
0 Kudos
Message 5 of 13
(3,428 Views)

Are you getting any errors out of the report generation toolkit functions, when you run the application on the target computer? Do you have the same version of Word installed on the development computer as on the target computer?

0 Kudos
Message 6 of 13
(3,423 Views)

Hey nathan, 

 

Well, 

 

I am not getting any errors on the VIs. None whatsoever. 

Which is a little weird. 

 

Also, yes, i do have the same version of the word installed on my Target pc. 

Wouldn't the vi not punch out even the logo to the word file if the software versions were different ?! I don't know.

 

I cannot access the block diagram on the executable, even after enabling debugging in the build specifications, which, isn't bothering me yet cause the app runs(except for the report part). 

 

Any suggestions on what's up with the report on this one? 

 

 

-RP.

 

 

0 Kudos
Message 7 of 13
(3,421 Views)

Do you know that you're passing valid strings into the report generation functions? Check that - maybe pop up a dialog box with them, or write them to a text file without using the report generation VIs, and see if those files contain good data or are empty.

0 Kudos
Message 8 of 13
(3,413 Views)

Hey nathan,

 

Yes, I am passing valid strings to the report generation function. Cuz the app works on development computer. 

 

I'll try logging a file for errors and see what's going on. 

 

 

 

RP.

0 Kudos
Message 9 of 13
(3,393 Views)

RP,

 

Debugging the exe is probably also a good idea if you can- remember that you'll need to connect to the executable from the LabVIEW development environment to start a debug session; you don't just open the block diagram.  Refer to the KnowledgeBases linked above or the LabVIEW help for more info.

 

Regards,

Tom L.
0 Kudos
Message 10 of 13
(3,386 Views)