0% found this document useful (0 votes)
42 views

WC - LDS - Communication Protocol

CERSA-MCI This manual describes the serial link communication protocol used to communicate with CERSA measure instruments. It can be used to integrate our devices in your global production and supervision system. The protocol is common for fiber optics, wire and cable instruments.

Uploaded by

muren2788
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

WC - LDS - Communication Protocol

CERSA-MCI This manual describes the serial link communication protocol used to communicate with CERSA measure instruments. It can be used to integrate our devices in your global production and supervision system. The protocol is common for fiber optics, wire and cable instruments.

Uploaded by

muren2788
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Communication

protocol
Measure & Control
Instruments

CERSA-MCI
53, parc Expobat
13480 CABRIES
FRANCE
tel: +33 (0)4 42 02 60 44
fax: +33 (0)4 42 02 79 79
web: http://www.cersa-mci.com
email: [email protected]

Manual version : 7.5.0


© 2020 CERSA-MCI
2 Communication protocol

Table of Contents

Part I Introduction 3

Part II Serial link 4

Part III Protocol 5


1 Continuous
...................................................................................................................................
measure mode 7
1.1 Measure and .........................................................................................................................................................
param eter fram e 7
1.2 Event fram e......................................................................................................................................................... 8
2 Trigger
...................................................................................................................................
mode 11
2.1 WSR ......................................................................................................................................................... 11
2.2 Foot pedal......................................................................................................................................................... 12
2.3 Spreadsheet
.........................................................................................................................................................
fram e 12
3 Stream
...................................................................................................................................
mode 14
4 Examples
................................................................................................................................... 15

Part IV Command codes 18

Manual version : 7.5.0


© 2020 CERSA-MCI
Introduction 3

I Introduction
This manual describes the serial link communication protocol used to communicate with CERSA measure
instruments. It can be used to integrate our devices in your global production and supervision system.
The protocol is common for fiber optics, wire and cable instruments.

Manual version : 7.5.0


4 Communication protocol

II Serial link
RS232 serial link is placed on the backside DB9 pin connector.

The dedicated pins of the serial link SUB D9 pins connector for cable and wire instruments (LPSH) are:

DB9 Pins nb. IN/OUT Signal connect to PC DB9 Pins nb.


1 IN Length counting pulse
6 REF -24 V: voltage reference.
2 Don't use it.
7 REF +24 V: voltage reference.
3 REF GND: voltage ground ref 5 (GND)
8 OUT TXD: Data out 2 (RxD)
4 IN RXD: Data in 3 (TxD)
9 Don't use it.
5 Don't use it.

The baudrate is fixed to 115200 bauds, 8 data bits, 1 stop bit and even parity bit.

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 5

III Protocol
The protocol described here below is configurable. Thus the user can design own protocol, grouping
commands codes in the same frame.
The communication between PC and the instruments is in master - slave mode where the PC is the
master.

There are read and write commands:


Read commands are used to get measurement values (diameter, tension...), or settings.
Write commands are used to adjust the instruments settings.

Important:
You must group read and write commands in different frames.
The maximal number of codes within one frame is: MAX_CODES -1.
MAX_CODES = 32 in decimal notation.
INSTRUMENT_ADDRESS is set to 0x01 in hexadecimal notation.
N_BYTES represents the number of bytes used to code DATA information.
Maximal value of N_BYTES is 65535 in decimal notation.

Syntax:
[ ] represents coded information in 1 byte (8 bits). Example: [&] = 0x26, [RD] = 0x52, [WR] = 0x57
< > represents coded information in 2 byte (16 bits). Example: <READ MEASURE DIAMETER> =
0x03E8
{ } represents coded data:
In 4 bytes signed (32 bits) for read measurements. Example:{-1} = 0xFFFFFFFF.
In 4 bytes signed (32 bits) for write or read parameters and tolerances. Example: {12500}=0x000030D4

The protocol is defined in two steps:

ACKNOWLEDGMENT
1. USER REQUEST COMMUNICATION: Start acknowledgment.

[&][INSTRUMENT_ADDRESS][RD] in case of read frame


[&][INSTRUMENT_ADDRESS][WR] in case of write frame

2. INSTRUMENT ANSWER: End acknowledgment.

[INSTRUMENT_ADDRESS][RD] in case of read frame


[INSTRUMENT_ADDRESS][WR] in case of write frame

COMMAND FRAME
3. USER COMMAND: Start user command frame.

<CODE_1>...<CODE_N><CODE_END>
in case of read frame
<CODE_1>...<CODE_N><CODE_END><N_BYTE_1>{DATA_1}...<N_BYTE_N>{DATA_N}
in case of write frame

