Shop OBEX P1 Docs P2 Docs Learn Events
Modbus with Propeller — Parallax Forums

Modbus with Propeller

babinda01babinda01 Posts: 54
edited 2007-01-10 17:44 in Propeller 1
Hi·,
I have a little project on the go which requires a prop chip to talk to a PLC and a PC via·modbus.· I was wondering if anyone has·written any modbus objects for the Prop.

Regards
Andrew

Comments

  • asterickasterick Posts: 158
    edited 2007-01-10 03:39
    Dear god modbus, how I hate you.
    Are you wanting to do ASCII / RTU (I'm assuming you're using serial)

    You should be able to just use a basic serial module (which there are plenty of) to talk with, whipping something up in SPIN shouldn't be a huge deal.

    And are you wanting it in slave or master mode?
  • Bill HenningBill Henning Posts: 6,445
    edited 2007-01-10 08:01
    Modbus RTU is pretty easy to implement; I've done it a few times in the past. All you really need to implement is the 4xxxx registers; then you can use ladder logic function blocks in the PLC to read/write to them (if you are emulating a PLC); or conversely, you can just read/write 4xxx registers (if you are emulating an HMI) and have the PLC take care of mapping it to coils etc. with just a few rungs of ladder logic.

    By only implementing enough for 4xxxx registers, the driver becomes really short and easy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com - a new blog about microcontrollers
  • Bill HenningBill Henning Posts: 6,445
    edited 2007-01-10 08:06
    Allan-Bradley Data Highway is WAY worse than Modbus to implement...

    And CDC Type 1 RTU protocol is worse than DH.

    Unpleasant memories.
    asterick said...
    Dear god modbus, how I hate you.
    Are you wanting to do ASCII / RTU (I'm assuming you're using serial)

    You should be able to just use a basic serial module (which there are plenty of) to talk with, whipping something up in SPIN shouldn't be a huge deal.

    And are you wanting it in slave or master mode?
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com - a new blog about microcontrollers
  • babinda01babinda01 Posts: 54
    edited 2007-01-10 09:08
    Hi Guys thanks for the replys.

    Yes I know the word MODBUS is as close to a swear word as you can get, but unfortunatly this is what the PC & PLC side of the unit needs to communicate back and forwards, so the poor old Prop chip needs to be able to do the same.

    The PLC (ladder logic programming) side of things is no worries for me to do, I have done it many a time.· The PC software is written by another person and so cannot be changed by me.

    Asterick, Yes I will be using the serial port and I am wanting the Prop chip to be used as slave mode.



    Regards

    Andrew
  • asterickasterick Posts: 158
    edited 2007-01-10 17:44
    Bill Henning said...
    Allan-Bradley Data Highway is WAY worse than Modbus to implement...

    And CDC Type 1 RTU protocol is worse than DH.

    Unpleasant memories.

    Well it's good to know other people are in the PLC world. I just wish symax wasn't all but dead. As far as protocols go, it's so much more elegant than the other stuff I've been forced to work with.
Sign In or Register to comment.