LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two indicators of only one variable

Hello,

can I have two indicators of the same variable on the fron page??

I can do this by add another variable and put the value of the first into it but it's a long program.

is there an easy way to do this?

Thanks,

Etay

0 Kudos
Message 1 of 15
(4,062 Views)
You can create as many indicators for a single wire as you like, there is no need for using any local variables at all.
0 Kudos
Message 2 of 15
(4,057 Views)

First, thanks for the quick answer 🙂

maybe I''ll more clear about whatr i'm asking.

I have a numeric control and it changes through the program many times using local variable. on the front page i can see the this chages becasue there's indicator.

now, i want to have a second indicator on the front page for the same numeric control.

how can it been done?

Thanks,

Etay

0 Kudos
Message 3 of 15
(4,050 Views)

You already have a valid reply to your query but the wording of your Q hints at potential issues in your code.

 

A control or indicator are not variables, they should be thought of as a graphical "printf".

 

Variables live in wires or other diagram structures.

 

It may sound like I am splitting wires but if you get this idea wrong in LV you could be setting yourself up fro trouble.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 15
(4,046 Views)

OK.

Ben, maybe I'm a slow catcher but I still don't get it.

after I defined Numeric Control on the front panel I can see the value of it. This value changes through the program.

what I want is to have another display of the same numeric control at a different spot on the front panel.

Thanks for your patience,

Etay

0 Kudos
Message 5 of 15
(4,025 Views)

Hi Etay,

 

in LabView the wire is the variable!

 

See example. You can create as many indicators as you need...

Message Edited by GerdW on 03-09-2009 05:39 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 15
(4,017 Views)

How did you create the original front panel indicator? Did someone do this for you or did you copy some code? If you don't know how to create a front panel indicator, that might explain your comment about numerous local variables. That points to a serious design flaw in your program.

 

If you need to learn how to create controls/indicators and wire them up, I suggest spending quite a bit of time with the free tutorials. You might want to search the forum for some opinions on the use of local variables instead of wires as well.

Message 7 of 15
(4,014 Views)
I wish I had learned how to only use wires as variables when I first began...  I saw programs with hidden controls, Local Variables and Property Nodes and thought that was the correct way to pass data.  I sure wish someone had shown me how to:
  1. initialize a data cluster & pass it through every state of a State Machine (using a Shift Register - each FP control/indicator has a corresponding element in the cluster, in addition to any other items)
  2. use an Event structure to update the cluster when a control is changed
  3. update indicators in a state dedicated to pushing the latest data to the Front Panel
Here's an example I posted to the JKI forum - they released their State Machine framework and a bunch of information teaching how to use it.  Notice that I update the "Tests" indicator in the Timeout case of the Event structure.  
You should start focusing on style early if you're interested in becoming a good LabVIEW programmer.  I'm interested in becoming one, too.
Message Edited by jcarmody on 03-09-2009 12:25 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 8 of 15
(3,991 Views)

Hi Gerd,

In the example you send you defined Numeric control and Numeric indicator (which you named as 'same numeric') and you put inside it the the value of the numeric indicator.

so on the front panel you can see the Numeric Control and the Same numeric.

My problem is as follow:

I have a long program in which my numeric control changes a lot during the program. i don't want to go over all the program and connect 'same numeric' indicator to it.

I just want to see it's display in both places on the fron panel. 

is it possible?

Etay

0 Kudos
Message 9 of 15
(3,963 Views)

Hi Jim,

unfortunlly I use LV 8.2 so I can't use the example you posted.

loved your line from princess buttercup...

Etay

0 Kudos
Message 10 of 15
(3,961 Views)