ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean counting?

Solved!
Go to solution

Good morning, I'm a novice to Labview so take it easy on me. What I'm trying to do is: Run a while loop after 1 true, 1 false and 1 true boolean. I'm trying to start a measurement when a digital input off a TTL goes high the second time, so I can get a good zero reading. I've searched the forums but can't get a grasp on what I'm doing exactly. Any help would be greatly appreciated.

0 Kudos
Message 1 of 13
(4,075 Views)

Like this?

check.png

(It's a snippet!)

Best regards,
GerdW


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

what's the red/green icon? I've never seen that. And how would this be implemented for a while loop to run?

0 Kudos
Message 3 of 13
(4,062 Views)
Solution
Accepted by topic author glskinner

Hi skinner,

 

that's why I wrote: IT'S A SNIPPET!

 

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 13
(4,048 Views)

It worked! Thank you, Gerd!

0 Kudos
Message 5 of 13
(4,035 Views)

my only issue is that it's not counting correctly. Sometimes when the input is true, the counter reads false...and other times it reads true.

0 Kudos
Message 6 of 13
(4,026 Views)

Hi skinner,

 

dunno what you're talking about...

 

Show your VI!

Best regards,
GerdW


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

here it is! 😄

0 Kudos
Message 8 of 13
(4,019 Views)

I need the measurements to run after 2 trues from the digital input

0 Kudos
Message 9 of 13
(4,014 Views)

Hi skinner,

 

- using the STOP function is completely wrong here...

- you're not obeying the DATAFLOW: how will you detect any DI signal changes in your loop when you don't read in your DI signal in the loop?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(4,013 Views)