LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel access without local variables

You can wire the data out of the case structure through a tunnel and pass it to the indicator's terminal which is placed outside of the case structure.

0 Kudos
Message 11 of 13
(571 Views)

 

 


@Ravens Fan wrote:

You can wire the data out of the case structure through a tunnel and pass it to the indicator's terminal which is placed outside of the case structure.


Yep. If a frame in the case structure does something such that it takes too long to get out of the frame to populate the terminal, then redo your cases* so that you CAN do what Ravens said. Terminals should be updated only in one place. In the rare case where this can't be done in the main loop containing the case structures, then you can make a separate parallel loop and put your terminal(s) there, and update them using a Queue or Notifier. What we are trying to avoid here is two fold: Unnecessary UI threads and Race Conditions.

 


@Manatee wrote:

Well in one case there are three visa writes, each of which expect an acknowldge back from the serial device. So then in this case alone, it requires three writes to the same front panel indicator.


That sounds like a job for three cases. You are using a state machine, right?

@Manatee wrote:

Its as if I have failed at data flow programming when I have to resort to any kind of variable.


There are no varibales in LabVIEW in the same sense that C or text based programming languages have. And yes, you are braking data flow by using locals, globals.
Once you wrap your head around this, yoy might ask yourself, "then why are there local and global variables in LabVIEW?" .....Smiley Indifferent
Richard






0 Kudos
Message 12 of 13
(562 Views)

I am actually just using an event structure to handle UI events that then call a particular case using a type defined enumeration. But I can see what you mean. I could nest a couple more cases to handle the needed extra two visa writes. I can nest two more cases in the case that requires the extra writes.

Do or do not, there is no try
0 Kudos
Message 13 of 13
(535 Views)