LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analyzing UDP data packets

hey i am working on AWOS system and multiple sensors data is coming to server. i checked on ethreal in my PC connected to server via  LAN for all the UDP packets coming to my PC but i have no idea on how to separate each sensor data from UDP packets so it can be displayed in a GUI. can anybody help.i tried to attach my ethreal data but forum is not accepting that format

regards

0 Kudos
Message 1 of 10
(3,179 Views)

"ethreal"??   Do you mean to say "ethernet"?

 

Zip up your data file and attach it.

 

0 Kudos
Message 2 of 10
(3,151 Views)

@RavensFan wrote:

"ethreal"??   Do you mean to say "ethernet"?

 

Zip up your data file and attach it.

 


I think that mean the software that lets you access the promiscuous option to raw Ethernet packets as they come in as is done with WireShark. I think Christian cracked that nut some long years ago.

 

Browsing my tags I have this tag cloud to offer.

 

This page for winpcap may also be helpful.

 

One of those links may hold a useful hint.

 

Another thing that may or may not be mentioned in those old threads is the distinction between a hub and a switch. Hubs repeated everything but switches are smart and may have to be tickled into passing all packets.

 

Ben

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 10
(3,146 Views)

ethreal is a software for seeing all the incoming and outgoing data packets....someone advised it to me to check whether the server and my laptop are sharing data

 

i went today at the system and ran my labview code and got the following udp packets.Each packet is having the data of all sensors..pls help as to how i separate each sensor data.

 

0 Kudos
Message 4 of 10
(3,131 Views)

Shouldn't your instrument's manual or programmer's guide tell you how to do it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 10
(3,120 Views)

That's good.  You are getting data.

 

So all you need to do is use the string functions available in LabVIEW to parse out the data.  Hopefully you have a manual that describes to you what each thing means.

Message 6 of 10
(3,119 Views)

since i have got the data i have not done any progress any further...i have tried alot but i cannot extract my specific values out from a UDP packet and discard all other values...i have attached the code which i have made but i am able to get only one time values from the first UDP packet wheras i have to continously get these values from incoming UDP packets..kindly help...

maybe i am missing steps out..i dont know

Download All
0 Kudos
Message 7 of 10
(3,078 Views)

Why would you run your For Loop as many times as there are characters in your string?

 

You seem to be picking out pieces of the string based on things being at very specific locations.  What if the message changes a little bit? Some message has an extra character into its data?

 

You need to look for meaning in your message.  Does each line pertain to a particular parameter?  For instance, I see your second line as "VIS" in it which make me think it is related to Visibility.  If you read that one line, and detect "VIS" is contained in the message, then you can use string parsing functions to break out the 15000.0 part.  Then does the "AL 0" mean anything?

 

 

0 Kudos
Message 8 of 10
(3,050 Views)

yes please ..that is the actual problem..the data keeps on changing but not much..i have checked many times that the length of data string is 522 consectively

 

And yes these lines represent data which i know...each line represent certain sensor data hence i want each value out so i can perform further calculations..

can you please ammend the code so i can consectively collect values from incoming data packets because than i have to take averages of collected value

 

everyone keeps saying me to use string functions but honestly i have tried alot..either i get each word separately or chunks but not each line or tge values of parameters in each line

regards

0 Kudos
Message 9 of 10
(3,038 Views)

@Mrsnaveed wrote:

everyone keeps saying me to use string functions but honestly i have tried alot..either i get each word separately or chunks but not each line or tge values of parameters in each line

regards


Just do a Search String for e.g. VIS, and if the index found is >= 0 (-1 is not found), use that index as Offset to a String to fract/exp - There's your VIS-value.

Repeat for all other tokens.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 10
(3,031 Views)