09-22-2009 03:40 AM
09-22-2009 04:49 AM
Problem with event srtucture?
Right Click the Event Structure --> Edit Events --> 'highlight each event'--> Unlock
09-22-2009 04:50 AM
09-22-2009 05:06 AM
Hi,
You may want to try the following:
1) create a while loop, leave the conditional terminal open for now
2) inside the while loop, create an event structure (on the same palette as 'while'- and 'for' loops)
3) Add an event by right-cllicking the top textfield of the event structure, choose your startbutton-control in the left menu, and in the right menu scroll down to 'value change'. Before exiting this menu make sure to uncheck the checkbox for 'lock front panel'
4 inside the eventstructure for your start-button, put your start-button control - it needs to be read by the program to work properly (unless you chose another form of mechanical action). Wire it through the wall of the event-structure and to the conditional terminal, insert a boolean 'not' to reverse the polarity.
5) Add a constant to the 'timeout' value on the left upper corner (outside the event structure),give it the value 100 [ms]
6) select the timeout page in the structure (it was there by default as the first page)
7) insert your scanning program in here, it will iterate (start) every 100ms (due to your constant in step 5)
😎 add another event, select your stop button control in the left menu, select 'value change' in the right menu
9) Place your stop-button control inside the new page in the event-structure, wire a line through the frame down to the conditional terminal
10) you are done 🙂
Brgds
T
09-22-2009 06:40 AM
09-22-2009 06:45 AM
09-22-2009 07:10 AM
Competition, eh? 😉