Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Custom Steps in VBAI

Hi guys

I've experienced a strange problem when using custom steps in VBAI 3.0.1. The problem is that I cannot use a reference to control anywhere within the VIs belonging to the custom step. When I do, it's not possible to insert the step into the script. The setup window closes immediately after it opens and the step is canceled.

When I test my step in VBAI from LabVIEW, everything works fine. The problem starts when the step is built for distribution.

I am attaching a custom step for demonstration. I have started with the template "Simple Processing Step". The only little change I've made is that I've inserted a reference to the "ROI Descriptor" control into "Ref Problem - User Programming.vi". However, the problem happens with references to any other control, even when used in the SubVIs.

Is this an expected behavior?

Vladimir

Message Edited by vdrzik on 08-27-2007 04:06 PM


View my profile on LinkedIn
0 Kudos
Message 1 of 7
(4,509 Views)
Hi Vladmir,

Thank you for posting to the NI forums! I tried making a simple VI with a reference to a boolean control, and running it from VBAI.  The VI was written in LabVIEW 8.0 (it has to be), and the version of VBAI is 3.0.1.  The VI imported successfully, and ran perfectly.  Try recreating that scenario on your computer to see if you get the error.

Regards,
Maclean G.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 7
(4,489 Views)
Hi Maclean

Thank for your reply. I think you are writing about calling the VI by using the "Run LabVIEW VI" step. But that is not what makes the problem. My problem is with the custom steps, created by VBAI Development Toolkit. The llb I attached to my previous post is a template which is provided directly by the development toolkit, only slightly modified as I wrote in the post.

Vladimir

View my profile on LinkedIn
0 Kudos
Message 3 of 7
(4,479 Views)
Hi Vladmir,

Why are you trying to reference a front panel object? What functionality are you trying to gain with a reference? There are no front panel objects displayed when the custom step runs, so why would you be using a reference to one?

Regards,
Maclean G.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 7
(4,453 Views)
Hi Maclean

You are right, the control references are actually not needed if you don't use front panel objects while running the custom step. My original problem was that I had some controls in my VIs, which were updated through reference. It was mainly a debugging feature to show some intermediate data in my computation. These controls were not shown during the run of the "distribution version" of the custom steps, but helped me while developing. The problem was that after building such a custom step for distribution, it no longer worked in VBAI and VBAI showed no warning message as to where the problem is. So I spent quite a lot of time tracking it down.

Now I've removed the control references, so my custom step is running well, but when I want to do some more development on the step, I will have to put them back for debugging. That's quite annoying. Moreover, my question is if this is really an expected behavior of VBAI. If for some technical reason it is not possible to use control references in the custom steps, it should at least pop up a warning message about that.

Vladimir

View my profile on LinkedIn
0 Kudos
Message 5 of 7
(4,442 Views)
Vladimir,
 
The reason the step gets broken when you use references and build the step is because the front panel of the VI gets removed when we save the step for distribution.
To prevent that from happening, hide the scrollbars of the VIs where you use references. This is a trick we use to know we have to keep the front panels of the VIs when we save the step for distribution. To do that, open the VI Properties, go to the Windows Appearance category, click Customize, and uncheck Show Vertical Scroll bar and horizontal scroll bar.
This should be fixed in the next version of the SDK.
 
-Christophe
 
Message 6 of 7
(4,410 Views)
Hi Christophe

Smiley Very Happy This is a funny trick indeed.
Yes it works now. Thanks a lot, now I understand it.

Vladimir

View my profile on LinkedIn
0 Kudos
Message 7 of 7
(4,398 Views)