LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP protocal DATA FORMAT?

Hello Everyone,

 

I am trying to use an analyzer to record concentrations of various gases as they pass a chamber.  I want to make an ethernet connection to my computer and am instructerd by the manual to use UDP protocol.  However, I do not quite understand what needs to be done to get the concentration data based on the manual.  Am I suppose to instruct LV to keep reading from specific port or to write code telling the analyzer to send me appropriate data?  this piece of the manual is attached below.

0 Kudos
Message 1 of 22
(3,268 Views)

Your .pdf file is broken.

0 Kudos
Message 2 of 22
(3,264 Views)

Sorry about that!!! I'll fix it soon.

0 Kudos
Message 3 of 22
(3,245 Views)

Alright, here's the correct file.  How would this be done?

0 Kudos
Message 4 of 22
(3,242 Views)

What you would be getting is a series of bytes.  I would receive it in as a string.

 

Then you can use string functions such as String Subset to break that up into the respective parts.  Since the parameter string part has a variable number of bytes, you will need to search the string for the STX and ETX bytes and return the data in between those locations.

 

Once you have a string of data, you can use functions such as typecast or hexacdecimal string to number to turn the string bytes into numerical values.

0 Kudos
Message 5 of 22
(3,236 Views)

Hey,

 

Thanks for your explanation but I would like to follow it up with another question.  To get the "series of bytes," am I required to send a specific command first to the machine to illict a response (UDP write & read) or do I simply start running the machine and read from specified remote port (using UDP read)?

0 Kudos
Message 6 of 22
(3,199 Views)

LabVIEW comes with a rich set of examples. Open the example finder ("menu..help..find examples" and search for UDP).

 

Let us know if you have any questions after that. 😉

0 Kudos
Message 7 of 22
(3,191 Views)

Hey,

 

I think I am beginning to understand what's going on.  The UDP sender and reader in LV examples works in that the reciever VI gets any message from the writer when it works in parallel.

 

So, what I am beginning to think is that if I have a reader receive the bytes every time I command it to, I do not have to nescessarily write anything to the specified port, but will need to keep a reader on to get the bytes that are secorded by the machine every minute?

 

Also, I was curious how to translate this code.  I've been trying to translate the example in the pdf (R201 example) and cannot quite see the piece where the code,rng,dp, and value.  All I can make out of the example is err, date, and a mantissa.  Is the mantissa suppose to be translated or am I misinterpreting the example?

0 Kudos
Message 8 of 22
(3,188 Views)

Do you have a link to the full manual?

Do you have a typical received string?

0 Kudos
Message 9 of 22
(3,173 Views)

Is the computer and the device in the same subnet? If it isn't, then UDP is not an option.

0 Kudos
Message 10 of 22
(3,167 Views)