10-31-2015 12:53 AM
Hi All,
My group are trying to do a programming on the labview where the user can input their age, for instance 20 years old at the prompt user input. The program would then lead to - if the user is between 20 and 29 years old, it would lead to that specific range of heart bpm for that age group and determine whether it exceed 140 or below 60 and the alarm would ring. (We are going to set up different age groups and their heart range)
However, we have difficulties trying to connect the two set of conditions together - the case structure of the age range and the while loop of the heart beat range. We are not sure if we did the right thing. I have attached the pictures of the block diagram that we set up and also the errors that resulted. Do anyone have any ideas or suggestions on how we can improve on it and make the two conditions connect? We hope to get some enlightenment. Thank you.
10-31-2015 01:34 AM
Start with a few basic LabVIEW tutorials.
Everything belongs inside the while loop, of course. Where is the database of limits for each age group.
10-31-2015 02:48 AM
Hi altenbach,
What do you mean by database? Is it the some vi to be included in the block diagram? Or is it read from an external file?
Thank you very much.
10-31-2015 06:38 AM
You nave different limits for each age group. Where is that data kept? Easiest would be a 2D array with the upper and lower limit contained in each row. One row per age group. So once you determine the age group, you can just index into the arrays to get the limits.
Should it be hardware into the code or read from an ini file, for example.
10-31-2015 03:33 PM
One useful function would be Threshold 1D Array, which you can use to figure out which group you're in and you can use that value to index the min and max values out of an array (that would be the DB altenbach referred to), so you don't need a case at all, because the logic is the same and only the values are different. You can also use In Range and Coerce to compare the values.