LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i set case structure always true on boolean impulse?

Hello everyone! I need a little help. All i want is to set a condition when to acquire data from my acquisition board. I have a sinusoidal pulse and when value its near zero (between 0.5 and -0.5) i want to start to write data and also stop condition. How can i make my case structure to remain set to true until next condition? Thanks in advance!

0 Kudos
Message 1 of 5
(2,892 Views)

Hi sda,

 

don't use the inner while loop. Especially when it tends to run endlessly…

 

How can i make my case structure to remain set to true until next condition?

When you want to keep values from previous iterations you need to learn to use shift registers. And you need to learn to combine boolean signals like

IF current condition <> previous condition THEN
  switch condition
ENDIF

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,879 Views)

1.  You do NOT want that while loop that does the range check.

2.  You should use a shift register to keep track of if you are running or not.  So when you are in the range, invert the boolean you are storing in the shift register and use another case structure to handle the reading or stopping.


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 3 of 5
(2,877 Views)

Thank you! I'm a beginner in labview and any advice is welcome! 🙂

0 Kudos
Message 4 of 5
(2,870 Views)

@sdadasdas wrote:

Thank you! I'm a beginner in labview and any advice is welcome! 🙂


I highly recommend tutorials if you are really new.  Otherwise, just keep asking questions.  You'll figure it out soon enough.

3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products


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 5 of 5
(2,846 Views)