RayTek LineScanner MP150 Protocol Manual

MP150
Linescanner
Protocol Manual
Rev. B4 Aug 2019
Contacts
Fluke Process Instruments
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Americas
Everett, WA USA Tel: +1 800 227 8074 (USA and Canada, only) +1 425 446 6300
solutions@flukeprocessinstruments.com
EMEA
Berlin, Germany Tel: +49 30 478 0080
info@flukeprocessinstruments.de
China Beijing, China Tel: +86 10 6438 4691
info@flukeprocessinstruments.cn
Worldwide Service
Fluke Process Instruments offers services, including repair and calibration. For more information, contact your local office.
www.flukeprocessinstruments.com
© Fluke Process Instruments Specifications subject to change without notice.
Note: By using this manual, you agree to the following:
1. Not to sell competitive commercial products.
2. Not to reverse-engineer manufacturer´s linescanner.
3. Not to duplicate this manual.
4. Any disputes will be settled in courts local to the manufacturer or its subsidiaries.
5. To forfeit this manual upon the manufacturer´s request.
6. WARRANTY: The protocol manual is provided ”AS IS” without representation or warranty
of any kind. Seller makes no warranties with respect to the protocols. Seller, specifically, disclaims any expressed implied, written, oral or statutory warranties of design arising from dealing, trade, usage or trade practices.
Specifications subject to change without notice.

Content

CONTENT ............................................................................................................................................................. 5

1 INTRODUCTION .............................................................................................................................................. 7
2 COMMUNICATION INTERFACES ............................................................................................................... 8
2.1 ETHERNET ..................................................................................................................................................... 8
2.1.1 Keep Alive Time .................................................................................................................................... 8
2.1.2 BootP ..................................................................................................................................................... 8
3 TRANSMISSION OF COMMANDS TO THE SCANNER ........................................................................... 9
3.1 COMMAND STRUCTURE ................................................................................................................................ 9
3.2 ANSWER ...................................................................................................................................................... 10
3.3 REQUESTING PARAMETERS FROM THE SCANNER ...................................................................................... 10
3.4 ERROR HANDLING ...................................................................................................................................... 11
4 TRANSMISSION OF TEMPERATURE LINES ............................................................................................ 12
4.1 STARTING AND STOPPING THE DATA TRANSMISSION .............................................................................. 12
4.1.1 The Receive Mode (RM): Burst or Snapshot (Host) ............................................................................. 12
4.2 THE DATA MODE (DM) ............................................................................................................................... 13
4.2.1 Byte Mode for Temperature (DMB) ...................................................................................................... 13
4.2.2 Word Mode 1 for Temperature (DMW) ................................................................................................. 13
4.2.3 Word Mode 2 for Temperature (DMWT2) ............................................................................................ 13
4.3 COUNT OF PIXEL (POINT MODE, PM) ......................................................................................................... 13
4.3.1 What to do with the Surplus Pixel (PMX) ........................................................................................... 14
4.4 LINE COMPOSITION, LINEMODE (LM) ....................................................................................................... 14
4.4.1 A Line with Frame in Burst Mode ...................................................................................................... 14
4.4.2 The Lines with Frame in Snapshot Mode ............................................................................................ 14
4.4.3 The Checksum of a Line or Snapshot ................................................................................................... 15
4.4.4 MP40 Line Modes ............................................................................................................................... 15
4.4.5 MP50 Line Modes ............................................................................................................................... 15
4.4.6 MP150 Line Modes ............................................................................................................................. 15
4.4.6.1 Line Mode 11hex ........................................................................................................................................... 15
4.4.6.2 Line Mode 12hex ........................................................................................................................................... 15
4.4.6.3 Line Mode 13hex ........................................................................................................................................... 16
5 DEDICATED COMMANDS .......................................................................................................................... 17
5.1 START-UP PARAMETER ............................................................................................................................... 17
5.2 SECTORS ...................................................................................................................................................... 18
5.2.1 Sector Position (SL, SR) ..................................................................................................................... 18
5.2.2 Sector Emissivity (SE) ........................................................................................................................ 19
5.2.3 Sector Calculation (SC) ....................................................................................................................... 19
5.2.3.1 Sector Calculation “Width” ....................................................................................................................... 19
5.2.4 The Translation of Temperature into Current .................................................................................... 20
5.2.5 How the Current / Temperature gets calculated? ............................................................................... 20
5.2.6 Sector Alarms ...................................................................................................................................... 20
5.2.7 Alarm Reset ......................................................................................................................................... 21
5.2.8 The Whole Alarm Story in State Diagrams ........................................................................................ 21
5.3 ZONES ......................................................................................................................................................... 22
5.3.1 The Zone Story in State Diagrams ..................................................................................................... 23
5.3.2 The Hold Commands in State Diagrams ............................................................................................ 24
5.3.3 Examples ............................................................................................................................................. 25
5.4 SECTOR AND ZONE .................................................................................................................................... 25
5.5 SETTING THE EMISSIVITY ............................................................................................................................ 27
5.5.1 The Emissivity Vector (EMV) .............................................................................................................. 27
5.6 SCAN FREQUENCY STEPS ........................................................................................................................... 28
5.7 AVERAGING, COMBINING OR CONDENSING LINES (AT, AV, AVX) ........................................................ 28
5.8 SWITCHING THE LASER .............................................................................................................................. 29
5.9 FIELD OF VIEW CONSIDERATIONS ............................................................................................................. 29
5.9.1 Why the Field of View Command does not send a NAK? .................................................................. 29
5.10 RESPONSE AND EXPOSURE TIME .............................................................................................................. 30
5.11 AMBIENT TEMPERATURE COMPENSATION.............................................................................................. 30
5.12 CUSTOMER ADJUSTMENT ......................................................................................................................... 30
5.13 SERVICE COMMANDS ............................................................................................................................... 31
5.14 THE WINDOW TRANSMISSION ................................................................................................................. 31
6 DIFFERENCES MP150 – MP50 ..................................................................................................................... 32
7 APPENDIX ....................................................................................................................................................... 33
7.1 LIST OF USER COMMANDS ......................................................................................................................... 33
7.2 TETRAGON-ZONES ..................................................................................................................................... 39
7.3 IO-MODULES (WAGO) ............................................................................................................................... 42
7.4 DOUBLING OF LINES .................................................................................................................................. 42
Introduction
MP150 Protocol Rev. B4 Aug 2019 7

