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.

Answers


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?

Ton


Need Your Help

MultipartForm handling with Spring

java spring resteasy

This code is a RestEasy code for handling upload:

Golang crypto multiple calls have different responses

cryptography go hmac sha256 scrypt

I'm having a problem with some Go code I've written for a password authentication library. The general idea is to provide 2 functions, Check() and New(), which are both provided a password and a 25...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.