LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use it as a control and indicator

Solved!
Go to solution

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

0 Kudos
Message 1 of 8
(3,752 Views)

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.

Cory K
0 Kudos
Message 2 of 8
(3,749 Views)

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

0 Kudos
Message 3 of 8
(3,737 Views)

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.

Cory K
0 Kudos
Message 4 of 8
(3,733 Views)
If you're only changing the value, use a local variable instead of the property node
--
Tim Elsey
Certified LabVIEW Architect
Message 5 of 8
(3,728 Views)

Hi Cory K,

 

My Labview version is 8.5, could you please change the version and send it to me.

 

 

Thanks,

 

 

Best Regards,

Rathan

0 Kudos
Message 6 of 8
(3,709 Views)
Solution
Accepted by Pahee

Here's an image that shows both methods. You create either by right clicking on the terminal.

 

local and property node.PNG

0 Kudos
Message 7 of 8
(3,706 Views)

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.

0 Kudos
Message 8 of 8
(3,678 Views)