LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Values don't refresh

Hi everyone, 

 

I have problem concerning refreshing data... I'd like my "Frequency (GHz)" ring menu changes its content each time the ring menu "Clock Select (MHz)" changes its value. You will see those ring menus in the "HMC6300" joined VI, under the yellow text. 

 

The current behaviour is that "Frequency (GHz)" ring menu changes its value only when i start a new execution of the VI...

 

Thanks for your help

Download All
0 Kudos
Message 1 of 10
(3,389 Views)

Your event structure prevents the loop from spinning unless the stop button is pressed. Complete constipation!

Remove the event structure and place a small delay inside the loop and you should be all good for now.

 

Ideally you want an event structure that encompasses the loop content, replacing all these case structures with event cases triggered by the relevant buttons.

 

You should also eliminate all these unecessary value property node reads. Just wire from the terminal!

0 Kudos
Message 2 of 10
(3,379 Views)

Hi, 

 

I firstly had plenty of event structure instead of case structure. but then somebody from NI told me I should not have more than one event structure... So that's why there are that much case structures. Maybe there is difference between event structure and event case and I'm going to check this out. I also will pay attention to those property nodes you mentionned. 

 

Thank you for your help

0 Kudos
Message 3 of 10
(3,309 Views)

And now that I removed event structure of stop button, my VI doesn't stop when I press on the stop button... And it is for this reason that I previously removed all my event structures: To have VI that I can stop whenever I want, without using halt button. 

 

Thank you for your help. 

0 Kudos
Message 4 of 10
(3,306 Views)

Yes, there is a difference between an event case and an event structure.  An event case is one frame of an event structure it handles one or more events.  You may have as many event cases as you need to respond to user input.  BUT, you should avaoid having more than one event structure.  There may be a use for multiple event structures but, I have never found one where it made sense.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(3,296 Views)

So, basically, what I need is one big event structure that handles each user input?

 

But, isn't there a risk that if user press one particular button, the whole loop will be executed instead of one portion of the while loop? So these case structures need to stay the way they are in the design I uploaded starting this topic to avoid execution of not desired part of the "code"

0 Kudos
Message 6 of 10
(3,290 Views)

Put the code you want to execute when an event happen in the event case that handles that event.  Better yet, use a Producer Consumer (Events) design pattern to keep the UI responsive while the consumer runs the needed code in order.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 10
(3,283 Views)

@raflouk wrote:

And now that I removed event structure of stop button, my VI doesn't stop when I press on the stop button.... 


Well, obviously you are doing something wrong, but to tell what, we need to see the code. (Could be as simple as having the terminal outside the loop or (ab)using the continuous run button.)

It is also abundantly clear that you need to freshen up on dataflow and do a few tutorials. If you continue showing your code attempts, we will continue to point you in the right direction and help.

0 Kudos
Message 8 of 10
(3,280 Views)

Thanks to both of you ! 

 

@altenbach: Yes I was using the continuous run button and so it ignored when I pressed on button

 

@

 

Message 9 of 10
(3,254 Views)

@raflouk wrote:

Thanks to both of you ! 

 

 


That is the right thing to do and why we volunteer on these forums!  Sionce you are "New" you likely reciently purchased LabVIEW and a SSP (Service Plan)  You may have access to the on-line training.  Core I covers a lot of the basics encluding how the verious structures operate.  Core II covers design patterns- or, how to use those structures.

 

Look up at the top of the LabVIEW Board and you will see these links

Capture.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 10
(3,249 Views)