ModBus 基础
ModBus 基础

ModBus 基础

TONYLABS 16 Jul, 2019
Share:

ModBus 基础

Coils 和 Registers

Coils 和 Registers 只是对寄存器地址的2种称呼,可以理解为预先定义号的变量名字。如果还是不能理解的话,亦可以理解为 Tom 和 Jerry,后面我们再细说 Tom 和 Jerry 的故事。

ModBus 协议中,共有 4 个类型的寄存器地址:

Discrete Inputs(只读 boolean)

Coils(可读写 boolean)

Input Registers (只读 int)

Holding Registers(可读写 int)

ModBus 协议定义了一套由 boolean 和 integer 这两种数据类型构成的大数组,注意这里是 1 套,而不是 2 套,也不是主站、从站各一套,只有一套,至于用到多少个 Coils 和多少个 Registers,没有严格规定,你需要多少用多少。

如何理解主和从

主站(Master)

 

Like what you're reading? Subscribe to our top stories.

We will continue to update Front; if you have any questions or suggestions, please contact us!

Follow us on Medium, Twitter, Facebook, YouTube, and Dribbble.

Image Description
Written by

Hanna Wolfe

I create advanced website builders made exclusively for web developers.

3 Comments

  • Image Description
    Dave Austin 1 day ago

    As a Special Education teacher this resonates so well with me. Fighting with gen ed teachers to flatten for the students with learning disabilities. It also confirms some things for me in my writing.

    Reply
    • Image Description
      Hanna Wolfe 1 day ago

      Love it Dave! We're all about keeping it up.

      Reply
  • Image Description
    Christina Kray 2 days ago

    Since our attention spans seem to be shrinking by the day — keeping it simple is more important than ever.

    Reply

Post a comment

Stay in the know

Get special offers on the latest developments from Front.