4. INSTRUMENT ANSWER: Answer for ending user command frame.

<CODE_1><N_BYTE_1>{DATA_1}...<CODE_N><N_BYTE_N>{DATA_N} in case of read


frame

Manual version : 7.5.0


6 Communication protocol

<CODE_1><N_BYTE_1>{DATA_1}...<CODE_N><N_BYTE_N>{DATA_N} in case of write


frame ( Instrument confirms stored data after verification. )

Remarks:
For the acknowledgment, the instrument should answer within 200ms maximum.
For the command frame step, the instrument response time is 100ms maximum in case of read frame
and 500ms maximum in case of write frame.
The instrument timeout is 1.0s (maximum delay between ACKNOWLEDGMENT and COMMAND
FRAME steps).

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 7

1 Continuous measure mode


In this mode the user configure the instruments (write and read parameters) then read periodically measure
and events.

The user query needs to be slow compared to the sample rate of the instruments to not disturb the
measure frequency (for example 1 second used by default in CIM software).

Because the communication is slow compared to the instrument sample rate, the measures values give
only a trend of the measure. The event information contain the detail of the event when alarm or out of
tolerance occurs.

For more information please contact CERSA for support.

1.1 Measure and parameter frame

When the user request measure and/or parameter code the instrument answer is:

<MEASURE_CODE><N_BYTE>{MEASURE_DATA}

You need to apply a transmission factor to the measure data in order to obtain the value in international
system units.

Manual version : 7.5.0


8 Communication protocol

1.2 Event frame

This frame is available only for communication with CIM software.


CERSA-MCI reserve the right to change this protocol without any warranty of compatibility.

Digital I/O must be used by the customer to get "out of tolerances" and "alarms" events.

When the user request event code the instrument answer is:

<EVENT_CODE><N_BYTE> |EVENT_1_DATA| .......... |EVENT_N_DATA|

The requested data is related to the events occurred since the last query.

For an event code request several events can be transmitted.

<EVENT_1_ID>{EVENT_1_TIME}{EVENT_1_LENGTH}{EVENT_1_ARGUMENT}
..............

{EVENT_N_ID}{EVENT_N_TIME}{EVENT_N_LENGTH}{EVENT_N_ARGUMENT}

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 9

Each event contains the following information:

<Event id>: Unique identifier of the event. Here below the list of relevant values.

Identifier Identifier Identifier name Description


hexa value decimal
value
FD A9 -599 CODE_EVENT_POINT_ERROR_5_ALGO Signal is not correct for analyse
FE 0D -499 CODE_EVENT_POINT_ERROR_4_SIGNAL Signal is not correct for analyse
FE D2 -302 CODE_EVENT_POINT_ERROR_3_OUT_OF_RANGE Amplitude of diameter is out of range.
FE D3 -301 CODE_EVENT_POINT_ERROR_3_WRONG_POSITION Position is not correct
FE D4 -300 CODE_EVENT_POINT_ERROR_3_POSITION_OUT Piber position is not correct
FF 36 -202 CODE_EVENT_POINT_ERROR_2_HW_TEMP_UNSTA Temperature is not stable
BLE
FF 37 -201 CODE_EVENT_POINT_ERROR_2_HW_SOURCE Light source problem
FF 38 -200 CODE_EVENT_POINT_ERROR_2_HW_TEMP_HIGH Temperature is too high
FF EF -17 CODE_EVENT_POINT_INFO_PARAM_ERROR Configuration error
FF F0 -16 CODE_EVENT_POINT_INFO_RS232_ERROR Serial communication error
FF FC -4 CODE_EVENT_POINT_INFO_EVENT_MAX Event buffer is saturated
FF FD -3 CODE_EVENT_POINT_INFO_OVERFLOW Time or length overflow
FF FE -2 CODE_EVENT_POINT_INFO_CHANGE_SPOOL Indicates a spool change. Time length reset.
FF FF -1 CODE_EVENT_POINT_INFO_CIM_COMM_ERROR Instrument deconnexion. Comm error.
00 00 0 CODE_EVENT_SEGMENT_STATE_OK Tolerance current state ok
00 01 1 CODE_EVENT_SEGMENT_START_OUT_LOW Start out low tolerance event
00 02 2 CODE_EVENT_SEGMENT_STATE_OUT_LOW Tolerance current state out low
00 03 3 CODE_EVENT_SEGMENT_END_OUT_LOW End out low tolerance event
00 04 4 CODE_EVENT_SEGMENT_START_OUT_HIGH Start out high tolerance event
00 05 5 CODE_EVENT_SEGMENT_STATE_OUT_HIGH Tolerance current state out high
00 06 6 CODE_EVENT_SEGMENT_END_OUT_HIGH End out high tolerance event
00 07 7 CODE_EVENT_SEGMENT_START_WAR_LOW Start warning low tolerance event
00 08 8 CODE_EVENT_SEGMENT_STATE_WAR_LOW Tolerance current state warning low
00 09 9 CODE_EVENT_SEGMENT_END_WAR_LOW End warning low tolerance event
00 0A 10 CODE_EVENT_SEGMENT_START_WAR_HIGH Start warning high tolerance event
00 0B 11 CODE_EVENT_SEGMENT_STATE_WAR_HIGH Tolerance current state warning high
00 0C 12 CODE_EVENT_SEGMENT_END_WAR_HIGH End warning high tolerance event

