9 ethernet protocol specification, 1 communication protocol – K-Patents PR-33-AC User Manual

Page 44

Advertising
background image

38

PR-33-AC instruction manual

Document/Revision No. Rev. 1.02

Effective: June, 2014

9 Ethernet protocol specification

The main purpose of the Ethernet connection is to collect measurement data from the

instrument. For this data acquisition, you’ll need to have suitable software on your

computer. You can program a data acquisition program yourself following the specifi-

cations below.

For examples and ready-made applications, please contact K-Patents.

9.1 Communication protocol

The communications protocol is based on UDP/IP to port 50023. It is a client/server

protocol, where the sensor is the server and thus only sends information when the

client (i.e. your computer) requests it. The server should answer to all requests within

100 ms.

9.1.1 Request format

The client to server communication, i.e. the requests sent from your computer to the

refractometer, is in binary format. The request packets contain the following binary

data (all integers are in the network order, MSB first):

32-bit integer: packet number

32-bit integer: request ID

(any): request data (depends on the request)

(any): fill-in data

Important:

The maximum size of the message is 1472 octets (bytes).

The packet number is echoed back by the refractometer, but not processed in any way.

The packet numbers do not have to be sequential, any 32-bit value is valid.

The request ID is a 32-bit value that identifies the requested function, for example

refractometerinformation. See Section 9.2 for request IDs.

The request data consists of 0 to 1464 octets of additional data associated with the

request.

The fill-in data can be used to increase the number of octets in a message. Any number

of NULL characters (0x00) may be added to the end of the request as long as the total

Advertising