Jump to content

Would this be useful to anyone?


Recommended Posts

https://gfycat.com/formalgentlelemming

Not this particular use of it of course, but just in general.

Sorry the cursor isn't there; you can still easily see what's going on though.

EDIT: I rewrote this as a shortcut menu plugin that just opens a regular block diagram window:

Here's the old version in case anyone wants to play around with the External Editor Wizard stuff, or my subpanel diagram code:

Old AHS Editor.zip

Edited by flarn2006
  • Like 1
Link to comment

Next to your custom.vi there was statediagram.vi

Is it the source code to NI's Automation and syncing of state machines?

I would love to customize their tool and create automation for my own flavor of a state machine that will keep in sync with a UML diagram.

It was tried in other languages and failed but for basic usage, it could be nice

Link to comment
 

Yeah I could see that being helpful at some point.  What happens when you have more than one primitive/Subvi on the diagram in the node?  Does it just place another entry at the bottom of the unbundle?

Yep. :)

 

Yeah this is neat and useful...how much of this black magic is built into LabVIEW and how much did you develop?

What do you mean specifically?

 

Next to your custom.vi there was statediagram.vi

Is it the source code to NI's Automation and syncing of state machines?

I would love to customize their tool and create automation for my own flavor of a state machine that will keep in sync with a UML diagram.

It was tried in other languages and failed but for basic usage, it could be nice

Very observant! This is making use of an obscure, probably unsupported feature in LabVIEW called an "External Editor Wizard". The only official one that exists to my knowledge is the State Diagram Editor, which works similar to the Statechart Module (which, incidentally, is what the functions supporting the editable embedded diagram were built for) but it has fewer features and is available for free. The way External Editor Wizards work is you place one from the palette, and draw a box like with a structure. Then a VI generates some stuff with scripting, and it opens an editor to manipulate the code. You could call it a type of "Express Structure"—it works like an Express VI, with how you can configure it, except it exists as multiple objects in a structure on a block diagram, instead of as a single node. From what I can tell, the structure can be of any type, except a Flat Sequence Structure, as for some reason that doesn't descend from the Structure class. (I'm using a stacked sequence here, as with only one frame it looks and acts identically.)

It appears that this feature was never intended to be used for anything other than the State Diagram Editor, as if I right-click the structure and select Properties, it tells me I can't edit the properties because the structure was created by the State Diagram Editor.

As it happens, I think I actually thought of a better way to get this same functionality, that doesn't even rely on anything unsupported. So I'm probably just going to do that. I'll still release this (incomplete) version when I get home from work though, just so you all can see how it works.

Edited by flarn2006
Link to comment

I played a bit with the free tool and you found how it was written. Did you find the source code of that free tool?

I would like to try and build on that automation and wrap my own flavor of state machine into it without writing everything from scratch

Link to comment

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.