How can I display a value in a textbox indicator and a slider in LabVIEW?
Is there a way to link two indicators on a LabVIEW front panel, so that they always have the same value? Right now I'm setting both to the same value every time, but it'd be much easier if there were a way to set up one to mirror the other.
You can make the digital display visible. Right-click on the slider and select "Digital Display" from Visible Items.
There are a few ways to achieve this, depending on how you are trying to display the data.
If you are just trying to update a slider and make a textbox indicator display the numeric value then by right clicking on the slider and selecting 'Visiable Items -> Digital Display' you will have a numeric indicator showing the value of the slider. This can then be repositioned as required. You should see if this meets your requirements as other methods will add complexity to your Block Diagram.
An alternate method would be using a network shared variable and binding the data although I think from your question this would be over kill.
You can also create an event structure to look for a value change event for the slider and update the text indicator accordingly. You would have to be careful how you update the slider as just wiring a value to the slider will not trigger an event for use a property node linked to the slider for the property 'value(signalling)'. Again this may be over the top for your application.
Strictly speaking, no, you can't do that automatically. What you can do is set up an Event Structure and use the Value Changed events for each of the two controls to update the other. Just realize that the slider fires value changed events many times while the user is sliding it around, rather than just one event at the end. That may be what you want in this situation, however.
I think this is not easily done, however there are some possibilities (as discussed). The general question is why? You have an indicator with the same info at two places. (or are they actual controls?) If you have two indicators, just place there terminals next to each other, just remember when you alter one of the two (via a local or by ref) to mimic the action for it's twin.
Using a value change event for both controls should work, just remember that you might get race conditions if you don't process the event directly.
Could describe a little bit further why you need two controls for the same action/value?