background image

M2D-Laser-Scanner with Ethernet-Interface 

Manual 

 

 

HB-M2D-Ethernet-E 

Page 16 of 39 

www.MElsensor.com

S

S

t

t

a

a

t

t

u

u

s

s

 

 

i

i

n

n

f

f

o

o

r

r

m

m

a

a

t

t

i

i

o

o

n

n

 

 

r

r

e

e

a

a

d

d

o

o

u

u

t

t

 

 

u

u

s

s

i

i

n

n

g

g

 

 

c

c

o

o

m

m

m

m

a

a

n

n

d

d

 

 

0

0

x

x

2

2

1

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 

 

Hea

der 

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

E

n

n

c

c

o

o

d

d

e

e

r

r

 

 

d

d

a

a

t

t

a

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

D

a

a

t

t

a

a

 

 

f

f

o

o

r

r

m

m

a

a

t

t

 

 

f

f

o

o

r

r

 

 

r

r

e

e

g

g

i

i

s

s

t

t

e

e

r

r

 

 

a

a

d

d

d

d

r

r

e

e

s

s

s

s

,

,

 

 

c

c

o

o

m

m

m

m

a

a

n

n

d

d

 

 

a

a

n

n

d

d

 

 

d

d

a

a

t

t

a

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.  

 

Order of Bits 

 

 

 

 

 

 

 

 

 

Register 

Data    

Register  

Data 

 

 

 

Lo-Byte  

Lo-Byte  

Hi-byte  

Hi-byte 

76543210 76543210 76543210 76543210 

0xxxxxxx 

1xxxxxxx   0xxxxxxx   1xxxxxxx 

 

 
 

 

Содержание M2D/LAN

Страница 1: ...ner with Ethernet Interface Manual Version 3 6 4 a MEL Mikroelektronik GmbH Breslauer Str 2 D 85386 Eching Tel 49 89 327 150 0 Fax 49 89 319 20 23 www MELsensor de october 2007 Copyright MEL 2004 2006...

Страница 2: ...ub 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...

Страница 3: ...ses 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...

Страница 4: ...n 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 cont...

Страница 5: ...ctor 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...

Страница 6: ...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...

Страница 7: ...s 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...

Страница 8: ...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 h...

Страница 9: ...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 def...

Страница 10: ...ors 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...

Страница 11: ...ther 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 d...

Страница 12: ...r 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 Add...

Страница 13: ...splay 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...

Страница 14: ...ield 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 addre...

Страница 15: ...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...

Страница 16: ...are 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 q...

Страница 17: ...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 t...

Страница 18: ...ways 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...

Страница 19: ...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...

Страница 20: ...asurement 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...

Страница 21: ...I7 I6 I5 I4 I3 I2 I1 Distance Z 0 2048 Scan range X 0 1024 Intensity I 0 127 The value of the Bytes is never bigger than 254 FEh Byte value 255 FFh is invalid and appears when the FiFo is empty Proto...

Страница 22: ...segment marked in grey colour Type the password MELSENSOR all capital letters without and hit ENTER or press the lower left button Send and wait for the second prompt from the Scanner stating that th...

Страница 23: ...D Auswertung 36 2 017 Working Data 018 MAC 00 08 DC 2B 10 6F 019 IP 192 168 123 224 3000 020 SubNetz 255 255 255 0 021 GateWay 192 168 123 1 022 023 TCP Connecting 024 0x0A 025 On the RS 232 interface...

Страница 24: ...eed for the update procedure o Flashm16 exe executable updater o M2d_eth_1 10 6 firmware binary o Start_1 10 6 bat batch file startBackup is an optional report generator Before you rewrite the firmwar...

Страница 25: ...wer up of scanner Check if the IP is free Power down the scanner to see if another device has taken the IP Try M2D iVision exe Ping the IP Cmd ping xxx xxx xxx xxx When the scanner is down no other de...

