LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read the values of front panel variables in loops without using local variables or value property nodes?

Solved!
Go to solution

@Ben wrote:

@iCat wrote:

@P Anand wrote:

How about

?


You should be more specific when you want to solve any problem. Please do not post very simple question to which the others cannot understand whats in your mind and what you want to achieve. Please explain as much as possible so that you will not be questioned.

 

Good luck.



I want to know if using local variables that way is safe.


 

Judging by your questions I hope not to be singing an old song to you but...

 

Please do let yourself be mislead by the term "local variable" and thinking they are the same as locals used in text based languages. While in other lahguages, a local is a name associated with a memory location, in LV a local is a method of accessing a GUI object that should be thought of as an I/I device that lets you update a user or get a selection from a user. We would never think of using a register in the I/O device as a method to share data between threads in other languages and similarly, we should not use locals to share data in LV. They are I/O devices.

 

There are many methods to share data and comunicate across threads process contexts and platforms for that matter.

 

One of the simplest to understand, flexible, robust methods is an Action Engine (see the link provided above).

 

And in the event you missed it...

 

Local in LV = I/O device.

 

Ben

 


I wasn't using it as a local variable in the same sense as other languages.

 

I did that because that was the only way, which I knew, to have a tab control switch to the next tab entry every second.

 

Do you know a safer way to have a tab control switch to the next entry?

0 Kudos
Message 31 of 38
(1,145 Views)
Solution
Accepted by topic author iCat


I wasn't using it as a local variable in the same sense as other languages.

 

I did that because that was the only way, which I knew, to have a tab control switch to the next tab entry every second.

 

Do you know a safer way to have a tab control switch to the next entry?



There is nothing wrong with using a local variable for that.

=====================
LabVIEW 2012


0 Kudos
Message 32 of 38
(1,139 Views)
Queue should not be used this way. You can broadcast a message using notifier.
0 Kudos
Message 33 of 38
(1,128 Views)

Mea culpa for mentioning queues in the same sentence as notifiers. 😛

0 Kudos
Message 34 of 38
(1,117 Views)
Actually my reply above is for apok's example on the first page of the topic. Sorry, I did not link the reply to his message.
0 Kudos
Message 35 of 38
(1,112 Views)

@Sergey Kolbunov wrote:
Actually my reply above is for apok's example on the first page of the topic. Sorry, I did not link the reply to his message.

Yeah but it might be my fault he gave a queue example. Anyway, the gentle nudges in the right direction have been made. 🙂

0 Kudos
Message 36 of 38
(1,107 Views)

@Hornless wrote:

 

Anyway, the gentle nudges in the right direction have been made. 🙂



yes, it has....

 

  • "A queue can be used as a  "Many-Into-One" tool. Many data sources can feed a queue; the data is retrieved in one place.": LabVIEW example,Queue multiplexer.vi
  • "A Notifier is a "One-to-Many" tool. One data source can feed many data sinks": LabVIEW example, Notifier Demultiplexer.vi.
0 Kudos
Message 37 of 38
(1,087 Views)

I think that a notifier is also a many-to-many message.

=====================
LabVIEW 2012


0 Kudos
Message 38 of 38
(1,073 Views)