MEL M2D/LAN User manual

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 2 of 39 www.MElsensor.com
C
Co
on
nt
te
en
nt
ts
s
Contents ..................................................................................................................................................................................2
System description ..................................................................................................................................................................4
Scanner Head, Electronic-System and controls ......................................................................................................................4
Software Controlled Parameters.............................................................................................................................................4
Connecting the Ethernet-Scanner ...........................................................................................................................................4
Using standard Ethernet hardware ..........................................................................................................................................4
Cabling requirements ..............................................................................................................................................................5
Ethernet connectors RJ-45.....................................................................................................................................................6
Multi-Scanner Arrays ...............................................................................................................................................................6
How many scanners could be integrated in one network segment?........................................................................................6
Control Commands..................................................................................................................................................................6
External-Trigger / Hardware-Trigger........................................................................................................................................7
Synchronization .......................................................................................................................................................................7
Ethernet-Trigger Mode ............................................................................................................................................................7
Digital inputs ............................................................................................................................................................................7
Read out complete image........................................................................................................................................................7
Synchronize Sensors...............................................................................................................................................................7
Trigger Mode ...........................................................................................................................................................................7
Calculation of shutter time .......................................................................................................................................................8
Number of pixels, encoder data...............................................................................................................................................8
Register 0x1B: Profile peak recognition threshold ...................................................................................................................8
Status LED’s on the “Blue Box” ...............................................................................................................................................8
Power and signal connector D-Sub-25 pin ..............................................................................................................................9
Ground connection; connector D-Sub-25 ................................................................................................................................9
Technical data .......................................................................................................................................................................10
M2DF/LAN Laser-Scanner, electronic system in Blue Box with Ethernet interface ..............................................................10
Dimensions of the electronic box...........................................................................................................................................10
Other MEL Laser-Scanner hardware.....................................................................................................................................10
Communication between Electronic unit and PC...................................................................................................................11
Functions of the Micro-Controller in the Electronic-Box.........................................................................................................11
PC-Host-Software functions ..................................................................................................................................................11
Communication Components ................................................................................................................................................11
Set up of the Scanners working IP-Address ..........................................................................................................................11
Set the Scanner to the default IP address .............................................................................................................................11
Resolving IP-Address-Conflicts .............................................................................................................................................11
DHCP ....................................................................................................................................................................................12
Ping .......................................................................................................................................................................................12
IP parameters Default Values.......................................................................................................................................... 12
MEL Demo Software for Ethernet-Scanners .........................................................................................................................13
Main window..........................................................................................................................................................................13
Temperature readout.............................................................................................................................................................13
Using a temporary IP-Address...............................................................................................................................................14
Pixel Readout Limit (Demarcation Feature)..........................................................................................................................14
Data format and interface description....................................................................................................................................15
Frame format for TCP-Scanner profile transmission .............................................................................................................15
Structure of M2DF-LAN Header and payload Data ...............................................................................................................15
Sync and status information, position encoder (protocol revision 3.x) ...................................................................................15
Status information readout using command 0x21:................................................................................................................. 16
Encoder data .........................................................................................................................................................................16

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 3 of 39 www.MElsensor.com
Data format for register address, command and data ...........................................................................................................16
Scanner controls....................................................................................................................................................................17
Special commands for the Ethernet version ..........................................................................................................................17
M2DF / LAN-Data Format......................................................................................................................................................18
Meaning of the status byte 2 as a function of Register 0x11 .................................................................................................18
Register value [0] Scanner head temperature .......................................................................................................................18
Register value [1]: register contents ......................................................................................................................................18
Register value [2,3] : version number of camera and electronic system................................................................................18
Register value [4,5,6,7,8]: hours counter (bit 7 always 0) count every 250 msec.................................................................. 18
Register value [9,10,11]: on counter (bit 7 always 0) max. count = 131072 ..........................................................................18
Register value [12]: digital inputs...........................................................................................................................................18
Register value [13]: Laser Control .........................................................................................................................................19
Register value [14]: Revision number....................................................................................................................................19
Register value [15 … 31]: not used .......................................................................................................................................19
32 Byte Eprom data...............................................................................................................................................................20
Register 0x18 ........................................................................................................................................................................20
Protocol Version 1 .................................................................................................................................................................20
M2DF/LAN-Structure of Image Data......................................................................................................................................21
Protocol Version 3 .................................................................................................................................................................21
Integrated Web-Server ..........................................................................................................................................................22
Available Read out Functions ................................................................................................................................................22
How to set the IP address over the Web ...............................................................................................................................22
Requirements ........................................................................................................................................................................22
RS-232 Monitoring.................................................................................................................................................................23
Flashing Firmware .................................................................................................................................................................24
Trouble Shooting ...................................................................................................................................................................25
Example code for Software engineers...................................................................................................................................26
Data format for register addresses and commands...............................................................................................................26
3. Command: 0x21 (dump) ....................................................................................................................................................27
example: // read out FiFo status and sensor temperature .....................................................................................................32
Setting the IP-Address by software .......................................................................................................................................34
Representation of the Serial-Number ....................................................................................................................................34
Ports ......................................................................................................................................................................................35
Ethernet WinSock Implementation ........................................................................................................................................36
Example: (“C”) using WinSock and Scanner functions: ........................................................................................................36
UDP Implementation .............................................................................................................................................................37
IP-Programming for UDP-transmission protocol:...................................................................................................................38
Changes and additions..........................................................................................................................................................39
Disclaimer: This document may contain misprints and errors.
MEL does not cover any warranty claims based
on the fact of possible mismatch of this documentation.
Please note: in the following text, register addresses were given as hexadecimal numbers: 0x14 = “20” 14 hexadecimal = 20 decimal.
Bit 7 = MSB = “0” for all register addresses
Bit 7 = MSB = “1” for all commands and data
Firmware The Scanner head contains Firmware in an Eprom, defining the
functions of profile recognition and Scanner head control
algorithms. This Firmware is referred to as “Scanner head
Firmware”. This Firmware can be altered by exchange of the
Eprom. Current Revision state is 3.6.3.
Firmware of the electronic system is located in the blue box
electronic system. This firmware can be updated with a flash tool
supplied by MEL on request. The flash procedure requires a
working RS-232 connection to the electronic box and a.m. flash
tool. Current firmware revision of the electronic system is 1.13.5

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 4 of 39 www.MElsensor.com
S
Sy
ys
st
te
em
m
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
The M2D-LAN-Laser-Scanners come with an electronic box in the size of 102 x 70 x 28 mm. A standard RJ-45-
Ethernet connector is in the cover of the electronic system box. On the D-Sub-25-pin connector at the side, the
Ethernet-signals are also available. When the Ethernet is connected to the D-Sub connector, the cover may be
sealed optional, providing immunity against water and dust.
S
Sc
ca
an
nn
ne
er
r
H
He
ea
ad
d,
,
E
El
le
ec
ct
tr
ro
on
ni
ic
c-
-S
Sy
ys
st
te
em
m
a
an
nd
d
c
co
on
nt
tr
ro
ol
ls
s
The Scanner head is equipped with a CCD-Camera, a Line Laser projector and a electronic system for the
detection of the profile from the camera video signals. The Scanner head is connected to the Blue-Box with a 9-
pin Sub-D-connector. The camera in the scanner head is controlled through the Blue-Box. There are no Dip-
Switches for adjustment of shutter time, video gain and laser intensity. All adjustments are done in the
configuration software and permanently stored in a electrically erasable EPROM.
For software engineers, writing their own applications, MEL deploys examples with source-code in C++. For
documentation of hardware registers, scanner implementation and data format see Data format and interface
description.
S
So
of
ft
tw
wa
ar
re
e
C
Co
on
nt
tr
ro
ol
ll
le
ed
d
P
Pa
ar
ra
am
me
et
te
er
rs
s
TCP/IP: address; subnet mask; TCP-ports
Operation controls: shutter control
Laser “intensity” control; Video gain control
Operation modes: continuous - single shot; ext. trigger – free run
Synchronized – non-synchronized mode , Trigger with hardware / software
C
Co
on
nn
ne
ec
ct
ti
in
ng
g
t
th
he
e
E
Et
th
he
er
rn
ne
et
t-
-S
Sc
ca
an
nn
ne
er
r
When connecting the M2D-LAN-Scanner to a your LAN* use a 1:1 wired cable to the Ethernet-Switch, when
connecting directly to the Ethernet network card in the PC, use a cross-wired Ethernet cable, also known as
crossover-cable (X-over). Do not connect Ethernet card and Scanner with a 1:1-wired Ethernet cable!
* LAN = Local Area Network
U
Us
si
in
ng
g
s
st
ta
an
nd
da
ar
rd
d
E
Et
th
he
er
rn
ne
et
t
h
ha
ar
rd
dw
wa
ar
re
e
When testing transmission of the TCP data from the scanner, with standard hardware from the shelf no problems
have been found so far concerning Ethernet Switches and CAT-5e cables. Testing included sending the profiles
over the company network and wireless LAN (802.3g).
We do not recommend the use of „Hubs“: Hubs connect the ports in parallel, this may cause hangs on data
transmission or loss of information.
When “a bunch of scanners” were controlled by a PC, the PC and the graphic card must have good performance
in order to capture and process and display all scanners data fast enough. We recommend to check the image
numbers transmitted with every scan profile. See data format description Register Sync+Status Byte 11, page ….
for details.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 5 of 39 www.MElsensor.com
C
Ca
ab
bl
li
in
ng
g
r
re
eq
qu
ui
ir
re
em
me
en
nt
ts
s
The M2DFL-scanner requires only 4 wires for transmission of data: Tx-; Tx+; Rx- and Rx+. Standard CAT-5e or
CAT-6 cables have 8 wires organized in 4 pairs. For remote power feed, the remaining 4 wires can be used to
supply power to the unit. This wiring will not be according to standard 802.3af Power over Ethernet (PoE), but
when adapters* were carefully designed, it will work without problems.
CAT-5e specification for Twisted-Pair-Network-cables requires twisted leads with 100 Ohms Impedance and
shielded cable. Use always cables specified CAT-5e or better!
When a “switch” is used to connect the M2DFL-scanner to the PC, straight (1:1 wired) Ethernet-cables are to be
used. When connected the M2DFL-scanner directly to the network card in the PC, a cross-wired Ethernet-cable
needs to be used. Ethernet Switches should provide „auto-sense“. This means, the unit automatically detects
signal polarity.
The Ethernet electronic system provides two possibilities to make the Ethernet connection:
o RJ-45 connector at the top cover
o Dsub-25 pin connector
Both connections will provide the same function.
Both connections can never be used in parallel .
When the connection is made at the RJ-45 connector, no Ethernet cable must be connected at the D-Sub-25 pin
connector. Leaving the Ethernet cable hanging “open” from the D-Sub-connector, will cause problems.
The electric waves in the cable are reflected at the open cable end. Depending on the length of the open cable
end, the reflected waves phase shifts. The overlapping of the origin waves and the reflected wave creates a
“chaos”. Overlapping the origin and reflected waves makes the voltage on the cable vary over the location in the
cable – see drawing below!
When the distance of the open cable end is a quarter of the signal wavelength, the signal voltage is zero.
This is the reason, why the RJ-45 connector will not work when a open end of the Ethernet cable is hanging at the
D-sub connector. “Open” means: physically unconnected cable end.
The drawing illustrates the voltage over the cable situation.
The small flash (symbol for a short circuit) is the location where the RJ-45 connector is located.
The rule: a) when an Ethernet cable is present at the D-Sub connector, only this cable should be used.
Do not use the RJ-45 connector.
b) When no other Ethernet cable is at the D-Sub connector, the RJ-45 connector shall be
used to connect the Ethernet cable.
* these adapters are available on request!

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 6 of 39 www.MElsensor.com
E
Et
th
he
er
rn
ne
et
t
c
co
on
nn
ne
ec
ct
to
or
rs
s
R
RJ
J-
-4
45
5
Pin Signal connector A connector B
“normal”
Pin Connector B
“crossed”
Signal
1 TX + Green +White Green +White 1 Red + White Rx +
2 Tx - Green Green 2
Rot Rx -
3 Rx + Red + White Red + White 3 Green +White Tx +
4 nc - Blue Blue 4
Blue nc -
5 nc + Blue + White Blue + White 5 Blue + White nc +
6 Rx - Red Red 6
Green Tx -
7 nc + Brown+ White Brown+ White 7 Brown+ White nc +
8 nc - Brown Brown 8
Brown nc -
picture left: crosslink cable
direct connection from PC network card to scanner electronic box requires a
crosslink network cable. The position of the red and blue wires in the connectors
shows, that this cable is a crossed Ethernet cable, known as crosslink. When you
use a Ethernet switch, 1:1 patch cables should be used instead.
M
Mu
ul
lt
ti
i-
-S
Sc
ca
an
nn
ne
er
r
A
Ar
rr
ra
ay
ys
s
Setting up a multi-scanner array will not require specific “programming”. Configuration can be copied from one
Scanner to the next, yet the TCP/IP addresses of each scanner must then be set to different IP-address value.
(see pages …). Theoretically it is possible to connect more than 30 Scanners in one 100 Mbit Ethernet network
segment, providing no more than 50% load of the 100 Mbit network. Using 10 Mbit network equipment is not
recommended. Image data transmission and network performance
Standard Ethernet network switches, network cards and PC have no problems with M2D-Ethernet-Scanners.
When connecting multiple scanners to one PC, the PC must have enough performance to receive, process and
display the Scan profile information retrieved from the scanners. The performance of CPU and graphic card could
cause “dropped frames”. Use the image count number, delivered with the scan profile data (see data format
description, table 5 on page 12, status register Byte 11 ( 0 … 254) to detect lost profiles!
H
Ho
ow
w
m
ma
an
ny
y
s
sc
ca
an
nn
ne
er
rs
s
c
co
ou
ul
ld
d
b
be
e
i
in
nt
te
eg
gr
ra
at
te
ed
d
i
in
n
o
on
ne
e
n
ne
et
tw
wo
or
rk
k
s
se
eg
gm
me
en
nt
t?
?
The Scanner sends out 100 scan profiles per second with the following data:
o TCP-IP header
o M2DF-L-header, Scan profile data, reserved Bytes
o Additional information as encoder data, fill Bytes, FiFO-fill level data
o CRC error check data
Each scan profile with above data is packed into a 2048 Byte block = 100 x 2.048 kBytes / s = 204,8 kBytes /s
The 100 Mbit network = 12.500 kBytes / s could transport 12.500 / 226 = 61.03 Scanners. For real-time
applications, Administrators avoid network load above 50%. Therefore the recommendation = max. number of
scanners = 30.
C
Co
on
nt
tr
ro
ol
l
C
Co
om
mm
ma
an
nd
ds
s
With the exception of “Laser-ON”, there is no other command to be sent for activation of the scanner. When the
Laser is on, the scanner sends profile data as a “continuous stream”.
It is highly recommended, to send a first “FIFO reset” command, before measurements were made in regular
intervals. The command “FiFO-reset” destroys the first image (at least partially). Therefore ignore the first image
after “FiFO-reset” and wait for the second one. The command FiFO-reset makes sense, when no data has been
acquired for a long time, and the scanner has been waiting for new data. When data is read continuously, the
command FiFO-reset is not useful.
Commands for set up of trigger mode and sync mode are given in the data format description, page 14 and 19.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 7 of 39 www.MElsensor.com
simultaneous Sync alternating Sync simultaneous Trigger alternating Trigger
E
Ex
xt
te
er
rn
na
al
l-
-T
Tr
ri
ig
gg
ge
er
r
/
/
H
Ha
ar
rd
dw
wa
ar
re
e-
-T
Tr
ri
ig
gg
ge
er
r
Pin 15 = Sync-input is triggered with a 0/1 slope = low-high-transit. The trigger signal should be free from
hazardous oscillations. Pin 15 is an optical coupled input with current limit. The input accepts voltage from TTL …
24V, max. 30 V DC.
When a triggered measurement is made, no other trigger signal is considered from the sync input, while the
image is “read”. The maximum scan rate in trigger mode is approx. 75 Hz. Trigger mode must be preset with
register 0x14 (20) = “1”, single shot with trigger. In trigger mode, synchronization is not possible.
S
Sy
yn
nc
ch
hr
ro
on
ni
iz
za
at
ti
io
on
n
Synchronization uses the Sync-input pin 15. One scanner is dedicated to be “Master” while all others are “Slaves”.
Pin 2 of the “Master” is connected to Pin 15 of the Slaves, ground pins are connected accordingly. The Master
sends a sync out signal on pin 2. The slaves receive the sync signal on pin 15. Ground pins = 1, 14. After
receiving the sync pulse, the Slave-Scanner modifies his timing accordingly. For measurement on request, use
Ethernet-Trigger mode (see below!). The sync input can be left open without special wiring.
E
Et
th
he
er
rn
ne
et
t-
-T
Tr
ri
ig
gg
ge
er
r
M
Mo
od
de
e
Ethernet-Trigger Mode is set with Register 0x23 according to definition on page …. In this mode, the sensor
acquires profile data continuous, but sends out data over Ethernet only on request. The internal FiFO is not in
use. The actual profile at time of trigger event is sent out. Depending on the speed of the PC, images could be
missing.
D
Di
ig
gi
it
ta
al
l
i
in
np
pu
ut
ts
s
From PC board version 1.3 on, the digital inputs may be used to feed encoder signals. The digital A/B-inputs feed
a counter, which is read out over the registers 13…16. The encoder counter information is sent with every
complete profile data package. This makes sure, that the position of each profile is always in sync with the motion
position of the scanner.
R
Re
ea
ad
d
o
ou
ut
t
c
co
om
mp
pl
le
et
te
e
i
im
ma
ag
ge
e
The complete camera image is read out. No recognition of the scan data is made, that means, the sensor sends
out raw data with 8 bit resolution. When the register 0x10 is set to “1”, the sensor writes 2 fields complete into the
FiFo. After each field, 8 Byte zero’s and 4 status Bytes are transferred. The read out of a new image starts with a
hardware or software trigger event.
We recommend to empty the FiFO before reading Scanner data. The FiFo is 512 kByte.
Intensity of the pixels values are 0 … 254.
S
Sy
yn
nc
ch
hr
ro
on
ni
iz
ze
e
S
Se
en
ns
so
or
rs
s
„Synchronizing“ means the simultaneous or alternating read out of the sensors. For synchronization, the Pins
Sync out of the Master-Scanner and sync in of the Slave-Scanner unit must be connected, as well as ground pins.
Pin 2 of the master sensor is connected to pin 15 of the slave sensor. Both image counters work now
synchronous. Phase error is less than 10 µsec. When register 0x0F is set to „1“, both sensors measure
alternating. Shutter time in register „2“ and „3“ must be limited to the value 130, in order to avoid overlap of the
two sensors.
T
Tr
ri
ig
gg
ge
er
r
M
Mo
od
de
e
Trigger mode must be activated in the register 0x14, Bit 3 with a “1”. Hardware trigger is made with a leading
edge of the sync input, pin 15. Software trigger is made by accessing the register 0x1D. Software trigger and
hardware trigger both have the same function. In both modes, the sensor reacts on the leading (rising) 0/1-edge
of the trigger impulse. The capture process starts 65 µsec after trigger. The image counter is reset, two fields are
sent out.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 8 of 39 www.MElsensor.com
C
Ca
al
lc
cu
ul
la
at
ti
io
on
n
o
of
f
s
sh
hu
ut
tt
te
er
r
t
ti
im
me
e
The camera creates approximately 103 profiles per second. This
corresponds to 9.71 msec period. The maximum shutter time is
shorter than 9.71 msec, because of the minimum erase time
interval.
Maximum shutter time = 9.71 msec * 256 / 286 = 8.69 msec
This maximum shutter time value is divided in 16384 steps.
The sensitivity is not linear. Therefore the “regulation value”
(RegisterValue – see Register 0 …3) is linearised using 8
definite set values.
For the calculation of the shutter time using the regulation value ( Regelwert) (0 = longest 1022 = shortest shutter
time) the following approximation formula applies:
16384
2897Re16384 4xegistervalu
TimexMaxShuttereShutterTim −
=
N
Nu
um
mb
be
er
r
o
of
f
p
pi
ix
xe
el
ls
s,
,
e
en
nc
co
od
de
er
r
d
da
at
ta
a
The current camera model sends with 5 Byte data format selected and with protocol version 2 and 3 the number
of 291 pixels per profile. (protocol version 1 and 4 Byte is 283 pixels!). After the profile information with firmware
revision 1.9.11 4 Bytes of encoder data follow at the end of the data block. Up to firmware revision 1.9.10, the
encoder data has been transferred at the beginning of the block. See page 5 for details.
Register 12 sets the version of protocol ( 1 … 3).
R
Re
eg
gi
is
st
te
er
r
0
0x
x1
1B
B:
:
P
Pr
ro
of
fi
il
le
e
p
pe
ea
ak
k
r
re
ec
co
og
gn
ni
it
ti
io
on
n
t
th
hr
re
es
sh
ho
ol
ld
d
This register controls the algorithm responsible fort he profile detection in the FPGA. A change in setting should
be made only, when the result could be verified immediately. When no improvement is achieved, you should
immediately set back default value = 10. The effect of increasing Peak detection threshold may result in more or
less stray pixels on surfaces with noise optical response (creating speckles). Increasing Peak threshold could
remove those effects, depending on the situation on the camera. We recommend to use the option “read
complete image” to evaluate what the camera is picking up, before changing Peak threshold.
S
St
ta
at
tu
us
s
L
LE
ED
D’
’s
s
o
on
n
t
th
he
e
“
“B
Bl
lu
ue
e
B
Bo
ox
x”
”
Status LED’s Meaning Color* OK when
Power Power is ok green On
100 Mbit Ethernet Link is established yellow Blinking
Eth-Link Ethernet Link activity orange On / blinking
System hardware self diagnosis ok green On *
FPGA FPGA self diagnosis ok green Blinking *
* the System- and FPGA-LED’s start blink synchronous, when CPU_Prog Pin is set active!
Note: when a 100 Hz Scanner head and a 50 Hz electronic system (and vice versa) were connected, the
electronic unit will not be able to connect to the Ethernet. The System-LED will blink significantly slower than
normal (<< 1 Hz). The normal blinking rhythm is approx. 2 Hz.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 9 of 39 www.MElsensor.com
P
Po
ow
we
er
r
a
an
nd
d
s
si
ig
gn
na
al
l
c
co
on
nn
ne
ec
ct
to
or
r
D
D-
-S
Su
ub
b-
-2
25
5
p
pi
in
n
----------------------------Sensor-------------------------------------------------------------------------PC----------------------------------
D-Sub 25 RJ45-Ethernet RS-232
Pin Signal Meaning / signal level Func. Pin Func. Pin
1 Gnd Ground
Br. 1 1
2 Sync out Sync out from the Master is connected to Sync-in
of the Slaves.
3 TxD_PROG Send data RS-232 for Firmware-update * TX 2
4 Din 1 Digital input 1 Br. 1 4
5 RIP Reset IP Address →connect to ground = default IP * *
6 Tx- Transmit Data - Ethernet Rx - 6 Br. 1 6
7 Rx- Receive Data - Ethernet Tx - 2 Br. 2 7
8 Case PE ; ground ***
Br. 2 8
14 Gnd Ground, 0 V DC GND 5
15 Sync in Sync in from Master, TTL ... 24 V Logic 0/1 leading edge
triggers ext. Trigger mode must be set in register 0x14 !
16 RxD_PROG Receive data RS-232 for Firmware-update * RX 3
17 CPU_PROG Programming control for Firmware-update
For update connect to + Ub over a 3.000 Ohms resistor*
18 Din 2 Digital input 2
19 Tx+ Transmit Data + Ethernet Rx + 3
20 Rx+ Receive Data + Ethernet Tx + 1
21 + Ub supply +10 ... 30 V DC , approx. 5.3 W
Sync in = ext. Trigger Sync input has internal pull-down resistor.
* using firmware update is on customers risk (no warranty).
** connect RIP-Pin (Pin 5 to ground). Then cycle power. After restart, the Scanner will communicate on the default
IP address. Set new IP address using MEL-Demo-Software Rev.2.0.4.2, Tab 11. Release RIP-Pin from ground.
Cycle power. Now the new IP-address is active. For alternative method see also page 24.
*** ground should be applied in a central place at machine side. Avoid ground loops, connect ground leads in a
“star” structure. Connect protective ground in central place to the machine, connect the case with short leads.
Bridges for simulated RS-232 hardware handshake
Bridge 1: pins 1 – 4 -6 Bridge 2: 7 – 8 Connect Case of D-Sub-9Pin connector to Pin 5 (GND).
G
Gr
ro
ou
un
nd
d
c
co
on
nn
ne
ec
ct
ti
io
on
n;
;
c
co
on
nn
ne
ec
ct
to
or
r
D
D-
-S
Su
ub
b-
-2
25
5
The enclosure of the D-Sub connector is wired with a
short lead to bridge 1-14. The Ethernet cable shield is
connected with a short lead to the bridge 1-14.
Pin 8 is not connected.
connect Pin 1 to Pin 14 as a bridge,
then connect here
o Supply negative ( 0 V)
o Connector enclosure
o Ethernet cable Shield
4 Digital In 1
3 TxD Prog
2 Sync-Out
5 Reset IP
1 GND
8 case
7 Rx-
6 Tx-
Rx+ 20
+Ub 21
Tx+ 19
Digital In 2 18
RxD_Prog 16
CPU_Prog 17
Sync-In 15
GND 14

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 10 of 39 www.MElsensor.com
T
Te
ec
ch
hn
ni
ic
ca
al
l
d
da
at
ta
a
Frame rate 100 Hz, typical value = 103,4 Hz
Frame rate, trigger mode 100 Hz
Frame rate, extern sync mode 75 Hz
Timing drift 100 x 10-6
Min. / Max. ambient operating temperature min. 0°C ( + 32°F) max. 35°C ( + 95°F)
Min. Max. storage temperature min. –30°C ( + 2°F) max. 75°C ( + 167°F)
M
M2
2D
DF
F/
/L
LA
AN
N
L
La
as
se
er
r-
-S
Sc
ca
an
nn
ne
er
r,
,
e
el
le
ec
ct
tr
ro
on
ni
ic
c
s
sy
ys
st
te
em
m
i
in
n
B
Bl
lu
ue
e
B
Bo
ox
x
w
wi
it
th
h
E
Et
th
he
er
rn
ne
et
t
i
in
nt
te
er
rf
fa
ac
ce
e
Power consumption = 220 mA @ 24 V DC
Supply voltage range = + 10 ... 30 V DC
Digital inputs = Low = 0 … 2 V High = 5 V … 30V
dimensions = 102 x 74 x 28 mm
weight of electronic box = 300 g
mounting = D = 6 mm without thread (four metric M5)
connectors at the box = D-Sub 9pin female scanner connector
D-Sub-25pin male Supply, Ethernet, Sync / ext.Trigger
RJ-45 = Ethernet
D
Di
im
me
en
ns
si
io
on
ns
s
o
of
f
t
th
he
e
e
el
le
ec
ct
tr
ro
on
ni
ic
c
b
bo
ox
x
64
7
4
92
102 27,5
4
4,4
8
Please note: M2D Laser Scanner head dimensions were specific to the different models.
Please refer to the M2D catalogue for further information.
The electronic box is the same for all types of Scanner heads.
The exception may be with Scanner heads, which have enough space to integrate the electronic
board inside of the Scanner head enclosure.
Error and technical modification reserved!
O
Ot
th
he
er
r
M
ME
EL
L
L
La
as
se
er
r-
-S
Sc
ca
an
nn
ne
er
r
h
ha
ar
rd
dw
wa
ar
re
e
M2D-i-Control 50 Hz M2D-i-Control 100 Hz
M2D-ISA card 50 Hz M2D-ISA card 100 Hz
M20D-XF-ISA Laser-Scanner, 300 … 1.000 Profiles / sec.
Previous generation of M2D-“Blue-Box Rev.1” electronic systems is EOL.
A limited number of systems is available for repair and retrofit purpose on request.
Please contact MEL for details.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 11 of 39 www.MElsensor.com
C
Co
om
mm
mu
un
ni
ic
ca
at
ti
io
on
n
b
be
et
tw
we
ee
en
n
E
El
le
ec
ct
tr
ro
on
ni
ic
c
u
un
ni
it
t
a
an
nd
d
P
PC
C
A Micro-Controller in the blue-Box communicates with the PC over the Ethernet. The communication is peer-to-
peer. Ethernet switches can be used to communicate over a network. Do not use Hubs! The M2DF-LAN-Scanner
requires 100 Mbit network connection. When you use 10 MBit network equipment, communication could get
stuck.
F
Fu
un
nc
ct
ti
io
on
ns
s
o
of
f
t
th
he
e
M
Mi
ic
cr
ro
o-
-C
Co
on
nt
tr
ro
ol
ll
le
er
r
i
in
n
t
th
he
e
E
El
le
ec
ct
tr
ro
on
ni
ic
c-
-B
Bo
ox
x
o Read profile data from Scanner head
o Send out Scan data over TCP-protocol
o Receive commands for the scanner head over TCP-protocol
o Transfer commands to the scanner head
o Set IP-Address, when requested by PC
P
PC
C-
-H
Ho
os
st
t-
-S
So
of
ft
tw
wa
ar
re
e
f
fu
un
nc
ct
ti
io
on
ns
s
o Receive TCP frame and scan data from the electronic system
o Decode 4 / 5 Byte per Pixel in image data (see „Data-format“.)
o Evaluate scan / image data
o Send commands to the scanner head (Blue-Box).
C
Co
om
mm
mu
un
ni
ic
ca
at
ti
io
on
n
C
Co
om
mp
po
on
ne
en
nt
ts
s
TCP Clients and Server are Software-Components in the software development shell. In the application software,
they are noticeable only as “ports” which are used for data transfer from and to the application. Each Scanner has
its own TCP/IP-Address, according to the SubNet mask. Definitions of TCP/IP-Address and SubNet mask must
be made correctly during the set up procedure of the Ethernet-Scanner. These parameters are mandatory for
proper function of the hard- and software of the TCP/Ethernet protocol. The M2DF-LAN-Scanner stores data
before sending.
The Scanner stores data before sending. The scanner uses the TCP/IP protocol *. Adresses for TCP/IP, subnet
mask, gateway are stored in the Micro-Controller in the scanner electronic system. For set up either the MEL
configuration software or a Web-Browser could be used.
* UDP version is available on request.
S
Se
et
t
u
up
p
o
of
f
t
th
he
e
S
Sc
ca
an
nn
ne
er
rs
s
w
wo
or
rk
ki
in
ng
g
I
IP
P-
-A
Ad
dd
dr
re
es
ss
s
The electronic system in the blue box has a default IP address, which is activated when the Reset iP-pin (a.k.a.
RiP) is set to ground and power off/on-cycle, and a working IP-address which becomes active, when the RiP-pin
is released and power off/on has been cycled. When the scanner is operated at the default address, the MEL
EthernetScanner Software, Tab 11 allows to set a new working IP address, see page … for details.
The default address can not be changed by the user. As a factory preset, the working IP-address is set to
192.168.123.245 and the Subnet mask is set to 255.255.255.0. This preset can be changed upon request before
the delivery is made, with the commercial order. MEL will then make a note in the delivery papers or label the
electronic units accordingly.
S
Se
et
t
t
th
he
e
S
Sc
ca
an
nn
ne
er
r
t
to
o
t
th
he
e
d
de
ef
fa
au
ul
lt
t
I
IP
P
a
ad
dd
dr
re
es
ss
s
To set the default address set the Rip-Pin (Pin 5) to Ground, turn off power and on again. The setup can be made
using MEL-demo software, Rev. 2.4.0 and higher, Tab11. The “working-IP” address set up is stored in the
electronic box permanently after releasing the RIP-Pin from ground and cycling power. The Scanner then reboots
with the new “working IP-Address”.
We strictly recommend: do not use the default IP-address for normal operation!
R
Re
es
so
ol
lv
vi
in
ng
g
I
IP
P-
-A
Ad
dd
dr
re
es
ss
s-
-C
Co
on
nf
fl
li
ic
ct
ts
s
In the configuration-software port addresses of the scanners can be assigned freely with one scanners at a time.
Two scanners or other network devices in the same network never should be set up for the same IP-address.
Applications other than read and write data from the scanners should never use the ports assigned to the
scanners. A unique IP-address must be assigned to each scanner. In the network, two scanners or PCs never
must have the same network address. The device switched on first may work, the other one will create a conflict
and will not work, the network may be disturbed.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 12 of 39 www.MElsensor.com
D
DH
HC
CP
P
DHCP (dynamic host controlled IP numbering) is not supported. When DHCP is working in your network, restrict
DHCP addresses, so that no device can take over an IP address reserved for the scanners. The scanner
electronic does not react on DHCP request nor does it send DHCP request.
P
Pi
in
ng
g
The ping command can be sent from any PC in the network to verify, if the network operates, and if the target is
available for the network (“connected”). The ping command is sent using the “Run” Windows command line
interface from Windows start menu (with Linux use a “console”).
The M2DF-LAN-Scanners reacts on a ping command as every standard Ethernet network device.
Example of network collisions caused by duplicate addesses :
Address Scanner 1: 192.168.123.222;
Address Scanner 2: 192.168.123.223;
Address Scanner 3: 192.168.123.224;
Address Scanner 4: 192.168.123.225;
Address Scanner 5: 192.168.123.226;
Address Scanner 6: 192.168.123.227;
Address Scanner 7: 192.168.123.224; // wrong IP-Address = conflict with scanner # 3!
Address Scanner 8: 192.168.123.229;
Address Network card: 192.168.123.199
The Subnet mask for all Scanners and the network card = 255.255.255.0
Scanners, Gateway and PC need to be in the same network segment. 1
I
IP
P
p
pa
ar
ra
am
me
et
te
er
rs
s
D
De
ef
fa
au
ul
lt
t
V
Va
al
lu
ue
es
s
o MAC-Address 8 Byte 00-08-DC-00-00-00
o Serial number23 Byte = the last 3 Bytes of the MAC-Address
o Scanner-IP 4 Byte 169.254.150.160:3000 = default Address
o Subnet-Mask 4 Byte 255.255.255.0
o Gateway IP 4 Byte 169.254.150.1
o TCP Port 2 Byte, integer last segment in TCP/IP-address (for example 3000)
IP addresses of the gateways usually are at the start of the address range. Therefore numbers below .10 in the
last segment shall be kept free for routers and gateways.
1IP addresses in a network segment differ only in the last three digits!
2Serial-Numbers are set up at the factory; they can not be changed by the user!

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 13 of 39 www.MElsensor.com
M
ME
EL
L
D
De
em
mo
o
S
So
of
ft
tw
wa
ar
re
e
f
fo
or
r
E
Et
th
he
er
rn
ne
et
t-
-S
Sc
ca
an
nn
ne
er
rs
s
After starting the scanner, (switching on power supply), the scanners configuration is loaded from the permanent
internal memory. The configuration screen shows:
o TCP/IP address, port, serial number and MAC address
o Intensity, Shutter parameter, Video gain
o Scanner status, Scanner head temperature
M
Ma
ai
in
n
w
wi
in
nd
do
ow
w
The main window has profile displays on the left side, and 11 functions Tabs on the right side. The profile window
on the left side can be switched from display of one scanner to display of up to four scanners. The red profile is
the counter X, the white profile shows the coordinate Z as a function of x and the yellow curve is the intensity
display.
Tab 4
The most important functions are on Tab 1 and Tab 4 with
the display of networking parameters and scanner head
temperature, Tab 6 with RS 232 and Tab 11.
Tab1 shows the TCP/IP addresses of connected or
disconnected Scanners, port number, window number and
the frequency of the profile update rate. The window number
for display in the single scanner display mode should be set
to 9, profile numbers of the 4-scanners display start at 0.
T
Te
em
mp
pe
er
ra
at
tu
ur
re
e
r
re
ea
ad
do
ou
ut
t
Temperature of scanner head is shown in deg° Celsius in
the configuration tool in Tab4. The temperature value is sent
to register 2. (see “data-format” description, register 0x11 +
Status-Register 2, Byte 12).

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 14 of 39 www.MElsensor.com
Tab 4 displays System parameters:
o Hours counter, On counter
o Temperature of Scanner-head
o Firmware-Version
o
o
MAC-Address, working and default IP-Address.
Tab 6 shows the RS-232, Tab 7... 10 are reserved for diagnose.
Tab 11 provides the controls for setting your individual working IP-
address. When using Tab 11 to set the working IP address, the scanner
must be set to the default address before. An alternative method is
provided with the use of the Web-Browser. Tab 11
U
Us
si
in
ng
g
a
a
t
te
em
mp
po
or
ra
ar
ry
y
I
IP
P-
-A
Ad
dd
dr
re
es
ss
s
To modify a IP address simply double click in the IP field on Tab1 on an inactive IP address and overwrite the
temporary IP address. Press Enter when done and click the checkbox on the left side of Tab1 to connect to the
temp IP address. This temp IP address will be not saved when you close the connection or restart the application.
P
Pi
ix
xe
el
l
R
Re
ea
ad
do
ou
ut
t
L
Li
im
mi
it
t
(
(D
De
em
ma
ar
rc
ca
at
ti
io
on
n
F
Fe
ea
at
tu
ur
re
e)
)
This function sets a limitation to the readout range of the camera. It can be set with the two sliders named
“Pixelauslesen Beginn” and “Pixelauslesen Ende” on Tab 2/3 in the lower right side of the screen.
Setting the limits for the readout range is done by writing to the registers 4 and 5 (see page 14). This feature may
help to cut off reflections or other unwanted effects. Setting these limits, the application software may have less
problems when treating data from said profiles.
Pixel readout limit
(Demarcation)

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 15 of 39 www.MElsensor.com
D
Da
at
ta
a
f
fo
or
rm
ma
at
t
a
an
nd
d
i
in
nt
te
er
rf
fa
ac
ce
e
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
F
Fr
ra
am
me
e
f
fo
or
rm
ma
at
t
f
fo
or
r
T
TC
CP
P-
-S
Sc
ca
an
nn
ne
er
r
p
pr
ro
of
fi
il
le
e
t
tr
ra
an
ns
sm
mi
is
ss
si
io
on
n
Total block size limit =2048 Byte. Packet size can be 1460 and 588, or 2048 Bytes blocks, depending on network and system
load. TCP/IP receive buffer can be set to a defined size. Using standard settings, the a.m. block size is transferred.
S
St
tr
ru
uc
ct
tu
ur
re
e
o
of
f
M
M2
2D
DF
F-
-L
LA
AN
N
H
He
ea
ad
de
er
r
a
an
nd
d
p
pa
ay
yl
lo
oa
ad
d
D
Da
at
ta
a
Address Parameter Type Byte Meaning Default
00...05 mac unsigned char [6] Default MAC-Address 00:08:DC:00:00:00
06...09 reserve unsigned char [4] Reserved
10...13 lga unsigned char [4] Default Gateway 169.254.150.1
14...17 lsm unsigned char [4] Default Subnet Mask 255.255.0.0
18...21 lip unsigned char [4] Default IP-Address 169.254.150.160
22...23 tcp unsigned char [2] Default TCP-Port 3000
24...25 reserve unsigned char [2] Reserved
26...31 mac unsigned char [6] Working MAC-Address 00:08:DC:xx:xx:xx *
32...35 reserve unsigned char [4] Reserved Customer specific
36...39 lga unsigned char [4] Working Gateway Customer specific
40...43 lsm unsigned char [4] Working Subnet Mask Customer specific
44...47 lip unsigned char [4] Working IP-Address Customer specific
48...49 tcp unsigned char [2] Working TCP-Port Customer specific
50...51 reserve unsigned char [2] Reserved
52...59 null_8 unsigned char [8] Synchronization raster 8 Null bytes
60...60 version unsigned char [1] Protocol version number default = 1 range = 1…3 or 10
61...61 status unsigned char [1] Scanner status
62...62 pic_nr unsigned char [1] Image number
63...63 status2 unsigned char [1] Scanner status
64...64 reserve unsigned char [1] Reserved
65...65 reserve unsigned char [1] Reserved
Header
66... scan unsigned char [**] Scan Data and
Encoder Data
Length depends on protocol
version; 4 Bytes Encoder data
…2044 Fill
…2047 FiFO FiFO fill level **
Sync, Status, ScanData, Encoder, FiFO
* Serial number ** depends from protocol version (from scanner head to electronic system)
S
Sy
yn
nc
c
a
an
nd
d
s
st
ta
at
tu
us
s
i
in
nf
fo
or
rm
ma
at
ti
io
on
n,
,
p
po
os
si
it
ti
io
on
n
e
en
nc
co
od
de
er
r
(
(p
pr
ro
ot
to
oc
co
ol
l
r
re
ev
vi
is
si
io
on
n
3
3.
.x
x)
)
Sync + Status Byte-Nr. Value Bit-Nr. Remarks
52 … 59 0 8 Bytes 0x 00h for Synchronization
60 1 0 … 5 Version number
61 Status register 1 0
1… 6
7
0 = non linear 1= linear
content see register 0x11 (17)
always 0
62 Image number continuous, 0 ... 253
63 Status register 2 Content of status register 2 is selected with register 0x11
Values made of more than 1 Byte have Bit 7 always 0.
64; 65 reserved
66 … x Image data Scan Profile data
X+1…x+9 0 8 times 0x00 for synchronisation
Version number 7 …0 Version of data format = 3
Position encoder R1 0 … 6 Position encoder Bit 0 … 6
Position encoder R2 0 … 6 Position encoder Bit 7 … 13
Position encoder R3 0 … 6 Position encoder Bit 14 … 20
Position encoder R4 0 … 5
6
Position encoder Bit 21 … 26
Position encoder direction
Fill bytes
2045 7 … 0
2046 15… 8
Sync, Status, ScanData, Encoder, FiFO
2047
FiFO fill level data
23…16 Max value = 524287

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 16 of 39 www.MElsensor.com
S
St
ta
at
tu
us
s
i
in
nf
fo
or
rm
ma
at
ti
io
on
n
r
re
ea
ad
do
ou
ut
t
u
us
si
in
ng
g
c
co
om
mm
ma
an
nd
d
0
0x
x2
21
1:
:
1. Firmware version up to 1.10.0
when the scanner receives the command 0x21, a special status info-telegram block is sent out. To verify, if you
have got this special info-telegram block, check if a packet is received with version 0x10. The Header defines,
where the version information is located. The version is normally 1, 2 or 3. Version 0x10 marks a status packet.
The Status Packet contains 64 Byte Status, but no scan profile data.
Then the Ethernet-Version sends the Firmware Revision as string, end with 0x00, 0xFF.
2. Firmware Version 1.11.0 and higher
In addition to version 1.10 , at the end of the info-telegram block 31 Byte status register were sent, then 3 Bytes
FiFO-status.
Protocol 0x10 response to command 0x21 does not include scan profile data. Packet size is 2048 Byte.
Byte-Nr. Register Function Length | Type Ending Firmware
00 …51 Header -
52 … 59 Synchronisation 8 x 0x00 -
60 Protocol version -
61 Scanner Status 1 -
62 Image number -
63 Scanner Status 2 -
Header
64 … 65 Reserved -
66 … 97 0 … 31 Status Register 32 Byte -
98 … 129 32 …63 Eprom-Data 32 Byte -
130 … x Firmware-Version * String 0x00
1.10
X +1 …x+32 0 … 30 Functions Register 31 Byte 0xFF
X+33 …x+35 123...125 FiFO status 3 Byte 0xFF
appended Fill bytes 0xFF -
1.11+
* the length of the Firmware string is defined by the ending 0x00, 0xFF. The total length varies with the Firmware
version! The FiFO status (filling level) is given also with every scan profile packet of the length 2048 bytes.
Status registers are the registers marked in yellow on page 15. Status registers can be queried using register
0x11. Function registers are marked in light blue on page 15. These function registers can be read using register
0x21 command.
E
En
nc
co
od
de
er
r
d
da
at
ta
a
Encoder data is available in the profile data transmission protocol version 3. This is different from the special
status info-telegram which is received after sending command 0x21. Details for the info-telegram were given in
the following chapter, the description for the scan data block follows on the next page 18.
The profile information block ends with 8 Bytes 0x00. Then protocol revision number is given as 1 Byte, followed
by the 4 Bytes of encoder data. The end of the transmission block is all 0xFF’s, but the last 3 Bytes contain the
FiFO fill level data. (FiFO = first in first out buffer memory).
Note: the protocol version number is also given in the header, byte 60.
D
Da
at
ta
a
f
fo
or
rm
ma
at
t
f
fo
or
r
r
re
eg
gi
is
st
te
er
r
a
ad
dd
dr
re
es
ss
s,
,
c
co
om
mm
ma
an
nd
d
a
an
nd
d
d
da
at
ta
a
MSB = „0“ = command or register number MSB = „1“ = register content
To change a value first send the register number and then the value. The register number remains set until a new
register number or command is transferred. Register can not be read out except status registers. These can be
read out using the special function register 0x18.
For dual registers, the value is active when writing the higher register.
OrderofBits
Register Data Register Data
Lo-Byte Lo-Byte Hi-byte Hi-byte
76543210 76543210 76543210 76543210
0xxxxxxx 1xxxxxxx 0xxxxxxx 1xxxxxxx

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 17 of 39 www.MElsensor.com
S
Sc
ca
an
nn
ne
er
r
c
co
on
nt
tr
ro
ol
ls
s
Registers
Hex Dec
Bit Function Registers
Marked light blue
Remark
0x0 0 6 … 0 Shutter time low
0x1 1 2 … 0 Shutter time high
Shutter time
0= max. 1022 = min. 1023= Laser off
Manual control
0x2 2 6 … 0 Max shutter time low
0x3 3 2 … 0 Max shutter time high
defines limit for the max. shutter.
0 = max. 1022 = min. (single scanner)
Alternate sync meas. not below 130
Automatic control
0x4 4 6 … 0 Start readout pixels
0x5 5 6 … 0 End readout pixels
Value range = 0 … 127. 1 Bit corresponds to 8 pixels
Condition: begin < end, max. is limited automatic
0x6 6 6 … 0 Video gain low
0x7 7 2 … 0 Video gain high
< 256 = +27dB 1023 = 0dB default = 950 = +2,57 dB
value is set after first sending the high byte value
0x8 8 6 … 0 Intensity threshold 1 … 127 intensity threshold value for internal automatic laser
control; factory default = 15
0x9 9 6 … 0 Laser value 1 … 127 value for the laser control (default = 95)
0xA 10 6 … 0 Peak width limit 0 = 0ff; other = peak width limit, max. = 127 pixels
0xB 11 0 FPGA OK LED 0 = on 1 = off
0xE 14 * Reset position encoder Reset encoder counter
0xF 15 0 Synchronization 0 = simultaneous measmnt. 1 = alternating measmnt.
0x10 16 0 Adjustment scan, image 0 = scan data 1= complete image (see page 19.)
0x11
17
5 … 0
defines content of status
register
marked yellow
0 = sensor temperature
1 = register content
2 = version electronic board
3 = version camera
4 … 8 = hours counter seconds
9 … 11 = On/Off counter
12 = digital inputs 1 +2 + bit for sensors with mirror
13 = Bit 2 … 9 of Laser control
14 = Revision number example: 3.5xxxx
xxxx is the revision number
15 … 31 = NC
32 … 63 = 32 Byte Eprom Data (see below)
0x12 18 2 ... 0 Select scanner protocol version 0 = Version 1 1 = Version 2 2 = Version 3 3 = Version 4
0x13 19 Reset camera chip reset hours counter and camera
0x14
20
0 … 2
3
5 .. 4
Do not use!
Measurement control
Field out definition
Bit 0 … 2 is only for Rev.1 hardware
0 = continuous 1 = single shot triggered
00=both fields | 01=only 1st. field | 10=only 2nd field
0x15 21 0 Laser control 0 = automatic 1 = external (register 0& 1)
0x16 22 0 Linearization 0 = off 1= on default start value = 1
0x17 23 0 … 1 Sampling rate and resolution for
M20D-XF 300 .. 1000 Hz model
0 = 300 Hz; 1 = 500 Hz; 2 = 700 Hz; 3 = 1.000 Hz
0x18 24 Special Function Read out status of control registers and FiFO for ISA hardware
0x1B 27 7…0 Peak detection threshold Default = 10
0x1C 28 * Reset FiFO Erases all values in FiFO
0x1D 29 * Single picture in trigger-mode Register 0x14 (20) must be set before using trigger
0x1E 30 * Reset Sensor set all register values to default
S
Sp
pe
ec
ci
ia
al
l
c
co
om
mm
ma
an
nd
ds
s
f
fo
or
r
t
th
he
e
E
Et
th
he
er
rn
ne
et
t
v
ve
er
rs
si
io
on
n
0x1F 31 * Reset Blue Box Network Communication is restarted
0x20 32 * Watchdog test Watchdog issues reset on Ethernet-Scanner
0x21 33 * Poll Scanner information 32 register + 32 Eprom values set at start-up of the Ethernet
module were sent. Protocol version is set to 0x10 hex.
0x22 34 * new network settings Activate new IP address
0x23 35 0 Ethernet Trigger mode 0 = deactivate 1 = activate
when active, read image with register 0x1D (29)
The content of status register 2 is defined by register 0x11 (17). For all values made by more than one Byte, bit 7 is always 0.
This means only 7 Bit are transferred per Byte.
* Each access to the register triggers the function: just send the register address with no parameter.
Accessing the status register 0x11 selects the contents of the sensors status register. This allows to read out the parameters
of sensor temperature, register content, version of electronic board and camera, hours and on/off counters, digital inputs, laser
control, revision number, 32 byte of Eprom data, see the following pages.

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 18 of 39 www.MElsensor.com
M
M2
2D
DF
F
/
/
L
LA
AN
N-
-D
Da
at
ta
a
F
Fo
or
rm
ma
at
t
M
Me
ea
an
ni
in
ng
g
o
of
f
t
th
he
e
s
st
ta
at
tu
us
s
b
by
yt
te
e
2
2
a
as
s
a
a
f
fu
un
nc
ct
ti
io
on
n
o
of
f
R
Re
eg
gi
is
st
te
er
r
0
0x
x1
11
1
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[0
0]
]
S
Sc
ca
an
nn
ne
er
r
h
he
ea
ad
d
t
te
em
mp
pe
er
ra
at
tu
ur
re
e
Reg. value Temperature Hex Value Binary Value Bit 7 is the sign
+126 °C FE 1111 1110
+ 85 °C D5 1101 0101
+ 25 °C 99 1001 1001
+ 0 °C 80 1000 0000
- 1 °C 01 0000 0001
- 25° C 19 0001 1001
0
- 55 °C 37 0011 0111
In steps of 1 degree from – 55°C … + 126°C
Bit 7 is the sign.
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[1
1]
]:
:
r
re
eg
gi
is
st
te
er
r
c
co
on
nt
te
en
nt
ts
s
Reg. value Bit Nr. Meaning
0 0 = not linear, 1 = linear
1 0 = register contents as after reset, 1 = after write to register
2 0 = Scan data, 1 = complete image
3 Laser: 0 = 0n 1 = off
4 Measurement control: 0 = continuous 1 = single shot triggered
5 Laser control: 0 = automatic 1 = external (Register 0 & 1)
6 reserved
1
7 always 0
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[2
2,
,3
3]
]
:
:
v
ve
er
rs
si
io
on
n
n
nu
um
mb
be
er
r
o
of
f
c
ca
am
me
er
ra
a
a
an
nd
d
e
el
le
ec
ct
tr
ro
on
ni
ic
c
s
sy
ys
st
te
em
m
Reg. value Bit Nr. Firmware Version
2 7 … 0 Version of electronic unit
3 7 … 0 Version of camera
Note: Used data area: 0…4095 (see Eprom data register, pos. 48-51)
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[4
4,
,5
5,
,6
6,
,7
7,
,8
8]
]:
:
h
ho
ou
ur
rs
s
c
co
ou
un
nt
te
er
r
(
(b
bi
it
t
7
7
a
al
lw
wa
ay
ys
s
0
0)
)
c
co
ou
un
nt
t
e
ev
ve
er
ry
y
2
25
50
0
m
ms
se
ec
c
Reg. value Bit Nr. Hours counter Bit 7 always 0; 250 msec per count
4 6 … 0 Hours counter bit 6 … 0
5 6 … 0 Hours counter bit 13 … 7
6 6 … 0 Hours counter bit 20 … 14
7 6 … 0 Hours counter bit 21 … 27
8 6 … 0 Hours counter bit 28 … 34
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[9
9,
,1
10
0,
,1
11
1]
]:
:
o
on
n
c
co
ou
un
nt
te
er
r
(
(b
bi
it
t
7
7
a
al
lw
wa
ay
ys
s
0
0)
)
m
ma
ax
x.
.
c
co
ou
un
nt
t
=
=
1
13
31
10
07
72
2
Reg. value Bit Nr. On/OFF counter Bit 7 always 0; max. counter value = 131072
9 6 … 0 On/Off counter bit 6 … 0
10 6 … 0 On/Off counter bit 13 … 7
11 6 … 0 On/Off counter bit 16 … 14
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[1
12
2]
]:
:
d
di
ig
gi
it
ta
al
l
i
in
np
pu
ut
ts
s
Reg. Nr. Bit Nr. Digital inputs
12 0 Input 1
1 Input 2
2 Bit for sensor with mirror
7 … 3 always 0

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 19 of 39 www.MElsensor.com
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[1
13
3]
]:
:
L
La
as
se
er
r
C
Co
on
nt
tr
ro
ol
l
Reg. Nr. Bit Nr. Laser Control
13 9 … 2 Laser control in automatic mode: Bits 0 …1 of the Laser control were not
available for read out. Bits 2 … 9 were available for read out and can be set as a
“fixed” value in the “manual” or external control mode.
Procedure:
1. set scanner to automatic control mode
2. direct the scanner onto a surface of interest
3. read out laser control Bit 2…9
4. set laser to “external (manual)” control mode
5. write back Bit 0 .. 1 as “0” and Bit 2...9 of the previously read out value
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[1
14
4]
]:
:
R
Re
ev
vi
is
si
io
on
n
n
nu
um
mb
be
er
r
Reg. Nr. Bit Nr. Revision number
14
7 … 0
The revision number of the firmware is made by the Status-Registers 2 and 14.
Register 14 represents the third digit of the revision number is given as a natural
number (integer).
Example : Revision = 3.5.2
Status register 2 = 35 // version x 10 = 3.5; Integer
Status register 14 = 2 // natural number = 1, 2, 3 … Integer
R
Re
eg
gi
is
st
te
er
r
v
va
al
lu
ue
e
[
[1
15
5
…
…
3
31
1]
]:
:
n
no
ot
t
u
us
se
ed
d
Reg. Nr. Bit Nr.
15
7 … 0
always 0

