Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading in configuration values from file with Vision Builder AI

What is the best way to read in configuration values from file at the beginning of a "Vision Builder for AI" execution.
The sequence I'm creating contains alot of global variables with all sorts of product variables in it. (needed to support the wide range of products to be tested)
 
I noticed that Vision Builder for AI doesn't have support for reading in configuration files. (txt, ini, xml, or whatever ...)
 
 
What is the best way for me to read in different configuration values?
Is there no other way then doing this in LabVIEW?
Do I need to create a "Configuration File Read.vi" and pass it all the global variables it want to update from file.
Note that for my application this will be more than 50 global variables !!!!!!
 
I would appreciate your thoughts on this matter.  What is the best way to proceed on this?
Thanks in advance for the help!
 
noxus. 
0 Kudos
Message 1 of 4
(4,241 Views)
Hi Noxus,
 
I think the best way to do that is to write a LabVIEW VI that uses the LabVIEW Configuration file VIs to read from your ini file.
Your VI can read multiple keys at a time, and output all 50 default values. Then call that VI using the Run LabVIEW VI step in the Inspection Setup state of Vision Builder AI, followed by a Set Global variable step to initialize all your variables.The Run LabVIEW VI step will make all the indicators of your VI available to the Set Global Variable step, so you should only need those 2 steps to initialize all your global variables.
Note that VBAI lets you choose initial value for your global variables when you create them. I like your suggestion of letting the user choose the default value from an ini file.
 
Hope this helps,
 
-Christophe
0 Kudos
Message 2 of 4
(4,226 Views)

Thanks for your answer Christophe! Smiley Happy

OK, I was able to do it the way you described. Now I'm wondering. I don't have the Compact Vision system yet (will arrive soon) but will this also be possible with the Compact Vision system. I developed my vi in LabVIEW 8.0.

Are there any other requirements for running my apps on the CompactVision system? Do I need LabVIEW real time or the NI Vision Software besides the Vision Builder package? Or is it enough that I have Vision Builder AI and LabVIEW 8.0 Professional.

Bye for now,

noxus.

0 Kudos
Message 3 of 4
(4,200 Views)

Hi,

> Now I'm wondering. I don't have the Compact Vision system yet (will arrive soon) but will this also be possible with the Compact Vision system. I developed my vi in LabVIEW 8.0.

Yes. Except for some I/O steps that are specific to Windows (Acquire Image step, NI-DAQmx step that acquire from plugin boards only), all the functions available on Windows are also available on the CVS. For image acquisition on the CVS, you need to use the Acquire Image (IEEE 1394) step. For driving the I/Os on the CVS, use the NI-IMAQ I/O step.

The Run LabVIEW step IS supported on the CVS. The only thing you should know is that you need to manually ftp the llb or VI you're calling on to the CVS flash. When you do your prototyping, if you save your llb/vi on the C drive of your PC, nothing will have to change in the inspection once you target the CVS. Otherwise, you're just going to have to open the Run LabVIEW step and change the path to point to the location where you would have copied the file on the CVS.

> Are there any other requirements for running my apps on the CompactVision system? Do I need LabVIEW real time or the NI Vision Software besides the Vision Builder package? Or is it enough that I have Vision Builder AI and LabVIEW 8.0 Professional.

There are no other requirements to run your application on the Compact Vision system. To configure it, just launch Vision Builder AI and select "Select Network Target" to configure the CVS. Vision Builder AI will download all the required sofware on the CVS.

Hope this clarifies things. Don't hesitate to contact if you have difficulties setting up your system when you receive your hardware.

Wishing you a successful application and deployment,

Best regards,

-Christophe

NI Vision R&D

0 Kudos
Message 4 of 4
(4,197 Views)