Sign Up

Events for UI Actor Indicators by justACS and SAS Workshops - Toolkit for LabVIEW Download

Easily create events for front panel indicators of UI actors

D Discussion Watch * 1 ↓783
 logo
Version1.0.0.14
ReleasedAug 29, 2023
Publisher justACS and SAS Workshops
License Apache 2.0
LabVIEW VersionLabVIEW>=19.0
Operating System Windows, Mac, and Linux
Project links Homepage   Repository   Discussion

Description

Events for UI Actor Indicators is a set of wizards that allow you to quickly create UI actors from a template, and then add user events to handle updates to its front panel indicators.

Creating a UI Actor from Template

In your project menu, select Tools » Create Actor from Template... You'll see the Create Actor From Template dialog.

Name your actor, and then click "Create Actor." A new actor, cloned from the UI Template, will be added to your project.

The new actor generally conforms to the pattern taught in Actor-Oriented Design in LabVIEW. It comes configured to show front panel when called, actor core.vi already contains an event handling loop, and events are created and destroyed in Pre Launch Init.vi and a subVI of Stop Core.vi

(This tool supports creating actors from any template, not just the UI Template. To add your own templates to the pulldown menu, create a subfolder in /Project/Create Actors From Template. Name the folder "_", and be sure to include the leading underscore. Copy your template into the folder. It will be available in the pulldown menu the next time you invoke Create Actor from Template.)

Adding Event Support to a UI Actor

Add an indicator to the front panel of your new actor, and right click on it. Select "Add Event Support".

The tool will add

a suitable event to the actor's attributes,
event creation code to Pre Launch Init.vi,
event destruction code to a VI called Destroy User Events.vi (which is called in Pre Launch Init and Stop Core), and
event handling code to the event structure in Actor Core.vi.

All that remains is for you to generate the event in an appropriate subVI.

Notes

The scripting code will tag any indicator for which it has generated event support, so you cannot generate code for the same indicator twice. Furthermore, if you copy an indicator with event support, you will also copy the tag, so you won't be able to generate an event for the new indicator either.

The scripting code uses labels on certain block diagram items to do its work. Those labels are identified by comments; removing the labels will break the scripting code. If your existing actors follow the general pattern of the template (create user events in Pre Launch Init, use an event structure in Actor Core, and destroy the events in Stop Core) you should be able modify your existing code to work with these tools by adding the appropriate labels.

Diagram cleanup still leaves something to be desired; we hope to address that in a future release.

Please feel free to post any comments or critiques to the NI forums, here: https://forums.ni.com/t5/Actor-Framework-Documents/Events-for-UI-Actor-Indicators/ta-p/3869260. We'll answer as our paid work permits.

Release Notes

1.0.0.14 (Aug 29, 2023)

This build updates the package's information, to comply with vipm.io publishing standards. We have also added documentation, in the form of a PDF, in the LabVIEW Help Menu.

There are no code changes from the previous build, though the supported version has been bumped to 2019. Please contact the authors at acs@justacs.com if you need support for prior versions of LabVIEW.

justacs and sas_workshops were contributors to this release


Download Package

Versions
All Contributors

  Post an Idea   Post a Resource

Recent Posts