Shop OBEX P1 Docs P2 Docs Learn Events
Modbus RTU slave - Page 2 — Parallax Forums

Modbus RTU slave

2»

Comments

  • evanhevanh Posts: 16,533

    @Rayman said:
    Guess had a 50/50 shot at getting byte order correct and of course was wrong...

    Yeah, Modbus is something of a dog's breakfast when it comes to consistency. When reading the docs it's apparent it had distinctly different authors between the original and later extensions. It shows the likely ages it was written. Before the PC became dominant Big Endian was seen as the right way but after, then Little Endian gets preferential treatment.

  • evanhevanh Posts: 16,533
    edited 2025-06-24 08:58

    Eg: There is a 32-bit extension for register sizes.

  • JonnyMacJonnyMac Posts: 9,340
    edited 2025-06-24 19:36

    Ray: I noticed that you're using jm_fullduplexserial in your code. Are you going through an RS-485 converter? If yes, are you using a 4-wire connection? I don't see any mechanism in your code to enable the transmit of a '485 chip.

  • RaymanRayman Posts: 15,316
    edited 2025-06-24 20:08

    Just using regular serial via FTDI USB chip, nothing special.

    Although in future will probably be Modbus TCP. Although maybe a serial connection to something nearby might be useful, who knows...

Sign In or Register to comment.