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:
Every time you use the same VI on a New WSN Node you will have to change what variable the Shared Variable nodes represent.
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.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.