{Event time}: Time where the event has been produced in milliseconds. The instrument use internal
counter to log this time. If overflow of counter occurs the instrument generate
CODE_EVENT_POINT_INFO_OVERFLOW. The counter can be reset by external order then the
instrument generate CODE_EVENT_POINT_INFO_CHANGE_SPOOL.
{Event length}: Length where the event has been produced in millimeters. The instrument use internal
counter and external pulse signal to log the length. If overflow of counter occurs the instrument generate
CODE_EVENT_POINT_INFO_OVERFLOW. The counter can be reset by external order then the
instrument generate CODE_EVENT_POINT_INFO_CHANGE_SPOOL.
{Argument}: Value used to transmit additional information for the event. In case of out of tolerance it
represent the value exceeding the tolerance and use the same unit than related measurement.

Manual version : 7.5.0


10 Communication protocol

Remark:
The last event transmitted by the instrument for specific event code request, represent the state of the
measurement according to the tolerances.
If START event has been logged and the event continue after the PC request, the state will indicate that the
event state continue to be detected (high or low).

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 11

2 Trigger mode

2.1 WSR

In this mode the user rotates the wire with WSR tool, generally during one second or two seconds.
Only half turn is necessary to obtain full diameter fluctuation.

The instrument stores the diameter values according to the angle during this interval. This acquisition is
performed at 400 [Hz].
The diameter-angle values are stored internally in "spreadsheet" table. A flag is used to indicates the
status of the acquisition.

You need to query spreadsheet "READ SPREADSHEET TRIGGER MODE DATA" and status " READ
MEASURE TRIGGER MODE STATUS" codes to read the values:

Here below the image display how the spreadsheet table and the status are used.

STATUS = 0: No rotation. Any value stored.


STATUS = 1: Rotation in progress.
STATUS = 2: Rotation done.
STATUS = -1: Rotation end with error.

Recommended communication rate: 0.1 seconds -> 5 seconds.

Manual version : 7.5.0


12 Communication protocol

2.2 Foot pedal

In this mode the user push the foot pedal to acquire diameter values.
The acquisition is done when the user make a long push in the foot pedal.

The diameter values are stored internally in "spreadsheet" table. A flag is used to indicates the status of
the acquisition.

You need to query spreadsheet "READ SPREADSHEET TRIGGER MODE DATA" and status " READ
MEASURE TRIGGER MODE STATUS" codes to read the values:

Here below the image display how the spreadsheet table and the status are used.

STATUS = 0: Any value stored.


STATUS = 1: Acquisition in progress.
STATUS = 2: Acquisition done. After a long push.
STATUS = -1: Acquisition end with error.

Recommended communication rate: 0.1 seconds -> 5 seconds.

2.3 Spreadsheet frame

When the user request spreadsheet code the instrument answer is:

<SPREADSHEET_CODE><N_BYTE>{SPREADSHEET_DATA}

The spreadsheet data is arranged as follow:

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 13

<Version>: Represent the version of the frame. Current version is 1.


<Number of rows>: The number of rows of the spreadsheet.
<Number of columns>: The number of columns of the spreadsheet.
<Number of bytes>: The number of bytes of the individual rows-columns data.

Then each individual value (coded in <Number of bytes>) is arranged in column major order:

(Row1,Column1), (Row 1, Column 2), (Row2,Column1), (Row 2, Column 2), .... (Row N,Column M), (Row
N, Column M + 1), ...

Manual version : 7.5.0


14 Communication protocol

3 Stream mode
In this mode the instrument send all the measurements made by each axis.

