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: (“
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