Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't call labview vi step in VBAI 3.0

Hello, I'm trying to call my vi in the labview step, but it doesn't work. the VBAI 3.0 seem not recognizing the vi. it says can't found the vi. first i thought that there was something wrong with the vi. then i tried to load the .dll example from the labview 8.0 it seems not working either.
is there something that i missed to install for my VBAI to recongnize all vi that i'm trying to load?
 
regards
 
Tchaou  
0 Kudos
Message 1 of 22
(5,211 Views)

Hello Tchaou,


Calling a LabVIEW vi from VBAI is normally very straightforward.  There is nothing extra in VBAI that you need to install for this functionality.  One thing I would like to point out is that with VBAI 3.0, you will need to use vi’s created in LabVIEW 8.0.1.  Please ensure that this is the case.  You can also take a look at the Chocolates Inspection.vbai example inspection in VBAI.  It calls a LabVIEW vi, and you may be able to apply the configuration there to your code.  Also take a look at the help for the Run LabVIEW VI step in VBAI.  In here it lists information about getting Run LabVIEW VI to function properly.  One thing that it notes is that you will need to save a vi for distribution if you are using it on a remote target, such as the CVS 1450.  Please let us know if you have further questions.

Regards,
Luke H

0 Kudos
Message 2 of 22
(5,172 Views)
hello luke, first thanks for your response
i'm trying to create a VBAI custom step for my VI. but i want to know how should i adding my code to the VI which i should modify. i tried to add my code in execute mode (figure2) but i still dont get my input and output to the VI icon.
i want to know if i'm obligated to create the figure1(attached file) if so how do i get the vision builder AI engine(blue icon)to include there.
 
regards
 
Tchaou
0 Kudos
Message 3 of 22
(5,098 Views)
Hi,
 
It is unclear to me what exactly you're trying to do. You're talking about Run LabVIEW, but showing part of the help of the Vision Builder AI developer's toolkit.
Vision Builder AI has 2 distinct features to add your custom function:
 
1) the Run LabVIEW step, that you can use to call a VI that performs a specific task. You write your VI is LabVIEW (version 8.0.1 if you're using Vision Builder 3.0), save your VI and all it's hierarchy (including vi.lib VIs) in a llb. Then use the Run LabVIEW step from Vision Builder AI to call your VI. The run LabVIEW step allows to set Vision Builder AI results to the controls on your VI's front panel, and the step will output results corresponding to the indicators of your VI.
 
2) Create a custom step with the Vision Buider AI developer's toolkit (SDK). (You need to purchase a separate license to use it).
The SDK is a more advanced way of adding functionality to Vision Builder AI. It allows to create your own native step, with your own UI (as opposed to using the interface of the Run LabVIEW VI to set the controls and retrieve indicators of the VI you're trying to run.
The SDK also allow to perform advanced things, like initialization of hardware devices for example when you open an inspection containing your custom step, and cleanup when you close the inspection.
This is a more advanced feature and requires a steeper learning curve to use. You access it from LabVIEW (Tools>>Vision Builder AI 3.0) and have access to functions to create a custom step template, debug it and save it for distribution.
 
Use the SDK if you're not the end user and you want the end user to be able to change the parameters of your custom step.
Use the Run LabVIEW VI if you don't need any specific initialization/cleanup code, and don't care as much about a custom user interface to set the inputs of your custom algorithm. As Luke mentioned, Vision Builder AI ships with an example showing how to use the Run LabVIEW VI.
 
I am attaching a NI-Week 2005 presentation that gives you more information on both features.
 
Hope this helps,
 
Best regards,
 
Christophe
NI Vision R&D
Message 4 of 22
(5,093 Views)

Hi Christophe,

Thanks a lot for your answer. Now things are clear in my head and i know what i can to do next.

Best Reagards

Tchaou

0 Kudos
Message 5 of 22
(5,075 Views)
Hi Christophe,
I did an application according on what you told me days ago. i made one program with the first option (Run labview step) and all things are good. and i made the second one using the second option (Custom Step) it's works too but not totally. the subVI (the green one one the first attached)can't run. i attached the subVI and the design i made on the execute case of the VI modify my code. I want to know also if is there any way for me to access my output as "Model" from Overlay in VISION BUILDER? because i want to be able to give data to the custom step and than get them for display as overlay.
 
Best Regards,
 
Tchaou
Download All
0 Kudos
Message 6 of 22
(5,048 Views)
Hi,
 
> i made the second one using the second option (Custom Step) it's works too but not totally. the subVI (the green one one the first attached)can't run.
 
The VI doesn't seem broken in the screen shot you attached. I tried to open the VI you attached to the post, but I am missing the subVI it's calling (ModelD2 (subvi).vi). You have to save the VI and its entire hierarchy in a llb for me to be able to look at it.
 
> I want to know also if is there any way for me to access my output as "Model" from Overlay in VISION BUILDER?
 
Yes, the custom step is able to log measurements that you can access in further steps in Vision Builder AI. The measurement you want to log is a string.
You have to use flatten that string into another string using the "Flatten to String" VI, then build the output into the "Measurements" array indicator that is already on the front panel of the - User Programming VI. For an example on how a custom step publishes measurements, create a custom step with the template:
"Processing Step that Logs Measurements" from the custom step creation wizard.
 
Christophe.
 
 
0 Kudos
Message 7 of 22
(5,045 Views)

Hi Christophe,

here is the subVI that i'm using. sure  the VI is not broken but on the user interface VI when the program is executed i can read on the running button:"wait for the SubVi to run". Could you please look up on the print screen i attached (precedent mail) if that's the way i should insert the code weither i should insert the setup code to run the SubVi.

regards,

Tchaou 

0 Kudos
Message 8 of 22
(5,041 Views)

I think you forgot to attach the subVI. Did you save it in the same llb as the custom step llb? It would be easier for me to debug if you actually sent your custom step LLB and all its dependencies.

Inserting the code that you want to run at each iteration in the "Execution" case is the right thing to do. You don't have to create additional Error clusters and it is recommended that you use the ones that are already on the User Interface to connect in and out of your VI.

Best regards,

Christophe

NI Vision R&D

0 Kudos
Message 9 of 22
(5,042 Views)
hi Christophe,
here's the rest of files that you needed.
 
regards,
 
Tchaou
0 Kudos
Message 10 of 22
(5,034 Views)