In order to begin the streaming the user need to send the "STREAM PARAMETER" query using the
standard protocol with data value to 1.
For one axis configuration the stream rate is 400 measurements / second.
For two axis configuration 200 measurements / second.

The instrument wait 5 seconds before to send continuously the following frame until the stop request.

{CODE_SYNC}{DATA_AXIS_1}{DATA_AXIS_2} .... {DATA_AXIS_N} (0 ms)


{CODE_SYNC}{DATA_AXIS_1}{DATA_AXIS_2} .... {DATA_AXIS_N} (2.5 ms)
{CODE_SYNC}{DATA_AXIS_1}{DATA_AXIS_2} .... {DATA_AXIS_N} (5 ms)
...

Syntax:
{ } represents coded data:
In 4 bytes signed (32 bits) for read measurements. Example:{-1} = 0xFFFFFFFF.
CODE_SYNC: 0xF0F0F0F0.
DATA_AXIS_N: If the value is positive it corresponds to the diameter value. If the value is negative it
corresponds to the error code for the axis measurement.
You need to apply a transmission factor to the measure data in order to obtain the value in international
system units. The diameters is transmitted in nanometers.

In order to stop the streaming the user need to send the "STREAM PARAMETER" query using the
standard protocol with data value to 0.

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 15

4 Examples
Example of read command for diameter (3E E4), position x (3E EC) and position y (3E ED)
measures.

1. USER REQUEST COMMUNICATION: PC -> Instrument


26 01 52

2. INSTRUMENT ANSWER: Instrument -> PC


01 52

3. USER COMMAND: PC -> Instrument


3E E4 3E EC 3E ED 00 00

4. INSTRUMENT ANSWER: Instrument -> PC


3E E4 00 04 00 01 E8 97 3E EC 00 04 FF FF FF 9C 3E ED 00 04 FF FF FF 9C
Frame decoding:
Diameter: {00 01 E8 97} = 125.079 um.
Position X:{FF FF FF 9C} = -0.1 mm.
Position Y:{FF FF FF 9C} = -0.1 mm.

Example of read command for diameter (3E E4), event diameter (5DC1), event status (5DC1).

1. USER REQUEST COMMUNICATION: PC -> Instrument


26 01 52

2. INSTRUMENT ANSWER: Instrument -> PC


01 52

3. USER COMMAND: PC -> Instrument


3E E4 5D C1 5D C0 00 00

4. INSTRUMENT ANSWER: Instrument -> PC


3E E4 00 04 00 01 E8 97
5D C1 00 1C 00 04 00 00 03 E8 00 00 07 D0 00 00 00 0A 00 05 00 00 03 E9 00 00 07 D1 00 00
00 00
5D C0 00 1C FF 36 00 00 03 F0 00 00 07 DA 00 00 00 00 00 00 00 00 03 FA 00 00 07 DB 00 00
00 00
Frame decoding:
Diameter: {00 01 E8 97} = 125.079 um.
Diameter events:
event 1:
id <00 04>: CODE_EVENT_SEGMENT_START_OUT_HIGH
time {00 00 03 E8}: 1000 ms
length {00 00 07 D0): 2000 mm
argument {00 00 00 0A} = 10 µm.
event 2:
id <00 05>: CODE_EVENT_SEGMENT_STATE_OUT_HIGH:
Out high tolerance is in progress
time {00 00 03 E9}: 1001 ms
length {00 00 07 D1): 2001 mm
argument {00 00 00 00} = 0.
Status events:

Manual version : 7.5.0


16 Communication protocol

event 1:
id <FF 36>: CODE_EVENT_POINT_ERROR_2_HW_TEMP_UNSTABLE
time {00 00 03 F0}: 1008 ms
length {00 00 07 DA): 2010 mm
argument {00 00 00 00} = 0.
event 2:
id <00 00>: CODE_EVENT_SEGMENT_STATE_OK:
Any other alarm in progress for this queue
time {00 00 03 FA}: 1009 ms
length {00 00 07 DB): 200B mm
argument {00 00 00 00} = 0.

Example of write command for non circularity (3F 4C), diameter high (3F 49) and diameter low (3F
4A) tolerances:

1. USER REQUEST COMMUNICATION: PC -> Instrument


26 01 57

2. INSTRUMENT ANSWER: Instrument -> PC


01 57

3. USER COMMAND: PC -> Instrument


3F 4C 3F 49 3F 4A 00 00 00 04 00 00 00 19 00 04 00 00 03 E8 00 04 00 00 03 E8
Frame decoding:
Sent non circularity tolerance: {00 00 00 19} = 0.25um.
Sent diameter high tolerance: {00 00 03 E8} = 1000nm.
Sent diameter low tolerance: {00 00 03 E8} = 1000nm.

