08-31-2009 10:23 AM
Hello Friends,
Is there any way to use one control as a indicator. Because I want to get a value through serial communicationand set it to a indicator and want to use that value as a control if I press another button.
Could you please help me to solve this problem?
Thank you,
Best Regards,
Rathan
Solved! Go to Solution.
08-31-2009 10:24 AM
If you create a control, you can programatically change the value so it also acts as an indicator.
You can do this using a propety node, and wiring to the 'Value' property.
Be very careful in doing this, you do not want to create race conditions.
08-31-2009 10:37 AM
Dear Cory K,
I heard about Property node, but I haven't used it much. Could you please provide me a sample VI?
Thanks,
Best Regards,
Rathan
08-31-2009 10:40 AM
Rathan,
I attached a very simple VI.
The object on the front panel is a control.
However, if you run the program, you will notice its value is changing just like an indicator.
In my example, it will go from 0 to 9, changing once every 500 ms.
08-31-2009 10:42 AM
08-31-2009 10:59 AM
My Labview version is 8.5, could you please change the version and send it to me.
Thanks,
Best Regards,
Rathan
08-31-2009 11:01 AM
Here's an image that shows both methods. You create either by right clicking on the terminal.
08-31-2009 01:28 PM
rathan wrote:Is there any way to use one control as a indicator. Because I want to get a value through serial communication and set it to a indicator and want to use that value as a control if I press another button.
You need to use a control, because indicators cannot be operated at runtime.
You have two states, depending on the state of the selector.
For manual control, just use as-is.
For programmatic updating, write to a local variable of the control. In that state, manual operation should probably not be possible, so set the control as disabled, change the background color, and hide the increment buttons as desired. Rewrite the properties only of the button changes, e.g. using an even structure.