LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sample rate and channel doesn't update until next cycle

Solved!
Go to solution

Hello all,

 

I'm new to LabVIEW and I've written code for temperature measurements using the NI cDAQ-9178 and  NI 9214. Could someone please look at my code and help me to understand why ... my sample rate and channel names do not update, until the next time that I run my program.

 

For example:  if I enter the channel name "ONE" and sample rate "10" ... and press run my program will run using previous information entered by user. If I press run a second time, then it will use channel "ONE" and sample rate "10". Does anyone see what I've done wrong?? I know that my code is lacking, but it's doing everything that I need, except for the updating.

 

I'd really like to use an event structure, but failed miserably in my attempts. Thanks

0 Kudos
Message 1 of 3
(2,552 Views)
Solution
Accepted by topic author mzlhb

Data flow.  Your updates of the values in your subVI are running in parallel to your Event Structures.  The simple solution is to just put your updating of the values inside of the event case.  This way the controls are not read until you actually press the Next button.


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
Message 2 of 3
(2,542 Views)
Solution
Accepted by topic author mzlhb

Thank you crossrulz that worked perfectly ... yay!! I don't know how to mark your answer as the solution to my question ... like I've seen on other post. So I'll give you kudos instead. Thanks you so much!!!

0 Kudos
Message 3 of 3
(2,525 Views)