From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to have a mirror variable for multiple indicators?

Solved!
Go to solution

Mark,

If I do that, do you know how to get rid of the shadow from my indicator? Since the indicator is not a part of tab the view will be strange with a box shadow.

 

Thanks

Mohammad

0 Kudos
Message 11 of 18
(592 Views)
Solution
Accepted by topic author mohammad_m

@mohammad_m wrote:

Mark,

If I do that, do you know how to get rid of the shadow from my indicator? Since the indicator is not a part of tab the view will be strange with a box shadow.

 

Thanks

Mohammad


The shadow should only appear when you are in the development environment editing the code. It will disappear when you run the VI.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 18
(589 Views)

Got it.

Thanks

0 Kudos
Message 13 of 18
(583 Views)

le of this thread reminded me of an absolutely disgusting way to accomplish the mirroring.

 

Databinding

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 18
(556 Views)
Solution
Accepted by topic author mohammad_m

Thanks Ben. Starting from your data binding, eventually I reached to shared variable and a way to accomplish what I was looking for. An example is attached. I created a shared variable and then from project tree drag that into front panel (Untitled 1.vi) twice which created two indicators. Then drag that to block diagram, changed access to write and wired my string content to that which turned out to be reflecting to all front panel indicators. I'm not sure this is gonna be lighter than writing into individual local variables or not because I also made another vi (Untitled 2.vi) doing the same thing but this time writing to individual local variables which turned out to have code complexity of 0.1 compare to the first vi which has code complexity of 0.2 .

Either way this should be the way of implementing variable mirroring.

 

Thanks

Mohammad

0 Kudos
Message 15 of 18
(537 Views)

I do not consider this a good solution.  Network Published Shared Variables are open to anybody on the network.  So it can be very easy to cause conflicts or cause malicious activity.  Plus NPSVs are SLOW, will open you up to all kinds of race conditions you didn't think were possible, and who knows what other issues I have had with them.  Just write your value to the multiple terminals.  Your application will actually be smaller this way and more reliable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 18
(510 Views)

@crossrulz wrote:

I do not consider this a good solution.  Network Published Shared Variables are open to anybody on the network.  So it can be very easy to cause conflicts or cause malicious activity.  Plus NPSVs are SLOW, will open you up to all kinds of race conditions you didn't think were possible, and who knows what other issues I have had with them.  Just write your value to the multiple terminals.  Your application will actually be smaller this way and more reliable.


I agree. I did write "an absolutely disgusting way " when I mentioned it.

 

On the one hand it does allow for a obtuse solution in that it is a "look Ma, no wires" way of doing it, if one hides the indicator indicating the binding is active it could be an absolute nightmare for a developer that follows up on the project figure out how it works. "Whiskey Tango Foxtrot" I can hear them already.

 

What was the line from Jurassic Park? "

 

Just because we could, does not mean we should."

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 17 of 18
(503 Views)

I agree with both of you. The only reason I marked that as a solution is it's literally a way to mirror a variable (the answer to the subject of this thread), but not a good way. For my own project I used Mark's solution by rearranging my front panel and using one indicator out of tab container but on top of that.

 

Thanks

Mohammad

Message 18 of 18
(487 Views)