09-13-2012 06:56 AM
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
Solved! Go to Solution.
09-13-2012 07:08 AM - edited 09-13-2012 07:09 AM
Is there a mathematical patern? If not, just use a case structure (it will accept numerics).
09-13-2012 07:38 AM
You could also create an array of your wanted output values and then use your input as an index into that array.
09-13-2012 08:08 AM
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
09-13-2012 08:29 AM
I have trouble believing there's not a case structure or the ability to create an array constant. Those are crucial parts of programming.
09-13-2012 08:57 AM
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
09-13-2012 11:19 AM
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.