08-09-2007 11:00 PM
08-09-2007 11:16 PM - edited 08-09-2007 11:16 PM
Have the progress bar on the main VI front panel. Pass a reference to that control to the sub-VI when it is called. In the sub-VI, pass that reference into a property node and write to the value property. The front panel will have a "control reference" control
Attached is a rough picture of the VI's you would use.
Message Edited by Ravens Fan on 08-10-2007 12:18 AM
08-10-2007 12:28 AM
08-10-2007 09:19 AM
Without seeing all of your code, I can't tell what may be going wrong. I would recommend in your sub VI, cleaning up the blue wire so that it comes out of the right of the local variable. It is always helpful to make your code readable so that data flows from left to right. Have wires flow into the left side of an object and out of the right side. Since you are assigning the value to the referenced control by way of a local variable, perhaps you have some sort of dataflow problem that's causing the local variable not to have the desired progress data. We would need to see the rest of the code to be sure.
I have attached example VI's in LV 8.2.1 that work for me. The sub-VI does nothing but return the same numeric value passed into it. And you can see the value doesn't get returned until the VI is done. But the progress bar on the main VI gets updated while the loop in the sub-VI is executing.
08-10-2007 10:29 AM - edited 08-10-2007 10:29 AM
Message Edited by altenbach on 08-10-2007 09:18 AM
08-10-2007 11:36 AM
08-10-2007 11:39 AM
"... saw that I had a coercion dot for the reference wire ... "
Rumor has it that Christian was bitten by a coercion dot when he was very young. He has not been able to resist the tempation to sqwash them ever since.
Ben
08-10-2007 12:05 PM
08-13-2007 02:13 AM - edited 08-13-2007 02:13 AM
Message Edited by Synchrotron Guy on 08-13-2007 06:14 PM
08-13-2007 08:33 AM - edited 08-13-2007 08:33 AM
Message Edited by Ravens Fan on 08-13-2007 09:34 AM