05-03-2022 07:54 PM
Hello,
This is sort of a repeat post and I am pretty new to LabVIEW, but I am currently using a USB-231 to read voltage, current, pressure, and radiation from several sources. Each variable is increased incrementally. What I would like to do is write something that states if any of those variables goes above its limit, it forces that value back to what it was at before. I tried using in range and coerce inside a case structure but there seems to be a lot of flaws in doing that. I attached a jpeg of the portion of my VI that involves just the voltage variable. If anyone has any feedback or if I need to clarify something please let me know.
Thank you!
05-03-2022 08:14 PM - edited 05-03-2022 08:17 PM
@tjhanks wrote:
Hello,
This is sort of a repeat post and I am pretty new to LabVIEW, but I am currently using a USB-231 to read voltage, current, pressure, and radiation from several sources. Each variable is increased incrementally. What I would like to do is write something that states if any of those variables goes above its limit, it forces that value back to what it was at before. I tried using in range and coerce inside a case structure but there seems to be a lot of flaws in doing that. I attached a jpeg of the portion of my VI that involves just the voltage variable. If anyone has any feedback or if I need to clarify something please let me know.
Thank you!
What kind of "flaws" are you talking about? All the issues I know of simply stems from the lack of knowledge about floating point numbers and/or the fact that a programmer might not be aware that you can change the configuration of the terminals to make then end points inclusive or non-inclusive.
Normally the output of the In Range And Coerce is used as the input to a case structure, so I think it is best if you posted your code.