04-20-2013 08:51 AM
Hello, I am using the cRIO-9023, and the NI9213 module to read temperature from thermocouples. I give the user up to 16 thermometers allready programmed in labview to display the temperature. The issue I have is, I want to turn off the thermomiters if no thermocouple is plugged in. I called NI and they said there is no built in function to test this, so I have to check by comparing the value. for example if the units are set on fahrenheit, then if a thermocouple is not plugged in it reads at like 2500 degrees, so what I want to do is test if the type is fahrenheit, and if it is, then have my max temperature set to 2000 degrees. Then I can test IF temp ? 2000, turn off thermomiter.
How do I micic a programming statement like this:
If Type = Fahrenheit THEN maxTemp = 2000
ELSE IF Type = Celsius THEN maxTemp = 1500
Basicly I want a boolian to trigger an action of setting some indicator.
Also, if I set a indicator to dome value, how can I read it by another controll ?
I would like a way to do this without globial/local variables as my cRIO does not like them.
Thanks!
Solved! Go to Solution.
04-20-2013 09:14 AM - edited 04-20-2013 09:15 AM
Use a case structure or even select if you just have two possibilities.
04-20-2013 09:32 AM
I have 5 cases (Kelvin, Celsius, Fahrenheit, Rankine, and volts), and Iam attmepting to use the case structure, I had nested cases, and I wire different constants (for the different types from within my cases out to an indicator. From there, how can I read from that indicator so that I can ues it for the other logic ? right now I can only hook up imputs to the indicator, but I want to read what the indicator is, so that I can use the value elseware.
04-20-2013 09:38 AM
Use an appropriate comparison function. Greater in this case.
04-20-2013 09:53 AM
I tried it and it is working! Thank you!