Jump to content

[Discuss] UML2LV State Machin Compiler


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=119

Name: UML2LV State Machin Compiler

Submitter: Black Pearl

Submitted: 30 Dec 2009

File Updated: 03 Jan 2011

Category: *Uncertified*

LabVIEW Version: 7.1

License Type: BSD (Most common)

This is a toolkit to convert a state diagram designed with the editor dia into a LabVIEW state machine.

Warning: This uses Scripting: So be aware of dragons, black holes, rusty nails and other monsters. I've only tested it in LV 7.1., got a crash every 2 hours... Bugs and workarounds in newer LV versions welcomed.

Crashes in 8.5. Found the CAR (# 4CJFKTCS)). Edit: Fixed in V 1.0.1

Basic Operation

***************

Create an uml Chart in Dia (it is OpenSource too).

Compile it into a LabVIEW state machine (this will generate an enum based state machine with .vi and States.ctl for the TypeDefed Enum).

Code the States.

Getting started

***************

* You will need to have several OpenG packages installed. Dependencies: appcontrol, file, variantconfig. In order to install these, you need to get the VI package manager from:

http://jkisoft.com/vipm/download/

* For users of LV 7.x you need to get the TRefTraverse.llb from NI:

http://decibel.ni.co...t/docs/DOC-5091

From 8.0 onward they are located under vi.lib\utility

Propably you need to fix the linking from the main vi

* You will need to download Dia:

http://live.gnome.org/Dia

Customizing

***********

* In the Folder LV Scripting you will find the template 'State Machine Prototype Template.vit'. You can modify this within limits to change the state machine that will be generated.

* There is a lot of Documentation with the Code: Check out the documentation folder with the 'Tree VIs' and the uml diagrams (they are surprisingly also made with dia)

* If you have questions, ideas or found a bug, please do not hesitate to contact me! You can do so via PM on LavaG or via my private email on the BD of the About.vi

V 1.0.1:

* Fixed a bug in error handling (Error Handler Close.vi)

* Workaround for the 8.5 crash

* Support for changed Name of CaseSelect

* Started to add support for StarUML

Happy New Year

Click here to download this file

  • Like 1
Link to comment
  • 2 weeks later...

Roadmap (unsorted):

* Extending the set of verification plugins

* Loading/Parsing for StarUML/XMI

* Creation of String based State Machines

* Make it available for newer LV versions (see this scripting question)

* Handling of orthogonal states

* Converting Notes to Comments on BD

* Converting Transition Events/Guards to whatever

* Write an easy tutorial

Felix

  • Like 1
Link to comment
  • 11 months later...

I looked through this tool. Looks interesting, but very similar to the state-chart module. I tried to use the "Replace - no attributes" method, but, it always failed for me in LV8.6. Replacing to "Replace" and the "Params" disappeared, but everything worked after that. Learning how it parses Dia took some experimented, but, worked great when I got used to it. It is definitely pretty quick, and that is one point against the state-chart module.:thumbup1:

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
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.