background image

M2i-LAN Laser-Scanner manual 

 

HB-M2-iLAN-UDP-E.doc 

page 16 of 44 

MEL Mikroelektronik GmbH, Breslauer Str. 2, 85386 Eching / Germany 

www.MELSensor.de 

 

0

0

x

x

2

2

1

1

:

:

 

 

i

i

n

n

f

f

o

o

 

 

t

t

e

e

l

l

e

e

g

g

r

r

a

a

m

m

:

:

 

 

s

s

c

c

a

a

n

n

n

n

e

e

r

r

 

 

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

 

 

The command 0x21 reads out the status information in 

one

 complete packet from the scanner. When you 

have sent the command 0x21 to the scanner and watch out for a packet with the protocol version 0x10. This 
protocol revision number is in the byte 60 of the header. When you found 0x10 in Byte 60, you have 
identified the info telegram packet. Protocol version 0x11 is the message that something with profile scan 
data status is wrong. 

 

At the end of the packet, additionally 31 bytes of function register status is sent, then the FiFO fill status 
information. The table on the next page shows the details. 
When the command 0x21 is received by the scanner, a packet with 2048 Bytes is sent from the scanner to 
the PC. The packet contains all information of the registers 0 … 63, but no scan profile data. From Byte 130 
on, the firmware version is sent as a string. The end of the string is 0x00. 

I

I

n

n

f

f

o

o

 

 

T

T

e

e

l

l

e

e

g

g

r

r

a

a

m

m

 

 

(

(

t

t

h

h

e

e

 

 

s

s

c

c

a

a

n

n

n

n

e

e

r

r

s

s

 

 

a

a

n

n

s

s

w

w

e

e

r

r

 

 

t

t

o

o

 

 

t

t

h

h

e

e

 

 

c

c

o

o

m

m

m

m

a

a

n

n

d

d

 

 

0

0

x

x

2

2

1

1

)

)

 

 

 

 

Byte 
Nr. 

Register 
Nr. 

Function 

Length|type 

Ending 

Firmware 

 

 

 

 

 

 

 

 

00 ... 51 

Header 

52          Byte 

 

52 … 59 

Synchronization 

8 x 0x00 

 

60 … 60 

Protocol version 

  1          Byte 

 

61 … 61 

Scanner Status 1 

  1          Byte 

 

62 … 62 

Image  number 

  1          Byte 

 

63 … 63 

Scanner Status 2 

  1          Byte 

 

Hea

der 

64 … 65 

 

Reserve 

  2          Byte 

 

 

66 … 97 

0 ... 31 

Status-Register 

32          Byte 

 

98 … 129 

32 ...63 

Eprom Data 

32          Byte 

 

130 … x  

Firmware-Version 

  *           String 

0x00, 0xFF 

 

X+1 ... x+32 

0 ... 30 

Functions-Register 

31          Byte 

0xFF 

...1.10.0    

 

X+33 ... x+35 

123...125 

FiFO fill status 

  3          Byte 

0xFF 

 

 

         ... 2047 

 

Fill bytes 

 0xFF 

 

 

    

    

   

   

    1.

11.0+

 ... 

 

* the length of the firmware string is defined by the ending 0x00. the length of the firmware string varies with 
each version! Between the register data and the FiFO-Bytes 0xFF may appear! The position of the FiFO-
Bytes is after the function registers. Always a block of 2048 Bytes is sent, at the end of the block “old” data 
(trash) may exist. 

 

command: 0x21, read out register-dump –Scanners action upon 0x21: 

 

o

  64 EEPROM Registers are read out        

o

  the protocol version is set to 0x10 

o

  the sync raster is written 8-Null Bytes 

o

  from Byte 130 of the data section the firmware-Version number is sent 

o

  no Scan-Data were transferred  

 
 

Data format of the Packet valid from 

Firmware Version 1.11.0 and higher. 

D

D

a

a

t

t

a

a

 

 

f

f

o

o

r

r

m

m

a

a

t

t

:

:

 

 

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

e

e

s

s

,

,

 

 

C

C

o

o

m

m

m

m

a

a

n

n

d

d

s

s

 

 

o

o

r

r

 

 

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 active, unless a different register number is sent. 

 

 

Tipp:

  

double registers were made active only when the higher register is transferred.

 

 

Order 

of 

bits 

       

Register Data 

 Register Data 

   

Lo-Byte  

Lo-Byte  

