How Do I Use the Same VI to Program Multiple WSN Nodes?

Updated Feb 20, 2018

Reported In


  • NI-WSN

Issue Details

When I add a new Wireless Sensor Network (WSN) Node to my project and reuse the same VI to program both the original and the new node, the VI under the new node references the original node's Shared Variables.  What can I do to prevent having to remap the Shared Variables each time I use this VI for a new node?


The standard way of writing to Shared Variables is using Shared Variable nodes. Two methods are available:

  • Standard Shared Variable Node

Every time you use the same VI on a New WSN Node you will have to change what variable the Shared Variable nodes represent.

  • Programmatic Shared Variable Access:

To avoid writing to the wrong variable, instead of using a Shared Variable Node for communication you can replace the Shared Variable Node with Programmatic Shared Variable Access.

When using programmatic access you have the ability to choose the Shared Variable Library: ni.var.psp://localhost/localnode/. This allows your VI to write to the Shared Variables on the local node which means regardless of what WSN Node the VI is running on, the VI is writing to that Node's Shared Variables.


Not Helpful