07-16-2010 08:32 AM
I have pressure data coming in from a DataAq box for 10 pressure transducers. The pressures are displayed with analog gauges and digital indicators. I have set up property nodes for the 10 analog gauges. The property nodes are slowing down my stopwatch functionality so i decided to put them into an event structure that triggers when a unit (PSI, KPA, Bar) selection is made or changed. The default is PSI.
What i need the event structure to do is initialize in PSI and then only run when the units are changed. currently i only have the event structure running when a unit change is made.
When i run the application, the gauges come up in psi and then when i make a unit change the scales remain in psi and then each unit selection is off by one (PSI yields KPA scale, Bar yields KPA scale, KPA yields PSI scale).
How can i make the Event structure run when the executable is opened and after that only run when a unit change is made?
07-16-2010 08:35 AM
Without looking at your code there are many ways to handle this.
1) Use the sub-VI that you use in the Event once when the app starts.
2) Similar but use "value Signalling" to trigger the event.
...
Ben
07-16-2010 08:39 AM
Ive attached the code
07-16-2010 08:41 AM
I tried using a first call function with the event structure but it only ran once. Currently the event structure is triggered off a unit selection change. But i still cannot get it to initialize the first time.
I forgot to mention using labview 8.6
07-16-2010 08:56 AM
I'd just duplicate the code and place it before the event loop. The enforce sequencial execution with the error wires or even using a flat sequence structure (Init, Do, Cleanup Sequences are not considered harmful).
Felix
07-16-2010 09:17 AM
Thank you all for your help...i was able to perform the functionality by using a shift register with a combination of not equal, or and first call fuctions.
Problem resolved.
thanks again
07-16-2010 09:22 AM
07-16-2010 11:08 AM
I don't want to sound fussy, but your architecture is awful. First of all your block diagram is way too big. It should fit on one screen without having to scroll a mile to see all the code. You can get rid of the sequence structure, it is not needed. The wires from the first two vi's will make the execution flow happen. You have an event structure, yet you are using polling methods for all the case structures. You can put each and every one of these cases inside your event structure and create events for each of the variables connected to the case selector (question mark). If you did this, you could fit the entire BD on one screen.