Hi-byte   

Hi-byte 

76543210 76543210 76543210 76543210 
0xxxxxxx 1xxxxxxx 

 

0xxxxxxx 1xxxxxxx  

 

 

Tipp:

  

if not otherwise stated:  for registers Bit 7 is not used and always 0.  

for data, Bit 7 is always high.

 

Содержание M2-iLAN Series

Страница 1: ...ROELEKTRONIK GMBH Intelligente Sensoren Mess Systeme M2 iLAN Laser Scanner M2D Laser Scanner with integrated Ethernet Interface TCP UDP User Manual MEL Mikroelektronik GmbH Breslauer Str 2 D 85386 Ech...

Страница 2: ...ating modes 13 External Trigger Hardware Trigger 13 Synchronization 13 Ethernet Trigger 13 Digital inputs 13 UDP transmission mode 14 How to set UDP transmission mode 14 Data format and interface desc...

Страница 3: ...rdware Revision 4 0 with M12 connectors FPGA Firmware Revision 4 6 Controller Firmware Revision 2 0 59 This manual describes the installation of the scanner hardware and the use of MEL demo and calibr...

Страница 4: ...on software Connections E Et th he er rn ne et t H Ha ar rd dw wa ar re e Standard Ethernet components never have shown problems in the data transmission of the Ethernet scanners Network connection Rx...

Страница 5: ...of the network cards like setting of the MTU Maximum Transfer Unit and accordingly load in the network causes that the 2048 Bytes will not be transferred in one packet but segmented into two packets...

Страница 6: ...d IEEE 802 3af S St ta at tu us s L LE ED D s s Status LED s Meaning color OK when Power Power OK Green LED is lit Eth Link Ethernet Link in Function Yellow Blinking 100 Mbit Ethernet Link Activity Or...

Страница 7: ...9 Connector M12 4pin D coded 90 angle screw on clamps Eth Con D W M12 i 550 018 10 Connecting cable M12 male 4 pin RJ 45 1 m Eth Cbl M M12 RJ45 i 550 026 11 Connecting cable M12 female 8 pin at angle...

Страница 8: ...head M12 8 Pin male supply and controls Synchronization and external Trigger M12 4 Pin female Ethernet D coded RJ 45 Ethernet internal for service Protection class IP 65 Vibration the electronic unit...

Страница 9: ...ner communicates with the outer world using port address IP address and a valid subnet mask A Gateway is ignored the scanner opens a peer to peer connection Therefore the set up of these communication...

Страница 10: ...ss Scanner 9 192 168 124 228 different network segment Address Network card 192 168 123 199 The subnet mask for all Scanners and the network card 255 255 255 0 Do not get mixed a subnet mask 255 255 0...

Страница 11: ...r screen or four small screens simultaneously The colors of the profiles can be adjusted by defining RGB values in the settings ini file Function groups are selected with the Tabs 1 16 The important T...

Страница 12: ...on register 0x11 status register 2 Byte 12 page 15 and following pages P Pi ix xe el la au us sl le es se en n L Li im mi it t o of f s sc ca an nn ne er rs s v vi ie ew wi in ng g a ar re ea a The fu...

Страница 13: ...ig gg ge er r H Ha ar rd dw wa ar re e T Tr ri ig gg ge er r At Pin 6 Sync in the leading edge of the trigger pulse makes the trigger event The signal should not oscillate The Sync input is an optic...

Страница 14: ...er the values Scanner IP the working TCP IP left UDP destination IP enter here the target IP and port where the UDP packets shall be sent TCP port can be 3000 or any other port number UDP port can be...

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

Страница 16: ...mage number 1 Byte 63 63 Scanner Status 2 1 Byte Header 64 65 Reserve 2 Byte 66 97 0 31 Status Register 32 Byte 98 129 32 63 Eprom Data 32 Byte 130 x Firmware Version String 0x00 0xFF X 1 x 32 0 30 Fu...

Страница 17: ...number example 3 5xxxx xxxx is the version number NC 32 Byte Eprom Data see below 0x12 18 2 0 Set protocol version 0 Version1 1 Version2 2 Version3 3 Version 4 0x13 19 Reset camera chip Image counter...

Страница 18: ...egisters Except Registers which act as impulse switch like Reset Sensor unused Registers and Bits give back a 0 31 7 0 Status Register Status messages are selected with Register 17 123 7 0 FIFO number...

