background image

M2D-Laser-Scanner with Ethernet-Interface 

Manual 

 

 

HB-M2D-Ethernet-E 

Page 6 of 39 

www.MElsensor.com

E

E

t

t

h

h

e

e

r

r

n

n

e

e

t

t

 

 

c

c

o

o

n

n

n

n

e

e

c

c

t

t

o

o

r

r

s

s

 

 

 

 

R

R

J

J

-

-

4

4

5

5

 

 

Pin  Signal  connector A  connector B 

“normal” 

Pin  Connector B 

“crossed” 

Signal 

 

 

 

 

 

 

 

1 TX 

Green +White 

Green +White 

Red  + White 

Rx + 

2 Tx 

Green  

Green 2 

Rot 

Rx  - 

3 Rx 

Red   + White 

Red + White 

Green +White 

Tx + 

4  nc - 

Blue 

Blue 4 

Blue 

nc - 

5  nc + 

Blue  + White 

Blue  + White 

Blue  + White 

nc + 

6 Rx 

Red 

Red 6 

Green 

Tx  - 

7  nc + 

Brown+ White 

Brown+ White 

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

M

u

u

l

l

t

t

i

i

-

-

S

S

c

c

a

a

n

n

n

n

e

e

r

r

 

 

A

A

r

r

r

r

a

a

y

y

s

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

H

o

o

w

w

 

 

m

m

a

a

n

n

y

y

 

 

s

s

c

c

a

a

n

n

n

n

e

e

r

r

s

s

 

 

c

c

o

o

u

u

l

l

d

d

 

 

b

b

e

e

 

 

i

i

n

n

t

t

e

e

g

g

r

r

a

a

t

t

e

e

d

d

 

 

i

i

n

n

 

 

o

o

n

n

e

e

 

 

n

n

e

e

t

t

w

w

o

o

r

r

k

k

 

 

s

s

e

e

g

g

m

m

e

e

n

n

t

t

?

?

 

 

The Scanner sends out 100 scan profiles per second with the following data: 

 

TCP-IP header 

M2DF-L-header, Scan profile data, reserved Bytes 

Additional information as encoder data, fill Bytes, FiFO-fill level data 

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

C

o

o

n

n

t

t

r

r

o

o

l

l

 

 

C

C

o

o

m

m

m

m

a

a

n

n

d

d

s

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/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...

Отзывы: