From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network graph display

I'm writing a command console for a small network, and image.pngI'd like to display a network graph with all of the network nodes, connections, etc. Is there an existing library that can do this kind of thing? I looked through the VI Package Manager but couldn't see anything offhand.

0 Kudos
Message 1 of 6
(1,281 Views)

Your map is a "mesh network" these maps are usually built by software running on each node that keep track of all the other node it can "see", and then broadcasting that information.

 

By listening to all the other nodes broadcasts, a node can build a map of the network.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 6
(1,258 Views)

Yes. The question is how to best draw the graph - the representation of the network-  on the host, in LabView. There are Java packages for drawing graphs like this but I haven't seen a LabView one yet. Just trying to not reinvent the wheel here.

0 Kudos
Message 3 of 6
(1,246 Views)

Oh... How to draw the actual graphic... Yeah maybe some sort of extremely modified X-Y graph? I don't know.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(1,243 Views)

I've been able to get the free "NShape" library for .NET to work in LabVIEW:

 

https://github.com/dataweb-GmbH/NShape

 

It has bits of code in it specifically for drawing nodes, coloring them, attaching text labels, and linking between them.  The display control also has  zoom in and out built in as well.

 

It was a bit of a learning curve getting it to work the way I wanted, but the documentation is pretty good for free code (GPL license, so you can use it for free even for your business as long as you're not selling the software externally).

 

Here's a picture from the tutorial showing something it can draw:

Kyle97330_0-1608145539889.png

There's an event you can register for that lets you detect when the user clicks on any node in the graph, if you want it to be interactive.

0 Kudos
Message 5 of 6
(1,223 Views)

maybe you could use graphviz to draw the network graph as a png:

https://forums.ni.com/t5/LabVIEW/tree-to-picture-draw-tree/m-p/2717451#M805454

 

there are some quite impressive graphviz examples:

https://graphviz.org/gallery/

 

https://medium.com/powerof2/graphviz-for-network-visualization-9f45693d69d8

0 Kudos
Message 6 of 6
(1,210 Views)