Страница 26: ...76543210 76543210 76543210 0xxxxxxx 1xxxxxxx 0xxxxxxx 1xxxxxxx Software Examples 1 Switch on Off FPGA LED Lo Byte Hi Byte 0x0B 0x80 LED on 0x0B 0x81 LED off 0x0B register address decimal 11 0x80 comm...

Страница 27: ...values are stored until next reset command 0x1F Reset Ethernet in memory 4 examples of accessing registers functions and data These examples have been taken from the M2Dmini c For use as a complete pa...

Страница 28: ...f ioPort 2 M2DWrite write to M2D Register anz 0 registerNr command e g 0x1C reset FIFO value not used 1 write value to registerNr 2 write value to registerNR registerNr 1 shift value to fit low high r...

Страница 29: ...le 1 val ByteFromM2 inf if val 1 return 1 timeout if val 0 synCnt else if synCnt 8 ifdef M2D_DEBUG if synCnt 8 ifdef __RT__ printk n d n synCnt else printf n d n synCnt endif endif sync info 4 byte in...

Страница 30: ...if v1 1 return 1 v2 ByteFromM2 inf if v2 1 return 1 v3 ByteFromM2 inf if v3 1 return 1 x i v0 v1 0x60 2 v3 0x07 9 z i v2 v1 0x1F 7 v3 v3 0xF8 intensity i v3 128 v3 127 1 v3 127 1 else not linear for i...

Страница 31: ...urn 0 ok 1 fail inf sync 3 status int M2DStatus M2DInfo inf int num int i res result int res M2DStatus sens 3 result 1 M2DWrite inf 0x11 num 1 select status register M2DWrite inf 0x1C 0 0 clear FIFO f...

Страница 32: ...0 break if hw opt1 8 0 hw amb 10 f hw mb 10 f hw sbAmb 10 f hw abEmb 10 f res MwDStatusInt inf 48 2 hw maxZ if res 0 break res MwDStatusInt inf 50 2 hw maxX if res 0 break res MwDStatusInt inf 2 1 hw...

Страница 33: ...ferUARTTx 2 scanner 0x07 uiBufferUARTTx 3 Scanner_data scan uiBufferUARTTx 0xFF uiBufferUARTTx scanner 31 0x80 scanner 17 Temperatur abfragen For y 0 y 31 y scanner y 0x80 Scanner_data scan y scanner...

Страница 34: ...ubnet mask 3rd octet 23 0 Subnet mask 4th octet 24 192 IP address 1st octet 25 168 IP address 2nd octet 26 123 IP address 3rd octet 27 224 IP address 4th octet 28 PORT LOWORD 0xB8 29 PORT HIWORD 0x0B...

Страница 35: ...gEEPROMData 37 0x7F 7 ulTemp unsigned long ucRegEEPROMData 38 0x7F 14 ulTemp unsigned long ucRegEEPROMData 39 0x7F 21 P Po or rt ts s Ports are a part of the IP address definition When setting the wor...

Страница 36: ...le e C C u us si in ng g W Wi in nS So oc ck k a an nd d S Sc ca an nn ne er r f fu un nc ct ti io on ns s receiving block size should be modulo 2 048 the Scanner sends blocks in size of 2 048 Bytes d...

Страница 37: ...he recv function it is nessesary to have an existing connection to the scanner this means to have a valid socket create Data Buffer this Data Buffer has already a command to set the Scanner in Single...

Страница 38: ...atoi 3000 0x00FF chTemp 30 atoi 3000 0xFF00 8 Note the UDP transmission protocol has been implemented in a new project of the MEL EthernetScanner demo software Typical TCP functions have been dropped...

Страница 39: ...s Seitenzahlen ge ndert 2007 3 6 2 2 Register 6 7 Default Wert 950 12 3 2007 3 6 2 2 nderungsliste im Handbuch hinzugef gt 12 3 2007 3 6 2 2 Erdungskonzept Seite 10 hinzugef gt 12 5 2007 3 6 3 Firmwar...

Отзывы: