01-19-2011 03:31 PM
Im stumped. I would like to display a progress bar in my main vi as a subvi analyzes a file. Simple right? I passed a reference of the slider indicator to the subvi. I created a Property Node, selected the 'value' property for the slider and set to write. Basically the subvi is analyzing data and changing the slider value based on file position. The VI crashes on the value property.
What am I doing wrong? Isn't that how you access a control on another VI?
01-19-2011 03:55 PM
This doesnt work. Why?
01-19-2011 04:09 PM
01-19-2011 04:26 PM
Forget the previous post, I took a closer look and there is a simple reason why the slide don't update. The slide control is a takes U8 values. The default maximum is 255. You are sending i/100 values to this control so the 2 possible values it can take is 0 and 1. Set N=255 and connect i to the property node value input and you will see the front panel slide update from 0 to the max 255 U8 value.
Ben64
01-19-2011 04:31 PM
01-19-2011 04:35 PM
You can also change the slider representation to DBL and set the Range for Min=0 and Max=1 since the value you are writing will be a fraction between 0 and 1.
01-19-2011 05:33 PM
For use cases like this I love to use an Action Engine to maintain the referance to the control. Then I can call it from anywhere at any level in my code to update the GUI.
Here's a snippet of "UI Progress.vi" demonstating the concept.
01-20-2011 11:08 AM - edited 01-20-2011 11:09 AM
Thanks for the help guys. You're right I meant to divide by 10. Already set the slider to range 0 to 100