05-28-2024 11:52 PM - edited 05-28-2024 11:58 PM
This still looks wrong, but since you didn't attach your VI, I'll wait until you attach it before commenting.
There is no guarantee for "exactly equal" for DBL. Do you know the number of bits in the digitizer?
05-29-2024 12:56 AM
Please tell me if you are able to access it and as for the digitizer it should be 8-bits
05-29-2024 01:19 AM - edited 05-29-2024 01:19 AM
Hi Emma,
@plssendhelp1506 wrote:
1) the color box will only be activated if it senses current into the system. So by default, it should all be black at their normal state.
There is nothing related to "sense current into the system" inside your VI.
So how do you determine when to "activate color boxes"?
To set the colorbox to black you need to define this color in your color range array and define a related range in the numeric array constant…
@plssendhelp1506 wrote:
2) The alarm will be activated if the thermocouple were to be operating at a temperature that exceeds the limit ( I did the connection but it doesn't seem to activate when i do simulation)
Why don't you use an InRangeAndCoerce function to test your Thermocouple array for your range? It has an "in range" output!
And why do you convert the result of your comparision to a numeric frequency value??? Do you know the expected values after the BoolArrayToNum function?
@plssendhelp1506 wrote:
3) to answer the question you posted, from left to right the first thermocouple will be reaching the value from up as the temperature is meant to be decreasing while the last thermocouple will be reaching the value from down since it is meant to be increasing...and yes, being exactly the limit value
Comparing floats for "exactly the same" might be dangerous - you should learn about this fact.
Why do you even use floats with 53 bits mantissa when your digitizer provides just 8 bits resolution?
Putting aside these considerations: why don't you compare the Thermocouple array with your limit value? You already know how to compare for ">=" and "<=", so what's the problem with another "=="?
On your VI:
05-29-2024 01:49 AM
Gerd already mentioned most points.
Why can't you leave out these silly things like the beep and focus on the important stuff.
It is not reasonable to wire a few Hz because that's even ignored because "Use system sound" defaults to true.
If your sensor is 8 bit, you only have 256 possible temperature values. Assuming there is some scaling/calibration involved, the DBL values will be quantized to 256 temperature values that are unlikely to exactly match your thresholds.
05-30-2024 11:53 PM - edited 05-31-2024 12:51 AM
Hello everyone, the requirement here is that beep will be activated when the temperature of the thermocouples goes beyond 190 degree celsius or below -190 degree celsius.... the colour issue has been resolved....I am not sure what i did wrongly here.....
-E
05-31-2024 12:51 AM - edited 05-31-2024 12:51 AM
Hi pls,
@plssendhelp1506 wrote:
I am not sure what i did wrongly here.....
05-31-2024 01:10 AM - edited 05-31-2024 01:13 AM
1. I thought it was different from the previous thread issue, so I started a new thread instead of just following up the old thread. I am so sorry about that!!!
2. updated one, i use temperature here instead...
3. please tell me if the file cannot be opened
ignore PID for now
05-31-2024 01:30 AM - edited 05-31-2024 01:33 AM
Hi pls,
it's still the same buggy VI…
@plssendhelp1506 wrote:
updated one, i use temperature here instead...
I converted your hidden (why is it hidden anyway?) control into an array constant:
Right now you check a whole 2D array of values for "in range": what is the EXACT condition to have the computer output the Beep?
Creating programs start with defining good requirements (aka asking good questions)!
05-31-2024 01:37 AM - edited 05-31-2024 01:46 AM
beep when any element is out of range...
if temp equals to or greater than 190 degrees Celsius OR equals to or lesser than -190 degree celsius
BEEP activated
Else
nothing will happen
so, does that implies that, or function can be used here under the temperature? if so, then how is it possible for us to connect the Boolean array with Boolean?sorry...this is my first-time using LabVIEW
05-31-2024 01:45 AM - edited 05-31-2024 01:50 AM
Hi pls,
@plssendhelp1506 wrote:
beep when any element is out of range...so does that implies that or function can be used here under the temperature ?
Yes, the OR function (or in your case the OrArrayElements function) will output TRUE when atleast one element of an input array is TRUE!
(Keep in mind the other function is called InRangeAndCoerce, not OutOfRangeAndCoerce…)
@plssendhelp1506 wrote:
sorry...this is my first-time using LabVIEW
This question has NOTHING to do with the used programming language, it's all about developing basic algorithms independently from the programming language…
(You would have the same problem of "recognize if there is atleast one element in an array of elements out of range" if you would program in C, Java or anything else.)
@plssendhelp1506 wrote:
if temp equals to or greater than 190 degrees Celsius OR equals to or lesser than -190 degree celsius
BEEP activated
Else
nothing will happen
Again you failed in providing good pseudocode!