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.



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.

37 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
  17. hello, I also searching LMS511 library. but that link is wrong. Please let me receive your code. My mail address is hyun6160@daum.net. Thanks

    ReplyDelete
    Replies
    1. Source code is moved to github repository.
      please refer to github url on contents.
      And your donate is will be helpful to maintain my blog.
      Thank you.

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

    ReplyDelete
  19. Anonymous13/2/18 04:00

    hello im trying to read the vlp 16 channel on labview any idea on how to proceed?? any help would be appreciated

    ReplyDelete
  20. Hi can you send me the code to my email

    ReplyDelete
  21. OneDISTλž‘ szBufferκ°€ λ¬΄μŠ¨κ°’μ„ κ°–κ²Œ λ˜λŠ”μ§€ μ•Œ 수 μžˆμ„κΉŒμš”?

    ReplyDelete
  22. i want to use Serial to receive lms511’s data(continuous),but every time data is not same , do you have any idea process those data

    ReplyDelete