Jump to content

Recommended Posts

I'm looking for a Node Map tool to document my applications using my messaging architecture.

I want to write some code that can extract relationships between classes (some being processes and some being messages) and then feed that data into a tool to visualize the relationships in my application.  The end goal would be something like the http://www.visualthesaurus.com/.  Unfortunately, the software behind that tool starts at $5k.  I am hoping to find something a bit less expensive.  Has anyone found a solution they like?







Link to comment

Due to the overwhelming response  :rolleyes: I put together a solution using some free online tools.


First, you will need a tool called yEd.  (http://www.yworks.com/en/products_yed_about.html) This is a very nice free tool for generating various graphs and charts.

Next you will need Excel because that is the file type yEd uses to import an adjacency matrix.

Last, you will need some LV code to generate an adjacency matrix and node property list from a project.  Here is one I made for Actor Framework.  Please excuse the poor code layout as I hacked this together quickly.

Generate AF Node Map Data.vi

(Note: this can easily be adapted to other message systems.  The only change would be the mapping for the color properties to the appropriate parent classes.


Open the VI, choose your target project and your destination xlsx file and run it!


You will get a file like this:

AF Demo node list.zip

(zipped for your protection.  ;) )


Next you need to open this file in yEd.  When you do, you need to set the data ranges correctly, like this:


and choose a presentation configuration like this:


which I created earlier using this:



The end result, after a few cosmetic tweaks results in this:



Pretty cool, eh?   :D


(Well, I think it is useful.  I always prefer to visualize my applications.  Complex apps using messaging architectures can get pretty hard to follow without good documentation.)


I hope others find this useful.



  • Like 1
Link to comment

Yes.  You can define many different properties in the node list.  I just tried color first.  This was mainly a proof of concept.  I would love to see where other take this idea.  One idea is to choose a class in the project to focus on and limit the graph to only 2 links away from that class.  Otherwise, your graph can get huge.  Here is one portion of my current project (just 25% of the UI model).


Link to comment

Yes.  You get what you pay for!   :P

But, you certainly can automate the generation of the excel file so you can easily import the data and customize the graph in several ways.  Not a bad compromise.  There are other tools out there for creating node maps.  Perhaps there is a better solution.

Link to comment
  • 2 weeks later...

I guess maybe I am missing something but what exactly does this information tell you?  I can see the graph as representative of the relationships but how does that help?


Do you have like a use case example that you could walk me through to show how the data is used?


Wire Warrior

Link to comment
I guess maybe I am missing something but what exactly does this information tell you?  I can see the graph as representative of the relationships but how does that help?


Do you have like a use case example that you could walk me through to show how the data is used?


Wire Warrior

I could see this used in a document explaining how the software components communicate.  Sure you'd probably want a section explaining each relationship in more detail, but it would to spice up a boring software document with some graphics.


I do something similar with my software design documents, but they are custom made, and could be error prone.  I may miss some messaging connection between nodes where this software wouldn't.

Edited by hooovahh
Link to comment

Hoovah, Okay that makes sense. 


I suppose extending on that idea you could have a "planned" communication graph and an "actual" communication graph as well.  Doing that lets the tool be used as a verification piece also. 


I wonder....does the state machine tool kit have features/functions that could be co-opted to assist with this?

Link to comment

My main goal was to come up with an automated way to document the relationships between an actor and all it's messages.  This is a natural case for a node map.  Also, it will uncover the connections from other actors that connect to an actor via it's messages.

This mainly makes sense if you are using a messaging architecture where each message is a class and the only communication path between your independent processes is via these messages.  This is not limited to the Actor Framework.  (I use my own architecture that is much less limiting than AF) but the concept still applies.

Applications written with this type of architecture can very quickly become too complex to understand, even for the author.  By having a diagram like this, you can have a means of graphically representing the logical links within the system that are not visible in the source code, even when using a graphical programming language like LabVIEW.

This is admittedly a very early version of this tool that I just put together in a few hours to prove the concept.  I hope to improve on it over time but wanted to share the idea and code in case others wanted to contribute.

Link to comment
  • 6 months later...

I am thinking of expanding on this for a CLA Summit presentation.  But before I invest a lot of time, I am wondering how many others think a tool like this would be useful.  If you are interested, please reply or 'like' this post so I have an idea of the level of interest in this subject.





  • Like 1
Link to comment
I am thinking of expanding on this for a CLA Summit presentation. But before I invest a lot of time, I am wondering how many others think a tool like this would be useful. If you are interested, please reply or 'like' this post so I have an idea of the level of interest in this subject.



From my point of view. It's no better and a little bit worse than the hierarchy window since it hides "depth". What I would really like to see is a 3D version of the hierarchy a bit like the  firefox "layers" (we could zoom in and out then,too ;) )

Edited by ShaunR
Link to comment

The class hierarchy window contains none of this information.  It only shows you what classes are children of other classes.  Messages are not children of the processes that execute them.

The VI hierarchy window is just a mess, showing every single VI connection from a VI perspective, but again, not the information I am looking for.


The node map is intended to show links between processes/actors via the messages they send/receive.  This only works for messages systems where the message is a class.  The idea is the process appears as a central node with the messages it can receive surrounding it.  If one of those messages in turn sends a message to another process when it is executed, then a link is shown from the sending message to the receiving message.

The idea is you can see all the messages a process can be sent and you can see what other processes are sending what messages to each process.  So, you can then trace the propagation of an action through the application.

For example: The user presses button X.  The UI code sends a message to the UI message process that button X was pressed.  The UI process then executes this message, causing it to send another message to the main controller process to execute action X.  The main controller process then executes this message, causing it to send another message to the external comm process to send command X to some external device/application.  The node map would show all those links so you could visualize what was happening and see the message flow.  Ideally, you would be able to click on each node and view the underlying code in LabVIEW, but, I have not developed it to the point where that is possible.


I have not seen another method to help visualize the message flow of an application.  I have looked at sequence diagrams but those show specific intra-process communication for specific conditions.  They do not expose all the potential links in the system.  Command pattern message based system are tightly coupled but it is not easy to visualize that coupling.  I think we need a way to do this to help us understand complex system implemented with these type of architectures.

Link to comment
  • 2 years later...

Join the conversation

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

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.

  • Similar Content

    • By Ryan Vallieu
      I have seemingly found an issue with the shipping example code for Nested Malleable VIs.  Another user has verified that he saw the same behavior in 2019.
      I am working through the examples and the presentation from NIWeek 2019.  In running the Lesson 2b code (C:\Program Files (x86)\National Instruments\LabVIEW 2019\examples\Malleable VIs\Nested Malleable VIs) I found the Equals.vi in the class was not being leveraged and the search failed.  When I went to my LabVIEW 2018 machine and ran the Lesson 2b.vi the code worked to find the element by correctly leveraging the in-class Equals.vi.
      One difference I see is that in the 2018 example the Equal.vi is in the example folder with the code, and in 2019 the Equal.vi has been moved to VI.lib - otherwise the code looks to be the same.  The Equals.vi code looks identical, and the calling VIM look identical.  I posted on the LabVIEW NI.com forum here: 
      I am trying to determine what may have broken or changed between the implementation in 2018 and 2019, visually the code looks the same.
    • By Voklaif
      Hello all,
      I am programming with LabVIEW for around 2 years and was recently stumbled upon LVOOP.
      I am required to write a communication protocol to work with a micro-controller, which later will be also used for ATP and debug purposes.
      I want to build the program "correctly" from the beginning so it will be maintainable and flexible to additions and changes.
      My natural way of building a program would have been a queued state machine, with several loops, each loop is in charge of a different module (one for GUI obviously), but as I stated in the beginning, I want to use LVOOP.
      Does anyone have a LVOOP project I can use as reference? I've searched online and found some nice examples, but they are small and teach you the basic stuff.
      For me it's important to see the how to use the project tree wisely, where to place the classes, see the managing loop and to learn as much as possible before I create one of my own.
      Thanks in advance,
    • By GregFreeman
      I have an array of classes, let's call the object TestPass, of size 1 (but it is an array because it can scale out to multiple test passes). In this class, there is one other nested class which is not too complex, then various numeric and string fields to hold some private data. There is also an array of clusters. In this cluster there is a string, two XY pair clusters, and an integer. Not very confusing.
      This array of clusters gets fairly large, however, upwards of 80-100k elements. What I am finding is when I index the array of pass classes it is crazy slow. On the order of 30 ms. Doesn't seem like much, but we are indexing the array in our method to "Get Current Pass" which is used in various places throughout our code. This is adding potentially hours to our test time over the 80k devices we are testing. 
      So, I started digging. When I flatten the class to a string and get the length, it's 3 mb. But, when I run the function with the profiler is is allocating close to 20 mb of memory!
      My gut feel was that the string is causing the issues. So I removed the string from the cluster and the index time went to 0 ms. 
      Luckily we can normalize a bit and pull the strings out of the cluster since a lot of them are duplicates. But it makes our data model a bit uglier. 
      Has anyone seen these kind of performance issues before? I saw them in 2013 and 2017.
    • By ted Francis
      I am new to LVOOP and have jsut started writing my first LVOOP program which I have attached.
      I would appreciate greatly help with the question I have
      Thank you in advance 
      This vi will perform two tasks 
      1.Generating Report data sheet for metrology 
      2. updating the scales in a MAX .nce file
      1. Metrology will input calibration information into the tables on the tabs
      Metrology will then click "Update Tables" then "Create Report ( create report section of code is not yet written
      Update Tables will write all information entered in the tabs to class varaibles and will also delete current Max informatiomn
      2. Metrology will click "Load NCE Scale"
      vi will prompt for nce file to load and then once file is selected, display existing scales for two channels (Current Motor 1 and 
      Current Motor 2)
      Metrology will then click "Update Scales"  the program will replace the existing scales with those entered in Step 5.14 and 5.15
      from the tables on the tab
      Question 1.  Steps 5.14 and 5.15 are needed by both classes ( Table Variable and MAX) - what is the best way to share this information
      CAT0000032 Class Version.zip
    • By shoneill
      I was browing through the actor framework discussions on the NI site yesterday and I came across a statement by AQ.
      Never inherit a concrete class from another concrete class
      I had to think about that for a second.  The more I think about it, the more I realise that all of the LVOOP software I have been writing more or less adheres to this idea.  But I had never seen it stated so succinctly before.  Now that may just be down to me being a bit slow and all, but in the muddy and murky world of "correct" in OOP-land, this seems to be a pretty good rult to hold on to.
      Are there others which can help wannabe plebs like me grasp the correct notions a bit better?  How about only ever calling concrete methods from within the owning class, never from without?  I'm learning for a long time now, but somehow, my expectations of LVOOP and the reality always seem a little disconnected.  AQs statement above helped crystallise out some things which, up to that point, had been a bit nebulous in my mind.  Well, I say I'm learning..... I'm certainly using my brain to investigate the subject, whether or not I'm actually LEARNING is a matter for discussion... The older I get, the less sure I am that I've actually properly grasped something.  The old grey cells just seem to get more sceptical with time.  Maybe that in itself is learning...
  • Create New...

Important Information

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