Jump to content

Share your favorite User lib Vis


Recommended Posts

Here is one I just recently designed for myself and am using a lot.

It's an extremely powerful yet relatively simple state machine design.

I'll put it into the code repository someday.

http://forums.lavag.org/index.php?act=attach&type=post&id=6897

LV Version 8.2.1

It is based on techniques described in the reference below.

It has a lot of useful features.

1) It uses an elegant technique for dealing with automated systems,

where all attempts must be made to continue execution (if possible) before shutting down an application.

2) It is a LIFO (Last In First Out) Queued type state machine.

Instead of an array of enumerated types or a Queue the machine uses a multi line string of text states.

the new line char "\n" separates states.

This really helps with read-ability, and portability at the possible expense of execution speed and more attention to mispellings, etc.

However, most state machines do not need light speed execution over read-ability so this is

in my opinion not a real problem for a queue size of 50 states or less.

With this framework it is possible to handle errors within the VI or

escalate the error upwards to the caller. The framework provides an elegant mechanism to check if the error was handled correctly.

If the error is corrected the SM will retry the offending state and continue execution

normally (without ever telling you :)

In automation this means an error can be logged and handled privately to the SM while continuing execution of critical tasks.

ref:LabVIEW Advanced Programming Techniques Second Edition by Rick Bitter, Taqi Mohiuddin and Matt Nawrocki

Link to comment
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.