05-31-2010 03:25 AM
Hello,
When i press the button 'call dialog', the Front Panel of the Dialog.vi will be show. And I wanted the 'New Setpoint' be automatic initialized as the current Setpoint = 2 (or any value for numeric). And i tried writing the value using a local variable during timeout, but it is not possible. the initialization should occur only once in the beginning.
Thanks
05-31-2010 04:19 AM
05-31-2010 10:29 AM
Your dialog VI has a serious flaw. It can only run for 1/2 second. If the value hasn't been changed within that 1/2 second, then the timeout case runs and the subVI stops executing.
Also, there is no need to have value of the Call Dialog button write itself back to the local variable of the control right before the case structure in the main VI.
05-31-2010 12:41 PM
05-31-2010 01:03 PM
05-31-2010 01:37 PM
Your subVI is very badly written. It does not have a while loop around the event structure, the stop is just plain wrong, the extra control and use of locals is wrong, and you don't return the setpoint value. Nothing, in fact, is done correctly. Why would you call it and not return the value? You need to wire up the connector pane.
You should spend some time with the basic LabVIEW tutorials.
06-01-2010 02:10 AM