MEL M2D/LAN Manual

MEL M2D/LAN Manual

With ethernet interface
Table of Contents

Advertisement

Quick Links

M2D / LAN
M2D Laser Scanner
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
Manual Revision 3.6.3

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the M2D/LAN and is the answer not in the manual?

Questions and answers

Summary of Contents for MEL M2D/LAN

  • Page 1 M2D Laser Scanner 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 Manual Revision 3.6.3...
  • Page 2: Table Of Contents

    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 ......................
  • Page 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.
  • Page 4: System Description

    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.
  • Page 5: Cabling Requirements

    M2D-Laser-Scanner with Ethernet-Interface Manual 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.
  • Page 6: Ethernet Connectors Rj-45

    M2D-Laser-Scanner with Ethernet-Interface Manual Pin Signal connector A connector B Connector B Signal “normal” “crossed” TX + Green +White Green +White Red + White Rx + Tx - Green Green Rx - Rx + Red + White Red + White Green +White Tx + nc -...
  • Page 7: External-Trigger / Hardware-Trigger

    M2D-Laser-Scanner with Ethernet-Interface Manual simultaneous Sync alternating Sync simultaneous Trigger alternating Trigger 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.
  • Page 8: Calculation Of Shutter Time

    M2D-Laser-Scanner with Ethernet-Interface Manual 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.
  • Page 9: Power And Signal Connector D-Sub-25 Pin

    ** 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.
  • Page 10: Technical Data

    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. HB-M2D-Ethernet-E Page 10 of 39 www.MElsensor.com...
  • Page 11: Communication Between Electronic Unit And Pc

    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.
  • Page 12: Dhcp

    M2D-Laser-Scanner with Ethernet-Interface Manual 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. 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”).
  • Page 13: Mel Demo Software For Ethernet-Scanners

    M2D-Laser-Scanner with Ethernet-Interface Manual After starting the scanner, (switching on power supply), the scanners configuration is loaded from the permanent internal memory. The configuration screen shows: TCP/IP address, port, serial number and MAC address Intensity, Shutter parameter, Video gain Scanner status, Scanner head temperature The main window has profile displays on the left side, and 11 functions Tabs on the right side.
  • Page 14: Using A Temporary Ip-Address

    M2D-Laser-Scanner with Ethernet-Interface Manual Tab 4 displays System parameters: Hours counter, On counter Temperature of Scanner-head Firmware-Version 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.
  • Page 15: Data Format And Interface Description

    M2D-Laser-Scanner with Ethernet-Interface Manual 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. Address Parameter Type...
  • Page 16: Status Information Readout Using Command 0X21

    M2D-Laser-Scanner with Ethernet-Interface Manual 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.
  • Page 17: Scanner Controls

    M2D-Laser-Scanner with Ethernet-Interface Manual Registers Function Registers Remark Marked light blue 6 … 0 Shutter time low Shutter time Manual control 0= max. 1022 = min. 1023= Laser off 2 … 0 Shutter time high 6 … 0 Max shutter time low defines limit for the max.
  • Page 18: M2Df / Lan-Data Format

    M2D-Laser-Scanner with Ethernet-Interface Manual value Temperature Hex Value Binary Value Bit 7 is the sign Reg. +126 °C 1111 1110 In steps of 1 degree from – 55°C … + 126°C + 85 °C 1101 0101 Bit 7 is the sign. + 25 °C 1001 1001 0 °C...
  • Page 19: Register Value [13]: Laser Control

    M2D-Laser-Scanner with Ethernet-Interface Manual Reg. Nr. Bit Nr. Laser Control 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”...
  • Page 20: Byte Eprom Data

    M2D-Laser-Scanner with Ethernet-Interface Manual 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 Bit Nr. Meaning value 6 …...
  • Page 21: M2Df/Lan-Structure Of Image Data

    M2D-Laser-Scanner with Ethernet-Interface Manual Protocol Version 1, linearized Each measurement results in 283 points each 4 Bytes with coordinates X, Z and the intensity. X and Z are resolved at 12 Bit, Intensity I is resolved at 4 Bit. In software version 2, 3 and 4 as many pixels were given as indicated in the registers 34 and 35 of Eprom data.
  • Page 22: Integrated Web-Server

    M2D-Laser-Scanner with Ethernet-Interface Manual Firmware Revision 1.10.6 and higher offers a built-in Web-Server. Over the Internet-Explorer or any other Web- Browser, you may access your Scanner. Current firmware release is 1.13.3. IP address, MAC-address default settings, Firmware Version, serial numbers. The IP-address can be changed the from a remote location using the Web-Browser.
  • Page 23: Rs-232 Monitoring

    M2D-Laser-Scanner with Ethernet-Interface Manual The Web-Server provides a profile snapshot, when you click on the link Scan-Profile-View. 000: On the RS-232 interface the scanner sends status information. 001:M2-EthernetScanner v.1.13.3 Data format: 8N1 (8 bit, no parity, 1 Stop bit, 115.200 Baud). WebServer 070509 Requirements: 002:WebServer: 1...
  • Page 24: Flashing Firmware

    With the download of the binary data file* you accept this condition. * MEL makes repair for units broken while trying to update in the factory at Eching. Customer must cover shipping cost both ways and a handling fee. For details please contact MEL services: info@MELsensor.com...
  • Page 25: Trouble Shooting

    M2D-Laser-Scanner with Ethernet-Interface Manual Step Action Remarks Connect the Scanner Power = off CPU_Prog = off Connect RS-232 to Com-1 Baudrate of PC Com-1 = 115.200 Power up the Scanner Normal operation Scanner head must be connected to the electronic system Connect the CPU_Prog-Pin System- and FPGA –LED’s blink synchronous! over a 3.kΩ...
  • Page 26: Example Code For Software Engineers

    Disclaimer: MEL does not make warranty for correct function and completeness of the example code nor does MEL assume that code fragments are bug free. The use of the example code is at customers risk and with the sole responsibility of the customer’s software engineers. MEL can not take any responsibility, that the code provided is free from third party rights, pending software patents or bug free.
  • Page 27: Command: 0X21 (Dump)

    These examples have been taken from the M2Dmini.c. For use as a complete package, download M2Dmini.c and header file M2Dmini.h from the MEL FTP-Server. Please consider updates and bug fixes, when you have earlier versions of M2Dmini. [version = as of 2006-08-10] Headlines in blue! Disclaimer: the given source code examples were taken from a collection of modules used with ISA hardware.
  • Page 28 M2D-Laser-Scanner with Ethernet-Interface Manual // read one byte from sensor // try until some data found, return -1 if operation times out (error) int ByteFromM2(M2Dinfo *inf) int val, emptyCnt=0; emptyCnt++; if(emptyCnt == 32767){ return -1; val=ByteFromM2FF(inf); } while(val == 0xFF); return val;...
  • Page 29 M2D-Laser-Scanner with Ethernet-Interface Manual // M2DSync // return: 0 = ok, sync found >0 = ok, sync after retval bytes found // -1 = timeout -2 = no sync // inf->sync // sync [0] data format version sync [1] status1 // sync [2] running number sync [3] status2 int M2DSync (M2DInfo *inf)
  • Page 30 M2D-Laser-Scanner with Ethernet-Interface Manual // M2DReadFrame, use only after M2DSync suceeded // read count points (4 or 5 bytes) of // scan data and put values to x, z, and intensity // return 0 = OK, -1 = timeout, -3 = data format not known int M2DReadFrame(M2Dinfo *inf, int count, int *x, int *z, int *intensity) int i,v0,v1,v2,v3,v4;...
  • Page 31 M2D-Laser-Scanner with Ethernet-Interface Manual // DataToInt // helper function to make integer from sensor status // dat: array with status info // cnt: array size // return: calculated number long DatToInt(int *dat,int cnt) int i; long res; res=0; for(i=0;i<cnt;i++){ res = res | ((long)dat[i] << i*7); return res;...
  • Page 32: Example: // Read Out Fifo Status And Sensor Temperature

    M2D-Laser-Scanner with Ethernet-Interface Manual // M2DHardwareInfo // get some information about sensor hardware // fills out the M2DHWInfo struct int M2DHardwareInfo (M2DInfo *inf, M2DHWInfo *hw) int i, res; long tmp; res = M2DStatusInt (inf,32,2,&hw->ccdh); if(res<0) break; res = M2DStatusInt (inf,34,2,&hw->ccdh); if(res<0) break; res = M2DStatusInt (inf,36,4,&hw->ccdh);...
  • Page 33 M2D-Laser-Scanner with Ethernet-Interface Manual *scanner = y |0x80 ; Scanner_data.scan [uiBufferUARTTx] = *scanner ; If (y==17) ucRegister17Temp = *scanner ; uiBufferUARTTx++ ; Scanner_data.scan[uiBufferUARTTx] = 0xFF uiBufferUARTTx++ ; *scanner = 126 |0x80 ; *scanner = 123 |0x80 ; Scanner_data.scan[uiBufferUARTTx + 0] = *scanner; *scanner = 124 |0x80 ;...
  • Page 34: Setting The Ip-Address By Software

    When the Reset-IP-Pin is released from ground, new working IP address will be set valid. Please note: Set the working IP address with the MEL demo and configuration software Rev. 2.4.0.2 or higher. Use Tab 11 for set up of the working-IP address, alternatively use the Web-Browser (with firmware 1.10.6 or higher).
  • Page 35: Ports

    Ports are a part of the IP-address definition. When setting the working IP address, the port is defined accordingly. As a factory default setting at MEL, we always use port : 3000. You can use “any” port, you should consider, that some services use ports: Internet (http) = port : 80.
  • Page 36: Ethernet Winsock Implementation

    M2D-Laser-Scanner with Ethernet-Interface Manual To communicate with a M2D Ethernet–Scanner so called Windows Socket „WinSock“-functions are used. These functions are part of all windows operating systems. Other operating systems provide similar functions. „WinSock”-functions are encapsulated into a „ws2_32.dll“-file. These files belong to Windows. The communication uses a TCP/IP-protocol with M2D Scanner working as a server.
  • Page 37: Udp Implementation

    M2D-Laser-Scanner with Ethernet-Interface Manual while(bRunConnect) // establish connection if (connect(sTCP, (SOCKADDR*) &serv_addr, sizeof(SOCKADDR)) == INVALID_SOCKET) // when it is not possible to establish a connection… else // connection established: get data … bRunRead = TRUE; while(bRunRead) dwReceived = recv(sTCP, chBuffer, TCPBUFSIZE, NULL); if ((dwReceived == 0) || (dwReceived == INVALID_SOCKET)) // probably the connection has been disrupted, make sure,...
  • Page 38: Ip-Programming For Udp-Transmission Protocol

    = 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 as for example TCPClientThread (global)and EthTCPClientXReceivedData (global).
  • Page 39: Changes And Additions

    M2D-Laser-Scanner with Ethernet-Interface Manual Date Revision Change 2006 Beschreibung CPU Prog Pin hinzugefügt 2006 Beschreibung RIP Pin hinzugefügt 2006 Protokoll-Versionen: Protokoll-Version 3 hinzu 2006 Bilder erneuert: Anschluss Ethernet-Switch etc. 2006 RS-232 Prompt, neue Version abgebildet 2006 Tab 11: Beschreibung hinzugefügt 2006 Flashen der Firmware: Beschreibung hinzugefügt 2006...

Table of Contents