Страница 19: ...lu ue e 2 2 3 3 V Ve er rs si io on n n nu um mb be er r e el le ec ct tr ro on ni ic c s sy ys st te em m a an nd d c ca am me er ra a Reg value Bit Nr Meaning 2 7 0 Version electronic system example...

Страница 20: ...ecial value we recommend the following procedure 1 set the Scanner in automatic mode on the target surface 2 read out Bit 2 9 from status register 3 set Scanner in manual controlled external mode 4 wr...

Страница 21: ...ange not linear 56 57 6 0 LB 6 0 HB Maximum value for Measurement range not linear 58 59 6 0 LB 6 0 HB Maximum value for Scan range not linear 60 0 1 2 3 6 4 0 Half frame camera 1 full frame camera 0...

Страница 22: ...serIntensity Lo Byte X 0x7F 0x80 this sends the value 101 For switching off two Bytes are ok 24h 80h Tipp for activating of the function the command must be sent in complete length 24h 81h 80h 87h D4h...

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

Страница 24: ...1C 02 00 04 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 05 22 02 08 77 18 00 12 04 58 04 2C 02 10 03 7F 1F 7F 1F 00 00 04 00 3C 17 47 04 02 7F 7F 01 Version v 2 0 55 090306 TCP UDP 15...

Страница 25: ...ocation using the Web Browser H Ho ow w t to o s se et t t th he e I IP P a ad dd dr re es ss s o ov ve er r t th he e W We eb b In your Web Browser enter the IP address of the Scanner The screenshot...

Страница 26: ...ote PC connected over Ethernet to the Scanner o RIP mode not set o Programming mode not set please note the default IP address can not be changed Factory setting for the working IP address on delivery...

Страница 27: ...e screenshot below as an example The files in the screenshot below are the files you may need for the update procedure Flashm16 exe executable updater M2d_eth_2 0 55 firmware binary Start bat batch fi...

Страница 28: ...figuration software Ethernet Scanner 2009 Release date 26 Jan 2009 and have a valid Firmware file for the version of scanner hardware in use The prog switch must be set as described in the chapter bef...

Страница 29: ...and PC are in the same network subnet Check Gateway IP PC and Scanner must be in the same logical network segment Connection to PC works yet several seconds of delay in the scan profile Connection or...

Страница 30: ...s not possible to read the registers Dual registers the value is active only when the high byte has been transferred Bit order register data register data Lo Byte Lo Byte Hi byte Hi byte 76543210 7654...

Страница 31: ...ctronic box These 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 us...

Страница 32: ...t cnt while cnt inp inf 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 v...

Страница 33: ...syncCnt 0 tryCnt 0 while 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 end...

Страница 34: ...n 1 v1 ByteFromM2 inf 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...

Страница 35: ...avoid trigger mode return 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...

Страница 36: ...w opt1 if res 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 MwDStatusI...

Страница 37: ...data scan uiBufferUARTTx 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...

Страница 38: ...a different shutter value full frame switching mode Example of a sequence B1 shutter value 1 B2 shutter value 2 Between both shutter values for EACH field is switched 24h 81h 80h 87h D4h 80h E5h B1 9...

Страница 39: ...the two functions closesocket and WSACleanup at the end E Ex xa am mp pl 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 siz...

Страница 40: ...disrupted make sure to establish new connection bRunRead FALSE bRunConnect FALSE closesocket sTCP else here are the received data the total number of received data is in dwReceived finally free up the...

Страница 41: ...t tr ra an ns sm mi is ss si io on n p pr ro ot to oc co ol l chTemp 0 0x22 command chTemp 1 0x55 command chTemp 2 0xAA command chTemp 3 0x55 command chTemp 4 0xAA command chTemp 5 0x55 command chTem...

Страница 42: ...Buffer DWORD dwBuffer This function checks the protocol version and unpacks the data accordingly void CUDPScannerDlg ScannerViewScan unsigned char ucBuffer DWORD dwBuffer DWORD dwStatus DWORD dwModus...

Страница 43: ...sticker stating the maximum laser power and laser safety class The scanner has a optic system dispersing the laser energy the line projector distributes the laser energy to an angle of 20 or 30 This...

Страница 44: ...l other laser parameters and controls are the same These products will be equipped with a special label defining the wavelength E En nv vi ir ro on nm me en nt t S Su un nl li ig gh ht t When installi...

Отзывы: