01-22-2011 01:30 PM
how?
Solved! Go to Solution.
01-22-2011 01:37 PM
When?
01-22-2011 01:37 PM
Generate an event outside the event while loop.
/Y
01-22-2011 01:49 PM
I mean, I found only this. But I didn't find a startup event?
01-22-2011 01:56 PM
Thanks, now you are starting to provide a few details besides just a one word question.
As yamaeda said, you could register for an generate a user event as the very first thing your VI does.
Do you actually need a "startup event"? Why not put the code you want to execute at startup right at the very beginning of your VI and control the order of execution either with wires, or even a sequence structure?
01-22-2011 02:09 PM
Actually what I want to do is quite simple. This program is a report generator. It has simple code to build array of clusters information from a database, but it filters out the values that do not match a specified serial number. So only entries with a specified serial number will go in.
The serial number is entered in the numerical, or even a string control, but once the program is opened I want to wire it with the latest serial number found in the database, so in order that it should act as a default value.
01-22-2011 02:24 PM
@Ravens Fan wrote:
Thanks, now you are starting to provide a few details besides just a one word question.
As yamaeda said, you could register for an generate a user event as the very first thing your VI does.
Do you actually need a "startup event"? Why not put the code you want to execute at startup right at the very beginning of your VI and control the order of execution either with wires, or even a sequence structure?
I will post my current code, so that you can understand :manhappy:
01-22-2011 02:33 PM
Your VI makes no sense whatsoever. Are you running this in "continuous run" mode??? 😮
Why would you need an event at all?
01-22-2011 02:40 PM
@altenbach wrote:
Your VI makes no sense whatsoever.
I agree.
@altenbach wrote:
Are you running this in "continuous run" mode??? 😮
yes :womansad: I could'n think for another way of doing it. what would you suggest insted?
This is just to replace a "Load DB" button, because it should be pressed only once and in the beginning - it makes no sense either/.
Why would you need an event at all?
01-22-2011 02:43 PM - edited 01-22-2011 02:44 PM
The continuous run button is a debugging tool, not something to use for regular operation, ever!
Simply place a while loop around your code and wire the startup code so it is executed before the while loop starts. That's all!