1 Introduction

For many applications, the scanner can be easily configured with the help of the factory distributed software. In other applications, it would be more useful to integrate the scanner into a larger system or customize it for specific measuring tasks.
The scanner is programmed via its serial and the Ethernet interface to configure it to specific measurement applications.
This manual describes the structure of the different commands and their effect on the scanner functions.
With further development of the scanner, deviations from this manual may occur. However, it is the manufacturer’s intent to maintain forward compatibility with newer versions.
As the scanner rarely checks commands, it is up to the programmer to provide proper command syntax.
Descriptions of the serial and the Ethernet interface are available through computer.
The command interface of the MP150 derives from (is compatible to) the MP50 – this might explain some structures in the commands.
The structure of this description is as follows:
It starts with the command structure (section 3),
followed by the structure of interesting temperature data lines (section 4),
followed by detailed information for dedicated commands (section 5),
and ends with a list of all commands (section 7).
Communication Interfaces
8 Rev. B4 Aug 2019 MP150 Protocol

2 Communication Interfaces

The MP150 scanner communicates via RS485 or the Ethernet interface. After scanner start-up, both interfaces will be active and will remain active. Though two interfaces are available only one should be used at a time. Using both interfaces at the same time may create undefined results!
For more information about the Ethernet and RS485 interface, see the MP150 manual
“Operating Instructions”!

2.1 Ethernet

2.1.1 Keep Alive Time

