cancel
Showing results for 
Search instead for 
Did you mean: 

source behaves differently from executable

faustina
Active Participant

source behaves differently from executable

Message contains an attachment

I have a subVI that runs into an endless loop in the executable version but not the development version.  I have determined that the cause is that the property needed (BindingPath) for the check to end the loop has no value.  As a matter of fact there is no value for CaptionText, BindingPath, or Label.Text.  All the controls collected in the array have these values set by the developer prior to runtime.  Why, in the development version, do values exist for all these properties, but not in the executable version?

12 REPLIES 12
P@Anand
Trusted Enthusiast

Re: source behaves differently from executable

Message contains a hyperlink

You can get more information about that in Darren's Artisan Blog

-----

The best solution is the one you find it by yourself
faustina
Active Participant

Re: source behaves differently from executable

Well that was both frightening and enlightening.  However, I discovered that the Caption.Text, BindingPath, and Label.Text do exist for at least some period of time.  The Ctr Refnums array initially has 81 elements.  The loop successfully process 2 elements in executable mode and reduces the size of the array to 79.  It only loses the property values afterwards.  Any ideas how the property values got lost?  The subVI has not been completed.  Only 2 iterations of the For Loop have passed.

amezam
Active Participant

Re: source behaves differently from executable

Message contains a hyperlink

Hello Faustina,

 

Thanks for posting at NI forums! My recommendation would be debugging the executable in order to open its block diagram and checking what seems to be changing in the target computer. This will allow you to narrow better what is the cause of the problem. I’m linking a knowledge base that explains how to debug an executable.

 

KB Remotely Debugging Executables in LabVIEW

 

Best Regards,

 

Alina M

 

Wes_P
Member

Re: source behaves differently from executable

I know this doesn't directly address the issue, but it would be a good idea from an error handling point of view to create code for a timeout error. That way instead of sending you into an infinite loop, your program can return a user-defined error and continue to execute.

Wes Pierce
Principal Engineer
Pierce Controls
Yamaeda
Proven Zealot

Re: source behaves differently from executable

I assume it's a sub-vi where the front panel gets removed in compiled code due to optimization?

You can force front panel into memory by placing a vi ref.

 

If i'm way off, then nvm. Smiley Happy

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
faustina
Active Participant

Re: source behaves differently from executable

the controls that are feed into this VI are from a front panel open to the user

mikeporter
Proven Zealot

Re: source behaves differently from executable

What version of LV are you running?

 

If 2011, this might be related to a problem that I found and which has since been fixed in 2012. In my case reading the value of a control that was on a front panel that wasn't in memory failed the first time it was called. It returned the default values for the datatype.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
faustina
Active Participant

Re: source behaves differently from executable

I am using LV 2011.

 

This subVI modifies controls on the user front panel according to a XML file.  The array of clusters is the result of reading that file.  The For Loop indexes the array of clusters while the While Loop searchs for the appropriate control based on the BindingPath property.  The subVI in the While Loop was used to display the properties of the control from the front panel.  The Add Indicator subVI does the actual modification of the control.

 

It was using the subVI in the While Loop that I determined that Caption.Text, BindingPath, and Label.Text 'disappeared' after 2 iterations of the For Loop ONLY in executable mode.  In development mode there are no problems.

amezam
Active Participant

Re: source behaves differently from executable

Hello Faustina,

 

Have you tried enabling debugging in the executable in order to open the block diagram and check what is occurring behind scenes?

 

Best Regards,

 

Alina M