Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder: VI ref of Custom Inspection Interface

My customer would like to have a screenshot of the front panel logged to disk. The easiest way would be a VI that takes the VI front panel reference of the custom inspection interface and create a PNG file. This could be done by a call to an external LabVIEW VI via a "Run LabVIEW VI" step.

But my problem is the VI front panel reference. Is there a way to get it within vision builder?

 

Thanks for any comments

Stefan

 

My Version: Vision Builder 2012 SP1 f2 + LabVIEW2011

0 Kudos
Message 1 of 7
(4,123 Views)

Hi,

 

do want to save a screenshot of the Vision Builder AI Inspection Interface or a screenshot of the callled LabVIEW VI Frontpanel?

 

As far as I know it is not possible to save a image of the whole Inspection Interface, but you can log the processed images of your inspection.

 

Regards,

 

Wolfgang

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

When you say Front Panel, you are referring to the Vision Builder AI inspection interface, right?

0 Kudos
Message 3 of 7
(4,083 Views)

Hi Wolfgang,

 

I know that I can log the processed images to disk. But I have six images (that can be logged anyway) and a lot of controls on my Custom Inspection Interface that should be logged as a single window screenshot. Meanwhile I have tried two things

 

1. On step "Update Inspection UI" I have checked "Run the VI after updating indicators". Within the UI VI I open the VI reference of my Custom Inspection Interface via VI server. See below

Log FP Image To Disk.png

Within in LabVIEW this works fine, but when you try to import this to Vision Builder with "Tools\Inspection Interface Configuration..." you run into an error. Sub VI calls are not allowed here. And to program a flat image saving routine within the VI is too complicated (for me). This increases complexity while Vision Builder should decrease complexity.

 

2. I have created a LabVIEW VI to generate screenshots of the complete screen. I use a DLL call to emulate a keypress of the PRINTSCREEN key. This copies the screen into the clipboard. Then I copy the clipbard to an LabVIEW image and store this to disk. Again this works fine within LabVIEW and under special circumstances within Vision Builder. When I use a "Run LabVIEW VI" step with "Debug Mode" enabled it works fine. But when I use it without "Debug Mode" enabled I get an image of small grey stripe with the last string copied to the clipboard. It seems to me as if the Vision Builder does not allow the PRINTSCREEN key emulation to get to system level. It's captured within Vision Builder. Very strange to me.

 

 

0 Kudos
Message 4 of 7
(4,077 Views)

The Vision Builder AI Interface VI is named VBAI Interface.vi. You're pretty close to the solution, If you open a reference to that VI, get its FP image and save that to disk, it will do what you want.

See attached project and source diustribution that you can call with a Run LabVIEW VI step.

Note that it will only work in Inspection mode, since the VBAI Inspection UI is not shown in configuration mode.

 

Hope this helps.

 

Christophe

Message 5 of 7
(4,069 Views)

Hi Christophe,

 

thank you for this hint. It works now.

 

I did not know that the Custom Inspection Interface.vi will be renamed to VBAI Interface.vi when its imported to the VBAI. Is there any documentation on this? The documantation of the Vision Builder is not complete in my opinion.

 

0 Kudos
Message 6 of 7
(4,053 Views)

> I did not know that the Custom Inspection Interface.vi will be renamed to VBAI Interface.vi when its imported to the VBAI. Is there any documentation on this?

 

No, the renaming of the Custom Interface VI - if you provide one - is not documented. This was an internal design choice, that we did not feel the need to document.

 

> The documantation of the Vision Builder is not complete in my opinion.

 

You mean specifically with regards to that feature? If you have specific documentation feedback, please post them and we'll try to address them in future releases.

Also if you have feature requests, feel free to post them on the Vision Idea Exchange:

http://forums.ni.com/t5/Vision-Idea-Exchange/idb-p/visionideas

 

Thanks for your feedback.

 

Christophe

0 Kudos
Message 7 of 7
(4,042 Views)