WC - LDS - Communication Protocol
WC - LDS - Communication Protocol
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]
Table of Contents
Part I 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.
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:
The baudrate is fixed to 115200 bauds, 8 data bits, 1 stop bit and even parity bit.
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.
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
ACKNOWLEDGMENT
1. USER REQUEST COMMUNICATION: Start acknowledgment.
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
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).
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.
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.
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:
The requested data is related to the events occurred since the last query.
<EVENT_1_ID>{EVENT_1_TIME}{EVENT_1_LENGTH}{EVENT_1_ARGUMENT}
..............
{EVENT_N_ID}{EVENT_N_TIME}{EVENT_N_LENGTH}{EVENT_N_ARGUMENT}
<Event id>: Unique identifier of the event. Here below the list of relevant values.
{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.
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).
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.
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.
When the user request spreadsheet code the instrument answer is:
<SPREADSHEET_CODE><N_BYTE>{SPREADSHEET_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), ...
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.
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.
4 Examples
Example of read command for diameter (3E E4), position x (3E EC) and position y (3E ED)
measures.
Example of read command for diameter (3E E4), event diameter (5DC1), event status (5DC1).
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:
Example of read command for WSR spreadsheet and status (3F3E) (196B)
IV Command codes
Here below we present the table of user codes:
Measures
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR
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
Spreadsheet
DESCRIPTION DECIMAL HEX UNITS TRANSMISSION DATA SIZE
VALUE VALUE FACTOR