LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

'Hanging' during continuous 802.11b data transmission using PocketPC

My application transmits large volumes of data via 802.11b from a PocketPC to a laptop computer. The PocketPC uses a 6062E DAQ card to collect analog data from 16 A/D channels at 256 samples per second (per channel). This results in 4096 samples per second total. I've found that sending it in two 'packets' per second works best (so two transmissions every second; 2048 samples per transmission).

The problem I'm having is that the connection 'hangs' every 35-50 seconds. When it hangs, my data acquisition loop can build up a queue anywhere from 4 to 20 seconds of data before the wireless transmission begins working smoothly again (and all the backlogged data is rapidly sent through in 3-5 seconds).

My goal is to be able to analyze the acquired data on my laptop in 'near real-time', so this intermittent hanging is a real problem. Any suggestions?

(The attached file is the application that runs on my PocketPC. I'll attach the application that runs on my laptop to the next message.)
0 Kudos
Message 1 of 8
(2,541 Views)

@Chew Toy wrote:
My application transmits large volumes of data via 802.11b from a PocketPC to a laptop computer. The PocketPC uses a 6062E DAQ card to collect analog data from 16 A/D channels at 256 samples per second (per channel). This results in 4096 samples per second total. I've found that sending it in two 'packets' per second works best (so two transmissions every second; 2048 samples per transmission).

The problem I'm having is that the connection 'hangs' every 35-50 seconds. When it hangs, my data acquisition loop can build up a queue anywhere from 4 to 20 seconds of data before the wireless transmission begins working smoothly again (and all the backlogged data is rapidly sent through in 3-5 seconds).

My goal is to be able to analyze the acquired data on my laptop in 'near real-time', so this intermittent hanging is a real problem. Any suggestions?

(The attached file is the application that runs on my PocketPC. I'll attach the application that runs on my laptop to the next message.)




Here's the application that receives the data transmissions on the laptop.
0 Kudos
Message 2 of 8
(2,536 Views)
One thing I would suggest is putting waits in your while loops, even if it's only for a couple of milliseconds. I see you added them to your outter while loops, but I don't see any for the inner while loops. This will give the port a chance to clear and keep the data from bunching up. It will also keep things working smoothly between your program and the processor. I've seen several issues like this be fixed by simply putting in a small wait in a while loop. See if it makes a difference in your case.
0 Kudos
Message 3 of 8
(2,519 Views)
One thing I would suggest is putting waits in your while loops, even if it's only for a couple of milliseconds. I see you added them to your outter while loops, but I don't see any for the inner while loops. This will give the port a chance to clear and keep the data from bunching up. It will also keep things working smoothly between your program and the processor. I've seen several issues like this be fixed by simply putting in a small wait in a while loop. See if it makes a difference in your case.
0 Kudos
Message 4 of 8
(2,519 Views)
Thanks for the suggestion. Unfortunately it didn't help. I tried adding a wait function in the data acquisition loop, in the TCP/IP transmission loop, and in both loops at the same time. In all cases it causes my application to crash within 30 seconds with a error code "-200361". I've posted on this error code before, and have not gotten completely around it, but using the application I uploaded previously (no wait functions inside these loops) I can get reliable performance for 50-60 minutes.

I wrote a new version of the 'Data Client' application (the one I operate from my laptop). In this version I can receive data from up to four PocketPCs simultaneously. Interestingly, the hang problem occurs on all of them at about the same time (nearly synchronized). It doesn't happen any more frequently if I run multiple PocketPCs versus just one. This has me thinking that the 'hanging' problem is on the 'Data Client/Laptop' side, since this is the element common to all the PocketPCs. Does anyone have an suggestions?
0 Kudos
Message 5 of 8
(2,512 Views)
Chew Toy,

When you were getting this error with the loop waits in, did you notice whether it came more quickly or slowly depending on the length of the wait? I took a look at your posting before on this issue and was wondering if playing with the buffer size and code effeciency made much of a difference before you switched hardware.

Tyler S
0 Kudos
Message 6 of 8
(2,482 Views)
Good news. I solved this problem. It turns out that a wireless MS utility ("wireless zero configuration") was creating the problem. When I deactivated it, the problem disappeared (after 5 hours of trial and error utility deactiviations). Since I'm using the wireless cards drivers/utilities, this has not created any other problems (so far).
0 Kudos
Message 7 of 8
(2,449 Views)
That's great news! Good troubleshooting work to figure that out. Plus it's documented now for other users to find if they have similar problems.
0 Kudos
Message 8 of 8
(2,446 Views)