The scanner has built-in support for keepalive. The procedures involving keepalive use three user­driven variables:
tcp_keepalive_time: the interval between the last data packet sent (simple ACKs are not
considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further.
tcp_keepalive_intvl: the interval between sub sequential keepalive probes, regardless
of what the connection has exchanged in the meantime.
tcp_keepalive_probes: the number of unacknowledged probes to send before
considering the connection dead and notifying the application layer.
The default values are: 240 10 6; which mean after 240 seconds the scanner will send 6 probes with an interval of 10 seconds, so after 5 minutes a broken connection will be closed.

2.1.2 BootP

Getting the IP-Address via BootP the BootP Client
Since firmware version 3.43 a BootP client is “asking” for an IP-address if no connection was established.
The implantation is done following the RFC 951 Bootstrap Protocol.
Transmission of Scanner Commands
MP150 Protocol Rev. B4 Aug 2019 9

3 Transmission of Scanner Commands

Commands serve to setup functional modes and parameters in the scanner.

3.1 Command structure

Commands are generally transmitted from the PC to the scanner, and have the following format:
SOH Operation Code [Sector] [Parameter] EOT BCC
The [Operation Code] and [Parameter] are to be find in section 7.1 and the [Sector] is described in section
5.2.
The frame (composed of SOH, EOT and BCC) may be left out, but should be used in the RS485 connection to avoid communication errors. (The predecessor MP50 did require the frame.) If a command was sent with the frame, then the scanner will answer with the frame. The decision with/without frame is made at the first sign (SOH or not SOH).
These ASCII control characters used in the protocol with their associated decimal and hexadecimal values are the following:
Control character
decimal
hexadecimal
SOH
„start of heading”
01D
01H
STX
„start of text”
02D
02H
EOT
„end of transmission”
04D
04H
ACK
„acknowledge”
06D
06H
NAK
„negative acknowledge”
21D
15H
SYN
„synchronous idle”
22D
16H
EOF
„end of file”
26D
1AH
ETB
„end of transmission block”
23D
17H
ESC
„escape”
27D
1BH
During command and parameter transmission, transmission reliability is checked with a Block Character Checksum (BCC).
The BCC is transmitted as the last byte of the command or parameter string. The BCC is a modulo 256 sum of all previously transmitted characters and bitwise OR-ed with 80H or 128D (to set the highest bit of the BCC).
Example (send the command AR):
SOH 01H
”A” 41H ”R” 52H
+ EOT 04H
BCC = 98H and afterwards, bitwise OR-ed with 80H yields (which, in this case, does not change the byte’s value): BCC = 98H
Transmission of Scanner Commands
10 Rev. B4 Aug 2019 MP150 Protocol

3.2 Answer

After transmission of the BCC, the scanner will reply with either ACK, NAK or ETB. These replies have the following meanings:
ACK - The command contains the proper syntax and is acknowledged by the scanner. NAK - There are syntax errors in the command, or the BCC is wrong– it will not be acknowledged. The
wrong command does not cause changes in the scanner. It has to be corrected and/or repeated.
ETB - The internal diagnosis software in the scanner has spotted an error. This error must be corrected,
and thereafter, the command must be repeated as it could not be implemented due to the scanner error.

3.3 Requesting Parameters from the Scanner

The retrieval of previously defined functions and parameters is possible using the following format:
SOH ”G” Operation Code [Sector] EOT BCC
The method of defining the operation code for retrieval of parameters is similar to the setting of the parameters. The operation code is prefixed by a ”G” (for ‘Get’).
For sector parameter requests, the sector number must be present after the command code.
After transmitting the BCC, the scanner will reply with ACK, NAK or ETB in the same way it does when issuing commands (see section 3.2). These replies have the same meaning as during the transmission of commands, and NAK / ETB have the same handling requirements.
After replying ACK, the scanner will transmit the parameter(s), using the same format as the PC does when issuing a command. However, the scanner does not require an ACK or NAK signal from the PC. For example, if transmission of the current line count is desired, the computer requests the parameter by issuing:
SOH ”GLC” EOT BCC
If the transmission is correct the scanner will reply:
ACK SOH ”TR1” EOT BCC
Should any error occur in the checksum, the parameter request should be repeated.
Transmission of Scanner Commands
MP150 Protocol Rev. B4 Aug 2019 11

3.4 Error Handling

If the scanner, upon a command or a parameter request, answers ETB instead of ACK/NAK, an error in the scanner has occurred.
After the acknowledgment signal ETB from the scanner, indicating an error, the scanner only accepts the error status parameter request: GES which it will respond as described in section 3.3: ES<error code>.
The meaning of the <error code> is given in table Table 1.
If other commands or parameter requests are transmitted, the scanner will continue to respond with ETB; with the exceptions:
GES to get the error,
CC to switch to the calibration mode. In the Calibration mode this ETB-behaviour is switched
off.
The command itself will still be executed, even if it answers with ETB only.
In case of recoverable errors, the reset of the error message is possible, and continued operation may be achieved by issuing the command ES.
The following errors are defined and can be asked for using the GES command. Bit positions of multiple errors are or-ed up in the answer as described below the table.
error bit
hexadecimal representation
Description
What is to do?
reflected in the ETB­answer
0
1hex
checksum error in the user parameter section
PS
yes 1 2hex
checksum error in the calibration parameter section
%PS
yes 2 4hex
checksum error in the temperature table section
%TTS
yes
3
8hex
device in warm-up
wait some minutes
no 4
10hex
bias voltage out of range
service
yes
5
20hex
checksum error in the service parameter section
service / may be ignored
no
6
40hex
detector cooler voltage out of range
device may be too warm; if not ­service
yes
7
80hex
internal temperature over range
cooling
no
30
40000000hex
no zero-pulse is arriving from the encoder – probably the motor is not rotating
service
yes 31
80000000hex
motor is rotating but no data is arriving at the ad-converters
service
yes
Table 1
Example 1: active error bits 0, 1, 30 result in the answer 40000003 (1hex + 2hex + 40000000hex)
Example 2: active error bits 0, 1, 3 result in the answer: Result / answer: 1hex + 2hex + 8hex = Bhex
Transmission of Temperature Lines
12 Rev. B4 Aug 2019 MP150 Protocol

4 Transmission of Temperature Lines

A scanned line is composed of a count of temperature points which will be termed a ‘pixel.’ Depending on the point mode the data transmission can have lines of 64, 128, 256, 512 or 1024 pixels and, depending on the data mode, a pixel can be represented with 1 or 2 bytes.
The data transmission depends on previous commands which define options and parameters. It is defined by:
The Data Mode (DM): it defines the type of information that will be sent as a “pixel”, see section 4.2
The Point Mode (PM): it defines the count of pixel within the 90° field of view, see section 4.3
The Line Mode (LM): it defines the frame around the pixel data and some data that can be appended
onto the line, see section 4.4
The Receive Mode (RM): it switches between continuous transmission (“Burst Mode”) and the
transmission of requested snapshots (“Host Mode”).
The Line Count (LC): defines the count of lines per snapshot.
The composition of the response is described in section 4.4. The parameters/options that change this composition are described in the following subsections.

4.1 Starting and Stopping the Data Transmission

The request of temperature lines by the PC is always initiated by transmitting STX. The scanner will respond to the request with a SYN. As soon as the data is processed into temperatures, transmission will begin. (The transmission may be delayed several seconds if the averaging value is high.) If the scanner receives an ESC, its data transmitting is halted, and the scanner’s internal data buffer is cleared. Then, the scanner will be ready for new commands, parameters and data requests. As it takes a short amount of time for the scanner to complete the buffer clearing process, there may be some data streaming from the scanner up to half a second after sending ESC.

4.1.1 The Receive Mode (RM): Burst or Snapshot (Host)

There are two modes to handle the initiation of data transmission:
Host Mode (RMH): Requesting of snapshots with a predefined length (Line Count)
Burst Mode (RMB): Requesting a continuous stream of lines
Both are started with sending a STX to the scanner. The scanner will respond to the request with a SYN.
Set to host mode an additional trigger condition (set with the command Zone Mode ZM) can be given to synchronise the transmissions start with an event. Once started the transmission will stop after the count of lines which was defined with the LC command or by sending an ESC character. Each new snapshot needs a STX character to be sent.
This host mode was implemented with the background of a very slow data channel (the transmission rate can be lower than the data generation rate). The lines that cannot be transmitted will be buffered and a new snapshot cannot be initiated until the complete snapshot will have been transmitted.
Set to burst mode the transmission will start without any condition after having transmitted the STX character. Once started the transmission will stop with sending an ESC character.
Transmission of Temperature Lines
MP150 Protocol Rev. B4 Aug 2019 13
In this mode no buffering takes place to cope with a slow transmission rate: Pending lines will be discarded.

4.2 The Data Mode (DM)

The data mode defines the type of information that will be sent as a “pixel”. The following modes are
defined:

4.2.1 Byte Mode for Temperature (DMB)

In this mode the pixel data contains temperatures which are scaled to eight bits. It is compatible to the MP50. The following formula should be used to translate the received data back to temperatures:
T = DataByte * (T
max
– T
min
) / 255 + T
min
T
min
is set with the command SB0<T
min
> .
T
max
is set with the command ST0<T
max
> .

4.2.2 Word Mode 1 for Temperature (DMW)

In this mode the pixel data is built up of two bytes (the least significant byte first). They give the temperature in °C. This mode is compatible to the MP50. (Example: 13hex, 02hex = 531°C)

4.2.3 Word Mode 2 for Temperature (DMWT2)

In this mode the pixel data contains temperatures which are built up of two bytes (the most significant byte first). They give the temperature scaled to 16 bit. It extends the MP50 mode DMB to get a higher resolution.
The following formula should be used to translate the received data back to temperatures:
T = DataWord * (T
max
– T
min
) / FFFF
hex
+ T
min
T
min
is set with the command SB0<T
min
> .
T
max
is set with the command ST0<T
max
> .

4.3 Count of Pixel (Point Mode, PM)

The point mode (PM) defines the count of pixel within the 90° field of view. Possible are: 64, 128, 256, 512 and 1024 pixel. It is limited by the following equation:
countOfPixels * scanFrequency * 90° / fieldOfView <= 512pixel * 80Hz
The programmer is responsible to meet this equation – the scanner will not change any of these three parameters with setting another one (see also section 5.9.1).
Loading...
+ 29 hidden pages