Results 1 to 11 of 11

Thread: Modbus and the PIC

  1. #1
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0

    Modbus and the PIC

    Rather than reinvent the wheel I am looking for a jumping off point to implement Modbus RTU in a Pic as a slave.
    Anyone done this or know of a source of example code?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  2. #2
    Registered
    Join Date
    Jan 2006
    Location
    Serbia
    Posts
    59
    Downloads
    0
    Uploads
    0
    IMHO you will have to reinvent the wheel. Everybody talking about it, but nobody to explain it. I am looking for basic explanation too, but without success. Is it some kind of secret!? Everybody puts the link The Modbus Organization
    and say that is easy to understand. To me, it is not.
    I wish you luck to find explanation, or try to write your own protocol, its easiest way and you will know exactly what you done :-)
    Good luck!


  3. #3
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0
    Working on it!
    I am very surprised by the lack of Pic/Modbus oriented projects out there?
    I found a few Pic related for I2c, SPI and MicroWire, Nothing on Modbus.
    The robot guys seem to be using I2c.
    I have an idea of the packet requirement, just have to work on the details.
    Thanks.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  4. #4
    Registered
    Join Date
    Jan 2006
    Location
    Serbia
    Posts
    59
    Downloads
    0
    Uploads
    0
    Maybe this could help
    USB Modbus Interface - Field of Cows


  • #5
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0
    Thanks, I had seen that, it is just that the designer converts to descrete I/O and analogue control, I may be able to modify the code.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #6
    Registered
    Join Date
    Oct 2005
    Location
    Australia
    Posts
    2,388
    Downloads
    0
    Uploads
    0
    Did you check Microchip.com? I would be surprised if they did not have an appnote on it.


  • #7
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by RomanLini View Post
    Did you check Microchip.com? I would be surprised if they did not have an appnote on it.
    That was my first seek? .
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #8
    Registered
    Join Date
    Oct 2005
    Location
    Australia
    Posts
    2,388
    Downloads
    0
    Uploads
    0
    Sorry Al, I just assumed they had one as it's a pretty standard comms protocol.

    Microchip have a good user forum, maybe if you ask there one of the official guys or one of the PIC users might be able to suggest a solution for you. sometimes it can be a bit slow getting help there but the quality of the help can be good.


  • #9
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0
    I am part of the way there adapting one of the PICMicro UART examples (AN774), it is a bit simplified in my case as I am only designing for master to one slave, RS422 and not multi-slave RS485.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #10
    Registered James Newton's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    858
    Downloads
    0
    Uploads
    0
    A quick search of the archive at www.piclist.com finds

    http://web.archive.org/web/201010300.../microchip.htm

    Which may be of help.
    James hosts the single best wiki page about steppers for CNC hobbyists on the net:
    http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)


  • #11
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,965
    Downloads
    0
    Uploads
    0
    Thanks, I think I have something figured out.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • Similar Threads

    1. Modbus to run GS-2 drive?
      By mecheng10 in forum Mach Mill
      Replies: 14
      Last Post: 06-17-2012, 02:01 PM
    2. USB Modbus I/O Using PIC
      By rdhopkins in forum PIC Programing / Design
      Replies: 7
      Last Post: 05-02-2012, 08:23 PM
    3. Need Help!- MODBUS control of VFD
      By ninefinger in forum LinuxCNC (formerly EMC2)
      Replies: 21
      Last Post: 05-09-2011, 09:19 PM
    4. EMC2/Modbus......HELP!
      By pauldkeeton in forum LinuxCNC (formerly EMC2)
      Replies: 5
      Last Post: 02-18-2007, 05:47 PM
    5. modbus device
      By Drew in forum Machines running Mach Software
      Replies: 14
      Last Post: 02-11-2007, 02:59 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.