LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the current max value of a measurement

Solved!
Go to solution

How can I get the current max value of a measurement?

 

https://forums.ni.com/t5/LabVIEW/How-can-I-return-the-Maximum-value-from-a-voltage-sensor-over/m-p/3...

 

I've tried the while loop max-min-solution described in this link. But using this my myRio Acceleration measurement dosen't work anymore. It seems to crash.

I'm using I2C-Communication.

 

 

 

 

 

 

 

 

Original-program.png

0 Kudos
Message 1 of 4
(3,506 Views)

While Loop program.png

0 Kudos
Message 2 of 4
(3,505 Views)
Solution
Accepted by topic author Maloya

The inner while loop is a bad construct.  It will either run once if the boolean entering it is True, or run forever if the boolean is false.

 

Put your shift registers on the timed loop and eliminate the inner while loop.  Then your code should work.

0 Kudos
Message 3 of 4
(3,494 Views)

Hi Maloya,

 

THINK DATAFLOW!

(And debugging would help here too…)

 

Your inner loop will block and never stop - due to dataflow.

 

Get rid of that inner loop, use the one you already have to put your shift registers on!

 

Hint: Next time you should edit your own post instead of creating two more messages just to attach one changed image…

Best regards,
GerdW


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