02-23-2015 11:13 AM
looking at these functions they only have a boolean output as opposed a number output.
i'm looking at a scenario like:
if;
16 put out 16
18 or 20 put out 32.
02-23-2015 11:16 AM
If you have simple enough logic you can use the Select function to output a value based on some true/false condition.
http://zone.ni.com/reference/en-XX/help/371361L-01/glang/select/
As your logic gets more complicated it might be easier to just use a case structure.
02-23-2015 11:28 AM
@pjh-10 wrote:
looking at these functions they only have a boolean output as opposed a number output.
i'm looking at a scenario like:
if;
16 put out 1618 or 20 put out 32.
Because they do the function they were designed for, tell you whether something is less than, greater, then (or equals as well.)
Use a case structure as pointed out at http://forums.ni.com/t5/LabVIEW/Tab-control-and-Ring/m-p/3093407#M884876
02-23-2015 11:29 AM
@pjh-10 wrote:
looking at these functions they only have a boolean output as opposed a number output.
And why should they? The do the comparison. They shouldn't do any more. Now what you do with the results of those comparisons is completely up to you.
In the specific case you gave, I think you should use a Case Structure and wire the number directly into the case selector. You can manage ranges of numbers with the case structure, which I think will do exactly what you want.
02-23-2015 11:36 AM - edited 02-23-2015 11:41 AM
@pjh-10 wrote:
i'm looking at a scenario like:
if;
16 put out 1618 or 20 put out 32.
02-24-2015 12:25 AM
02-24-2015 03:25 AM
A word length is read (it’ll either be 16/18/20)
if 16 I want to pass it on to a case structure of 16
if 18/20 onto the 32 case structure
02-24-2015 03:58 AM
are you looking for something like this?
02-24-2015 04:00 AM
02-24-2015 07:28 AM
I'm also concerned. When I use add, it just adds the numbers. It doesn't tell me how many times the add primitive has been called. Why doesn't LabVIEW tell me that? It should know I want it to do more after it adds.