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.

Wireless Sensor Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic I/O reading

Solved!
Go to solution

Hi,

 

With the WSN host palette, it is simple enough to discover all the nodes added in Max. The node reference array can then be fed to a for loop to handle each reference individually. Within each loop I can then send and receive messages, check node info and so on, but there is no function to get the I/O values. I have to pull each I/O from each node in the project explorer to my block diagram, and hence cannot have this for loop set so the same code can run for each node. I hope what I'm trying to get at is explained well enough.

 

The only other alternative is to have it send a message from within the for loop requesting data and the node responding with the I/O values through the message. Would it be possible in the future to create a VI "Return All Node IO values" which returns a cluster with each I/O value in it? Are is there a solution which I have missed?

 

Thanks,

Jevon

 

 

0 Kudos
Message 1 of 4
(6,571 Views)
Solution
Accepted by topic author JChec

Hello Jevon,

 

This is a great question.  You are correct that there is no way to read IO values using the WSN API.  Instead, the data was meant to be accessed using shared variables.  Fortunately, there is a shared variable API in LabVIEW 2010 that can be used to access these data values programmatically instead of by pulling the IO from the project. 

 

To make things easier, an API was created and posted to the community that will automatically open up all of these references for you programmatically and return the data of interest.  The API is also open source so you can learn how it works and adapt it to your needs as necessary. 

 

http://zone.ni.com/devzone/cda/epd/p/id/6385

Message 2 of 4
(6,561 Views)

Hi Jevon,

 

One of the nice parts about WSN I/O points is that they're accessible in the same way that other shared variables are in LabVIEW. For example, you're able to use DataSockets to communicate with each I/O point if you know the address to the channel.

 

Even better than that, however, is the WSN I/O Variable API which packages the lower level DataSocket calls into a nice WSN API.

Hopefully this helps,

Fred Visser -- SystemLink R&D -- National Instruments
Message 3 of 4
(6,557 Views)

Hi Burt and Fred,

 

Thanks for the great informative response, this is great news for me and my project! I am looking forward to giving this a try. Will post back if I have any issues.

 

Thanks,

Jevon

0 Kudos
Message 4 of 4
(6,538 Views)