4. INSTRUMENT ANSWER: Instrument -> PC


3F 4C 00 04 00 00 00 19 3F 49 00 04 00 00 03 E8 3F 4A 00 04 00 00 03 E8
Frame decoding:
Stored non circularity tolerance: {00 00 00 19} = 0.25um.
Stored diameter high tolerance: {00 00 03 E8} = 1000nm.
Stored diameter low tolerance: {00 00 03 E8} = 1000nm.

Example of read command for WSR spreadsheet and status (3F3E) (196B)

1. USER REQUEST COMMUNICATION: PC -> Instrument


26 01 52

2. INSTRUMENT ANSWER: Instrument -> PC


01 52

3. USER COMMAND: PC -> Instrument


3F 3E 19 6B 00 00

4. INSTRUMENT ANSWER: Instrument -> PC


3F 3E 00 04 00 00 00 01 19 6B 00 28 00 01 00 02 00 02 00 04 00 00 00 0A 00 02 E6 30 00 00 00 14 00
02 E6 F8
Frame decoding status (3F 3E 00 04 00 00 00 01):
Status: {00 00 00 01} = 1. Trigger acquisition running

Manual version : 7.5.0


© 2020 CERSA-MCI
Protocol 17

Frame decoding spreadsheet (00 01 | 00 02 | 00 02 | 00 04 | 00 00 00 0A | 00 02 E6 30 | 00 00 00


14 | 00 02 E6 F8):
This example describe spreadsheet with 2 rows and 2 columns
Version: <00 01> = 1
Number of rows: <00 00 00 02> = 2
Number of columns: <00 00 00 02> = 2
Number of bytes: <00 00 00 04> = 4
Row 1 , Column 1 <00 00 00 0A> = 10 degrees.
Row 1 , Column 2 <00 02 E6 30> = 190100 nanometers
Row 2 , Column 1 <00 00 00 14> = 20 degrees.
Row 2 , Column 2 <00 02 E6 F8> = 190200 nanometers

Example of write command for diameter streaming (40 39):

1. USER REQUEST COMMUNICATION: PC -> Instrument


26 01 57

2. INSTRUMENT ANSWER: Instrument -> PC


01 57

3. USER COMMAND: PC -> Instrument


40 39 00 00 00 04 00 00 00 01

4. INSTRUMENT ANSWER: Instrument -> PC


40 39 00 04 00 00 00 01

5 seconds after the query ......

5. INSTRUMENT STREAMING: Instrument -> PC


One axis configuration:
F0 F0 F0 F0 00 03 18 F8 F0 F0 F0 F0 00 03 18 F8 ....
Frame decoding:
{F0 F0 F0 F0} = CODE_SYNC
Diameter axis 1: {00 03 18 F8} = 203000 nanometers
Two axis configuration:
F0 F0 F0 F0 00 03 18 F8 00 03 18 EE F0 F0 F0 F0 00 03 18 F8 00 03 18 EE ....
Frame decoding:
{F0 F0 F0 F0} = CODE_SYNC
Diameter axis 1: {00 03 18 F8} = 203000 nanometers
Diameter axis 2: {00 03 18 EE} = 202990 nanometers

Manual version : 7.5.0


18 Communication protocol

IV Command codes
Here below we present the table of user codes:

Measures
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR

READ MEASURE DIAMETER UM 16100 3EE4 meters E-9 32 bits


READ MEASURE SPEED MMIN 16119 3EF7 meters/minute E-3 32 bits
READ MEASURE SPEED MS 16110 3EEE meters/second E-3 32 bits
READ MEASURE TRIGGER MODE STATUS 16190 3F3E 32 bits

Parameters
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR

READ WRITE PARAMETER TOLERANCE NOMINAL DIAMETER UM 16200 3F48 meters E-9 32 bits
READ WRITE PARAMETER TOLERANCE OUT HIGH DIAMETER UM 16201 3F49 meters E-9 32 bits
READ WRITE PARAMETER TOLERANCE OUT LOW DIAMETER UM 16202 3F4A meters E-9 32 bits
READ WRITE PARAMETER STREAM DIAMETER 16441 4039 32 bits

Events
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR

READ EVENT STATUS 24000 5DC0 E-3


READ EVENTS DIAMETER UM 24001 5DC1 E-3

Spreadsheet
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR

READ SPREADSHEET TRIGGER MODE DATA 6507 196B E-3

Manual version : 7.5.0


© 2020 CERSA-MCI

You might also like