M2D-Laser-Scanner with Ethernet-Interface Manual
HB-M2D-Ethernet-E Page 20 of 39 www.MElsensor.com
3
32
2
B
By
yt
te
e
E
Ep
pr
ro
om
m
d
da
at
ta
a
The registers 32 … 63 are part of the status register block selected by the register 0x11 ( see the section marked
green on page 14). Bit 7 is always 0
Register
value
Bit Nr. Meaning
32 6 … 0 LB Number of camera pixels horizontal
33 6 … 0 HB Number of camera pixels horizontal
742 **
34 6 … 0 LB Number of camera pixels vertical
35 6 … 0 HB Number of camera pixels vertical
291 **
36 6 … 0
37 6 … 0
38 6 … 0
39 6 … 0
Serial number see page 33 and below on this page
40 6 … 0 LB
41 6 … 0 HB
Begin of range *
42 6 … 0 LB
43 6 … 0 HB
Range *
44 6 … 0 LB
45 6 … 0 HB
Scan range at range begin *
46 6 … 0 LB
47 6 … 0 HB
Scan range at range end *
48 6 … 0 LB
49 6 … 0 HB
Max. measurement range Z linearized
50 6 … 0 LB
51 6 … 0 HB
Max. scan range X linearized
52 6 … 0 LB
53 6 … 0 HB
Min measurement range Z not linearized
54 6 … 0 LB
55 6 … 0 HB
Min scan range X not linearized
56 6 … 0 LB
57 6 … 0 HB
Max measurement range Z not linearized
58 6 … 0 LB
59 6 … 0 HB
Max scan range X not linearized
60 0
1
2
3
4 … 6
0 = field mode 1 = full frame mode
0 = normal 1 = image mirrored
0 = normal 1 = camera rotated by 90°
0 = dimensions in 0.1 mm 1 = dimensions in 1 mm increments *
reserved
61 6 … 0 Not used
62 6 … 0 Not used
63 6 … 0 EProm data version = 1
* dimensions in 0.1 mm or 1 mm ** current camera hardware
6 ... 013 ..720..1427..21
Bit-Number LBLMBHMBHB
Serial-Number representation
MSB (Bit 7) are not used (all 0).
R
Re
eg
gi
is
st
te
er
r
0
0x
x1
18
8
The special register 0x18 puts the scanner in the operation without FiFO. This mode is only useful for ISA
hardware. Register 0x18 shall not be used by the application software, instead use command 0x21.
P
Pr
ro
ot
to
oc
co
ol
l
V
Ve
er
rs
si
io
on
n
1
1
Data format of protocol version 1defines intensity Byte Bit 7 to high, when intensity value is zero.
** camera hardware and changes in FPGA software could result in different values in these registers.
Table of contents
Other MEL Scanner manuals
Popular Scanner manuals by other brands

LMI Technologies
LMI Technologies Gocator 1300 quick start guide

Jireh
Jireh Circ-it user manual

Epson
Epson 1680 - Expression Special Edition Product information

Serialio
Serialio Scanfob 4000n quick start guide

Fujitsu
Fujitsu FI 6140 - Document Scanner Getting started

Toshiba
Toshiba Aquilion TSX-101A/I Series Site Planning Manual