From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange behaviour in builded application

I have a numeric control whose value may be modified through its local variable (when I'm pressing a button the value of the numeric control decrements).
The VI is working just fine but, in the compiled application I have the following strange behaviour:
- when I'm pressing the button the value of the numeric control is not changing;
- if I am bringing forward another window (Win Explorer or Internet Explorer, for example), when I'm going back to the LabVIEW application window I can see the value of the numeric control modified !!!!!
 
The application is using an event structure. The numeric control has its "Synchronous display" property checked. All other controls and ndicatrs in the application are working perfect.
 
??????
0 Kudos
Message 1 of 4
(2,382 Views)
Why do you have it set to synchronous display?
 
Writing to local variables can sometimes lead to race conditions and it is possible that it only happens in the built application due to subtle timing differences. How many other local variables are there for the same control?
 
Can you attach your program?
0 Kudos
Message 2 of 4
(2,375 Views)

I've set it to synchronous display hoping this will solve the problem.
There are five local variables for that control.

I'm attaching the LLB.
You will have to declare a PCI-6224 board in MAX.
When you are adding channels by pressing the small LEDs on the right, the value of the control specifying the scan rate (Rata de esantionare) has to decrease, see Picture 1. Removing a channel will not modify the scan rate.
The VI is working fine.
In the builded application, the new value is reaching the local variable but this new value is not displayed in the control on the front panel, see Picture 2.

Tom

Download All
0 Kudos
Message 3 of 4
(2,372 Views)

Hello,

 

I think what altenbach was saying about timing differences in the exe vs. the dev environment could be to blame here.  Of course the problems likely result from what I’ll call a “race-like condition” meaning that through all these property nodes and events the value of your control is being written in unusual ways.  Unfortunately troubleshooting here might not be an exact science.  I recommend taking your existing program and removing as many components as you can until you get to the smallest portion of code that can reproduce the problem.  I suspect that the problem may surface somewhere along the way.  You could also add some code to your program that would ‘trace’ all activity to the control or its variables.  Just create a small sub-VI which appends a line such as “writing X to variable” or “read Y from control” each time the control/variable is accessed.  You could then open the trace file and see if you are overwriting the value somewhere or if the panel just isn’t updating properly.  Hopefully these suggestions help, please let us know if you have any additional information/questions!

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 4
(2,332 Views)