LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Standalone vi execution issue.

I have a powersupply control vi taht I want to run continous. I created the executable and it starts fine, however the vi is not running. I must first press the run contiunous and then my power on/off button to operate the supplies. I have tried changing the vi execution properties and a while loop with little success.
0 Kudos
Message 1 of 10
(3,316 Views)
May I suggest that you have your vi posted here (if not too big in size) so as one of us can take a look before tellig you what went wrong with it.

cheers
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 10
(3,316 Views)
Hi,

Perhaps it runs once, and if finished immediatelly (put a popup message box
in the code to test this!). You'll have to put a while loop around the code
and wire a TRUE to the stop condition, so it never quits.

Regards,

Wiebe.


"aschenk" wrote in message
news:5065000000080000004ABB0000-1073519706000@exchange.ni.com...
> I have a powersupply control vi taht I want to run continous. I
> created the executable and it starts fine, however the vi is not
> running. I must first press the run contiunous and then my power
> on/off button to operate the supplies. I have tried changing the vi
> execution properties and a while loop with little success.
0 Kudos
Message 3 of 10
(3,316 Views)
I just wanted to add a quick note. You stated that the VI starts fine, however is not running. Do you mean that the front panel opens up, however the VI never runs? If so then make sure the VI Properties >> Execution >> Run When Opened is selected, before you build the executable.

Then I would follow the other suggestions posted to add a while loop to your code. In general it is much better to programmatically make your VI iterate rather than using the run continuous button.

Evan
National Instruments
0 Kudos
Message 4 of 10
(3,316 Views)
Thanks for you help folks. I got it to work. had some issues with a nested while loop but now it works great.


I have attached the VI for those who wish to see it or copy it.

thx again

Andrew
0 Kudos
Message 5 of 10
(3,316 Views)
FYI, if you want people to review a program, you have to attach all of the subVIs. The easiest way is to do a Save With Options and create a development distribution. This creates an LLB with everything in it.
0 Kudos
Message 6 of 10
(3,316 Views)
Dennis,


Thanks, I have re-attached the files
0 Kudos
Message 7 of 10
(3,316 Views)
One glaring thing that I noticed is that you are constantly reading and writing gpib commands. This constant bus traffic probably doesn't cause any harm but I wouldn't think it is necessary. Since you only have version 6.0.2 and don't have the event structure, you can set up a while loop with a shift register and monitor the voltage controls for a change. Then, do the write and read only when the front panel control changes value and only write to the instrument who's control changed. Also, while loops in LabVIEW benfit with the addition of a Wait (ms) function and a nominal wait time (i.e. 100 ms). Without a wait, the program will execute as fast as possible and hog the computer's resources, making it difficult to process user int
erface events.
0 Kudos
Message 8 of 10
(3,316 Views)
Dennis,

Ok If I understand your suggestion correctly and the use of shift registers. Each control knob is wired to the right hand shift register(output). The left shift register(input) is connected to the write command of the corresponding power supply.


Andrew
0 Kudos
Message 9 of 10
(3,316 Views)
Not exactly. There's a shipping example called User Interface Event Example. This is what's called a state machine architecture. I've attached one using a couple of controls from your VI. There's a lot information on NI Zone about state machines.
0 Kudos
Message 10 of 10
(3,316 Views)