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: 

NI 3202 - SAMPLING INTERVAL ADJUSTMENTS

Solved!
Go to solution

Hello!


I need clarification on Sampling Interval concept wrt NI WSN nodes (3202, 3212, 3226) and workout same with my kit. I'm listing the approaches known to me,

  • Approach I: In "Target Node VI" --> "Start" Case Structure. Choose mode to be "VI Driven" and set sampling interval with some constant.

 

  • Approach II: In "Target Node VI" --> "Start" Case Structure. Choose mode to be "Host Driven" and set sampling interval via "User Project"(*.lvproj) dialog box, Choose particular node, RightClick -> Properties -> Node Tab -> Change the number in sampling interval box.

 

  • Approach III: Using WSN Host API, something like pic shown sidewards jjj.PNG

 

 

Question 1:  I tried this approach III, with "VI Driven", so does this approach independent of the mode you set?






  • Approach IV: In "Target Node VI" --> By placing "ConfigNode VI" and set sample interval as per user logic in "Sample" and other Case Structures. [Sampling Interval Mode: VI Driven]


Question 2: Considering Approach III feasible in "VI driven" mode, does any priority is being offered by node to Approach III against Approach IV?
[For eg. I'm adjusting my Sampling Interval(say 45 <-> 60) to alter sequentially via some event trigerred (BatteryLevels/LinkQ/SampledDataRange) and using Host VI following Approach III I wish to change sampling interval(say 30)  for some time. So now sampling interval 30sec remains static or it keeps switching (45/60) to 30 whenever the Target node executes Sample & Received Msgs sturctures.]

Question 3: Do we have chance to alter Sampling Intervals for individual channels (AI0...AI3) or in groups of two channels,and considering same with Digital Channels,if their is any hardware restriction, internal ADC/MUX invloved let me know.

[For eg. If my sample data(range: 1- 6 in volts) for AI0 Channel falls in particular zone (say 1-3V), working shall be normal, but if it falls in range of (say 4-6 V) I wish to alter the sampling Interval, while other channels (AI1..A13) remain unchanged irrespective of either]

 

 

 

0 Kudos
Message 1 of 5
(8,450 Views)

Hi PP_BABU,

 

Question 1: I tried this approach III, with "VI Driven", so does this approach independent of the mode you set?
Answer 1: If you are setting the sample interval on the node by sending it a user message >> parsing the data for sample interval >> set sample interval with Config Node you will have to set the mode to VI driven. If you set it for Host driven then it will ignore what you set using the Config Node.

 

Question 2: Considering Approach III feasible in "VI driven" mode, does any priority is being offered by node to Approach III against Approach IV?
Answer 2: The priority is to which ever is last written using the config node.

 

-So if you have logic in the sample case that sets the Sample interval to 10 using a config node if AI0 >5 and then you have a config node in the user message case. If AI0 is in fact > 5 the vi will set the sample interval to 10. Then you send a user message, it will got to the user message case when it receives it and sets it to the new value. However, if the next time the sample case is run, AI0 is still > 5 then it will set the sample interval to 10 again.

 

Question 3: Question 3: Do we have chance to alter Sampling Intervals for individual channels (AI0...AI3) or in groups of two channels,and considering same with Digital Channels,if their is any hardware restriction, internal ADC/MUX invloved let me know.
Answer 3: Sort of. The sample interval controls when the sample case is run and not when the channels are sampled. Calling the Elemental I/O node will trigger reading that Line. So you can add logic in your code that only samples certain channels or all channels or even sample One channel>>Wait 3 seconds >> sample next channel...
There are limitations to the hardware and you can find benchmarks on the fastest acquisition speed you can expect: 3202 Benchmark

 

Hope that helps!

 

Cheers,

Brian A

R & D Product Support Engineer | WSN/Network DAQ/Academic

National Instruments 

Message 2 of 5
(8,419 Views)

Aplogies for late reply.

Following your answer for Question 3 of my earlier post, I tried this logic,(picture shown below) rather than altering Sampling Interval of node everytime with channel readings.

 

Sample Case.PNG Here if Ai1 channel reads voltage level >1.5, the node sends me 100 readings, take 5 seconds delay and send me  DIO1 & User0 channel details. Is this a wise approach to get the job done, when sensor meets sensitive zone ( here >1.5), to take more readings considering.

 

  • Node Sleep Time (User0 gave readings of 15 seconds i.e. execution gap for Sample strucutre)
  • Message Traffic across network, if I deploy 4-5 nodes with similar traffic (as Gateway suports 40 messages ring buffer)
  • Battery ( obviously dries soon, as radio is made on for 102 - 104 times here)

 

I couldn't program LED of my 3202 node, any software limitation? (LabVIEW 2012, WSN 1.4)

 

0 Kudos
Message 3 of 5
(8,393 Views)
Solution
Accepted by topic author PP_BABU

Hi PP_BABU,

 

This would work except that it might be hard to corelate the sample# in the user message to the AI1 I/O variable. A better approach may be to grab the data localy and combine multiple samples into one user defined variable. You could change the AI1 data to a string and then concatonate several into a longer string. Then send bursts of data. That should help on battery life as you could send every second instead of constantly sending data back. 

 

As far as the user led, there shouldn't be any limitations. You just need to drop an elemental I/O node and select Digital I/O >> User LED and then right click the same I/O node and select Change to Write. 

 

Cheers,

Brian A

R & D Product Support Engineer | WSN/Network DAQ

National Instruments 

Message 4 of 5
(8,349 Views)

 

Thank you for the reply Brian.

 

I had the idea to build an array of 10 sample readings and then send to the gateway but your string idea should be an easier one.

 

@User LED: Yes I could change the mode of LED to WRITE now. We have to use ELEMENTAL Node, all these day I was using Property node of LED.

Now I wanted another feature to my sampling logic Smiley Happy we can use the node Flash memory also to log the data, when sensor samples sensitive(~alarming) readings, let me finish my part with my kit, I shall post the difficulty if any.

with regards
PP_Babu

 

0 Kudos
Message 5 of 5
(8,338 Views)