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: 

Nodes sample synchronisation

Hi,

I use a 9792 gateways with several 3226 nodes. It seems to me that when I deploy a sample rate on a node, it is on it's own and is not synchronised with the other nodes on the project. I don't need the nodes to be perfectly synchronised but since I usually take a sample every 10 minutes, I think that it may be possible that the difference between 2 nodes could be 9 minutes 59 seconds or so. I heard that if I set the sample rate at 1 minute and that the program take a sample every 10 minutes, the difference between two nodes would be max 1 minute, it could be ok for me, but I have to power my sensors and powering them 9 times out of 10 for nothing is a waste of battery power. So finally, my question is : Is it possible to synchronise the samples of several nodes ?

 

Thank you

 

Mathieu

0 Kudos
Message 1 of 18
(6,872 Views)

Hi MaLac,

 

WSN nodes cannot be synchronized directly with each other, but the measurements can be synchronized on the Gateway. As you said, taking more samples than needed and then reading the ones that are within a minute of each other would be the best way to do this. 

 

If it helps, you would not need to power your sensor for the 9 times that the measurement is not being used. 

 

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 2 of 18
(6,863 Views)

Thank you Zach,

 

How can I not power my sensors on the unused measurements et be assured that when the measurement is used that the sensors was powered ?

 

 

Thank you

Mathieu

0 Kudos
Message 3 of 18
(6,861 Views)

Hi MaLac,

 

You would have to manually do this based on when the measurements are used by the gateway. Not sure if this would be feasible with your application, but it might be worthwhile if you are concerned about sensor battery life.

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 4 of 18
(6,858 Views)

Hi Zach, and everyone interested in this topic !

 

I finally managed to both synchronize all my nodes and powering my tiltmeters only when necessary. I created a somewhat simple firmware to deploy on each node in the project. What it does, is to check the time it is and wait for a precise time to take a sample. On the joined picture it set to take a sample every 2 minutes, the sample rate is set to 120 s in the "Start" case. I try that with several sample rates and it work great. I was able to verify the synchronization by solving my other problem. I use relays with led indicators. The relays are triggered by the DIO configured in drive high. At each sample the DIO is set true for 2 sec before sending the data and then set to false.

When the firmware is deployed to several nodes, they are synchronize within a second.

 

The only thing that I don't understand yet is why do I have to use a relay. The drive high mode already use external power, it is a kind of relay by itself, and the data sheet said that it could source current up to 0.25A which is probably way over the current drawn by my sensors. It's not the end of the world to use a $10 relay and some wires, but it would have done a neater look without it.

0 Kudos
Message 5 of 18
(6,822 Views)

Hi MaLac,

 

Glad to hear you were able to get your nodes working; the programmable nodes are very flexible as you mentioned.

 

The DIO lines can drive a maximum of 0.25 A each with external power supplied. You would need a relay if your LED needs more power than this can provide. 

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 6 of 18
(6,815 Views)

Hi,

When using the firmware I talked about before, once of a sudden the data stopped to update. The firmware was set to a sampling rate of 5 or 10 seconds. But the data update just each 61 seconds, which is the "hello" signal (I don't know the right term).

Does someone have an idea why?

 

Thank you

 

Matt

0 Kudos
Message 7 of 18
(6,766 Views)

Are you defining the radio messages back from your router as part of the program you put on the WSN node? If so, you can define how often it sends updates back to your system. The tutorial at this link will give you some more details on this.

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 8 of 18
(6,759 Views)

Hi Zach,

I use wsn-3226, they don't use radio message to send data, they use shared variable. The firmware I used is the same as the one I posted in this tread a couple weeks ago.

 

Thank you

 

Matt

0 Kudos
Message 9 of 18
(6,754 Views)

Do you have the Config node setup with the correct Sample interval and set to VI Driven? Once this is done, you will need to send the values back in the "Sample" state as shown in the default LabVIEW WSN Target VI.

 

It should look like this:

statewsn.png

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 10 of 18
(6,740 Views)