LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logic

Solved!
Go to solution

Hey guys,

 

This might be a silly question but can you guys just give me a pointer on this. I am performing some decision making in vision builder and i am looking to do the following but my logic is not up to scratch I have an input it varies from 0-6 and i have only one output. For instance if input is 0 then output is 0, if input is 1 then  output is 12,if input is 4 output is 235 etc. thanks guys. 

 

Damien

0 Kudos
Message 1 of 7
(2,727 Views)

Is there a mathematical patern?  If not, just use a case structure (it will accept numerics).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,725 Views)

You could also create an array of your wanted output values and then use your input as an index into that array.

0 Kudos
Message 3 of 7
(2,717 Views)

Hey,

 

Its in the vision builder so the case function is not provided just a for loop and a while loop. I cant create an array either it just provides the array functions pallette for example array size, index, initialize array. There is no pattern to the outputs either outputs are 0,12,24,50,120,230 etc.

 

Damien

0 Kudos
Message 4 of 7
(2,711 Views)

I have trouble believing there's not a case structure or the ability to create an array constant.  Those are crucial parts of programming.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(2,707 Views)

Its in the vision builder automation inspection environment.Unfortunately there are few functions to work with because you are using a calculator tool all you have is boolean, comparison array functions.

 

Thanks for the reply 

0 Kudos
Message 6 of 7
(2,697 Views)
Solution
Accepted by topic author Damien129

You could do any of the suggested ideas in a LabVIEW vi, then run the vi from Vision Builder under the additional tools tab.

 

It is helpful if you post questions about Vision Builder in the Machine Vision forum, this will avoid confusion about what you are asking.

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 7 of 7
(2,691 Views)