Configuring Mechanical Action Latch for Button Used in VBAI

Updated Aug 22, 2023



  • Vision Builder for Automated Inspection

I created a custom user interface at NI Vision Builder for Automated Inspection (VBAI), which contains several buttons. I configured those buttons with mechanical action Latch when released, but my interface behaves according to the mechanical action Switch when released or Switch when pressed.

How do I achieve mechanical action Latch when released in user interface created in VBAI?

To achieve mechanical action known from LabVIEW as Latch when released follow this procedure:
1. Create a custom user interface in VBAI.
2. Configure button to have mechanical action Switch when pressed in the user interface. 

3. Add Update Inspection UI step after the step, where the value from the button is used.
4. Manually assign opposite value to the button. Value of button on user interface will return back to default value.

Example code, which shows this behavior is attached to this article.