LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange behavior

The issue is that everything works, but the instrument itself is always a step behind the front panel.  I.e., I flip the Hi Res switch and nothing happens, then I flip another switch, say the damping switch, and then the Hi Res responds.  I then flip another switch, and then the damping resonds.  The switch controls the correct parameter, but it is always behind by one action.

 
0 Kudos
Message 1 of 7
(2,588 Views)

Hi Jack,

 

so there is a problem with your VI, but there is no VI with your message...

Which kind of answer do you expect with this little information?

 

Generic answer: this sounds like a race condition problem...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,578 Views)

My guess is you are missing a termination character or something in your message so the instrument is stuck looking for the end of the message.

 

What instrument are you using?  Can you share you code?


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
0 Kudos
Message 3 of 7
(2,544 Views)

The problem is with the wiring in your block diagram.  Fix that and it will be fine.Smiley LOL

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 7
(2,536 Views)

Sounds like you have a bug in your program.

 

Without seeing your code that's all the help we can give you.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 7
(2,519 Views)

See here for excellent advice on diagnosing strange behavior

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 7
(2,514 Views)

Yes, we cannot debug sentences to fix your race condition.

 

Without knowing anything about your code architecture, we are all stabbing in the dark.

 

One thing that has not been mentioned is a scenario where your control terminals are before (or in parallel) to an event structure that gets triggered by e.g. a value change of same. The terminal gets read at the beginning of the new iteration and way before a value change triggers the event structure. Now the new values is only read from the control at the next iteration.

 

Please attach a simplified version of you VI and we will be able to help you.

0 Kudos
Message 7 of 7
(2,507 Views)