3/09/2013

SICK LMS511 sensor data acquisition interface (source code, C++/MFC)

This is data acquisition source code of LMS511(SICK co.)



Source code is made by MFC(vs 2008).
The sensor is communicated by TCP/IP.
You can set sensor ip and test running by  sopas program.
The sopas program is included in the manual CD.

the source code

This movie is running test video.






LMS511 communication sample code (tcp/ip)

reference here
http://study.marearts.com/2013/03/sick-lms511-sensor-data-acquisition.html

Source code is here(github)
https://github.com/MareArts/LMS511-SICK-Laser-sensor-communication-tcp-ip

youtube
https://www.youtube.com/watch?v=2LTpaDGus1Y


Thank you.

30 comments:

  1. Anonymous10/9/13 18:33

    센서대신 터미널프로그램으로 테스트해 보고 싶은데요..센서에서 캡처한 raw data 파일을 올려주시면 감사하겠습니다.

    ReplyDelete
  2. Sorry, now I don't have sensor.
    So I cannot acquisition the raw data.
    But 2~3 weeks later, I will study sick + camera fusion theme, then I will upload several raw datas.
    Thank you.

    ReplyDelete
  3. Anonymous3/11/13 01:08

    안녕하세요?
    소스 중
    float theta = (i*0.5-5) / 180 * 3.1415; 에서
    왜 0.5를 곱했고 또한 -5 를 했는지 구체적으로 설명해 주시면 감사하겠습니다.

    ReplyDelete
  4. I have a problem during running your code I have an error
    "Debug Assertion Failed!

    Program: ..... .exe
    File:...vsprintf.c
    Line:244
    Expresion:("Buffer too small",0)

    PLease Help me to fix this thing
    thank You

    ReplyDelete
    Replies
    1. Anonymous20/9/14 10:33

      In MySyncSocket.cpp file there is a function called OnReceive(int). Inside this function you will find this code.

      OneDIST="";
      int sI=0;
      while( szBuffer[Di] != 0x20)
      {
      OneDIST.Format("%s%c", OneDIST, szBuffer[Di++]);
      }
      Di++;
      The local variable Di gets incrimented way beyond the szBuffer size while inside the while loop. That is what is causing the program to crush.

      There is a little documentation here and I don't know what the while loop is doing, but in order to get the program working for me I did this.

      OneDIST="";
      int sI=0;
      while( szBuffer[Di] != 0x20)
      {
      OneDIST.Format("%s%c", OneDIST, szBuffer[Di++]);
      }

      if(Di > 2048)//2048 is the szBuffer size
      Di = 2047;
      Di++;

      This worked for me and I hope it works for you too. For me I still need to know what the while loop is doing. Any ideas?

      Delete
  5. Sorry, I can't run this program. So much time have passed.
    But in my prediction, character or communication buffer size may be smaller then your set size.
    So, expand buffer size.
    Thank you.

    ReplyDelete
    Replies
    1. I can't get the code from the link.Could you send the code to my gmail? My gmail account is tranquocbao2608@gmail.com
      thank

      Delete
  6. Do you still used LMS511? if it worked with different platform can you share with me what kind of software that you used to communicate this sensor
    Thank You

    ReplyDelete
  7. I can't get the code from the link.Could you send the code to my gmail? My gmail account is LuckyZxy@gmail.com

    ReplyDelete
    Replies
    1. I have sent the source code.
      Please check your email box.
      Thank you.

      Delete
    2. Thanks for your reply. But I made a mismake.My gmail account is luckyzxy182@gmail.com not LuckyZxy@gmail.com.Could you send me the source code again? Thanks again and wish you all the best.

      Delete
    3. OK
      Check again.
      Thank you.

      Delete
  8. This comment has been removed by the author.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Could you send the code to me?
      My gmail account is timtsai0620@gmail.com

      Delete
    2. Sorry, I'm late because too much work...
      Check your email.
      Thank you.

      Delete
  10. Hi,
    Could you send the code to me?
    My email: yes__31@hotmail.com
    Thanks !

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  11. hi
    could you send to code to me?
    My email: lhs8145@daum.net
    please..

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  12. Anonymous25/2/16 02:33

    can u send me the code to itsmithya@gmail.com. i Bought the product i didn't received any CD with it.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  13. Anonymous23/3/16 02:10

    Hi,
    I'm trying to use Sick Laser LMS511 and i want to use your code. But i do not succeed to download it from the link, please send me on my email sama9972@gmail.com.
    Many thanks,

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  14. hi sir. Your sample is so good. I try to dowload your sample code, but i can't get the link. So could you mind share the samplecode to my email vodinhhuy@gmail.com. Thanks in advance!

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  15. hi,
    Could you send the code to me?
    My email: k2h1003@gmail.com
    Thanks

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  16. TCP/IP 기반 소스가 필요한데 받아볼수 있을까요

    ReplyDelete
    Replies
    1. sorry I wrote wrong url.
      Check again the giuhub url in this post.
      Thank you.

      Delete