From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure possibility?

Hello there,

 

I am in a situation where I want to adjust a voltage if a certain condition is satisfied.  So I tried a simple case structure. the program works fine. However, I could not figure out certain functionality that I want. I basically want to keep a voltage in a range by continuously checking the conditions (Please check the pdf attached). I was able to construct the condition check part using a case structure, however, I can't figure out how to keep the updated voltages once it updates in the case structure. 

0 Kudos
Message 1 of 3
(705 Views)

Sounds pretty straight forward to me, I have attached a VI that will be perfect for this application.

 

One of the things you are going to find out when comparing doubles is 100 > 99.999999999 and 100 < 100.000000001 

 

Long ago on this forum post I found an "=" comparison VI that takes into account the digits of precession and made a VI that has an Enum output to drive a Case Structure.

 

So what you are doing can be a easy as this.

compCapture.PNG

 

========================
=== Engineer Ambiguously ===
========================
Download All
0 Kudos
Message 2 of 3
(701 Views)
0 Kudos
Message 3 of 3
(671 Views)