From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Panel Initialize Event

Why is there no panel initialize event provided in labview?  I am always adding a dynamic initialize event and firing it because this is the seems to be the best method for GUI initialization on startup like forcing the origin to [0,0] and aligning controls in different configurations (skins).  I know I could call a vi to do initialization prior to a vi run but this makes the code less readable.  what are the best methods of initializing a GUI that anyone has used?
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 1 of 6
(2,883 Views)

Hi Paul

I favour a state machine where there are three states

1. Application Load

This really queues up all the commands I would exercised before settling down to the main application loop.

This has the main producer consumer using events where all queue additions are serviced.

3. Application Unload

Tidy up the application before closing.

I would imagine this is similiar to you adding to event queue dynamically. I am pretty sure that this is something that you would be familiar with as this is something I learned from reading and the forum here. Just thought I would chip in and share.

Example attached in 7.1

cheers

David

Message 2 of 6
(2,859 Views)
Yes a state machine with a initialize, main loop, shutdown does work (I use this for test architectures often.  I was trying to avoid mixing event driven architecture with state machines and do a pure event driven architecture but I could mix them.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 6
(2,828 Views)

Hi Paul

I haven't really looked or used at dynamic events so I wanted to have a quick look at it.

I have attached a vi that dynamically raises two initialisation events before reaching the main event loop. Is this similiar to method that you were talking about before?

David

0 Kudos
Message 4 of 6
(2,817 Views)
Sorry I have 7.0 so I couldnt open your example,
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 6
(2,805 Views)

This thread has been quiet. I was looking forward to learning some different ideas.

Anyway.... Previous VI's in 7.0 posted.

cya
 
David
Download All
Message 6 of 6
(2,795 Views)