PHPackages                             hanguosoft/modbus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hanguosoft/modbus

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hanguosoft/modbus
=================

PHP与modbus通讯

18PHP

Since Aug 7Pushed 6y agoCompare

[ Source](https://github.com/HanGuoSoftwere/modbus)[ Packagist](https://packagist.org/packages/hanguosoft/modbus)[ RSS](/packages/hanguosoft-modbus/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

```

将vendor/hanguosoft/modbus/config目录下的modbus.php 文件复制到项目config目录下并配置好
 * FC 1: read coils                         readCoils($unitId = 0 ,$reference = 12288 ,$quantity = 12) 读取线圈
 * FC 2: read input discretes               readInputDiscretes($unitId = 0 ,$reference = 12288 ,$quantity = 2)   读取输入分立器件
 * FC 3: read multiple registers            readMultipleRegisters($unitId = 0 ,$reference = 10000 ,$quantity = 6)   读取多个寄存器
 * FC 4: read multiple input registers      readMultipleInputRegisters($unitId = 0 ,$reference = 0 ,$quantity = 2)  读取多个输入寄存器
 * FC 5: write single coil                  writeSingleCoil($unitId = 0 ,$reference = 0 ,$data = array(TRUE))       写入单个线圈
 * FC 6: write single register              writeSingleRegister($unitId = 0,$reference = 10000,$data = array(-1000) ,$dataTypes =array("REAL"))  读取单个寄存器
 * FC 15: write multiple coils              writeMultipleCoils($unitId = 0,$reference = 12288,$data)  写入多个线圈
 * FC 16: write multiple registers          writeMultipleRegister($unitId = 0,$reference = 12288,$data , $dataTypes)   写入 多个寄存器
 * FC 23: read write registers              readWriteRegisters($unitId = 0,$referenceRead = 12288,$quantity,$referenceWrite,$data , $dataTypes)   读写 寄存器

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f8ebe12faa56de3db1193b8af0bf30b81c4a6e35198b4a2ccfceb42a2995870?d=identicon)[hanguosoft](/maintainers/hanguosoft)

### Embed Badge

![Health badge](/badges/hanguosoft-modbus/health.svg)

```
[![Health](https://phpackages.com/badges/hanguosoft-modbus/health.svg)](https://phpackages.com/packages/hanguosoft-modbus)
```

###  Alternatives

[misterbk/mix

Helper plugin for Laravel Mix in Craft CMS templates

51172.4k4](/packages/misterbk-mix)[irfa/raja-ongkir

"Laravel Raja Ongkir Package"

131.3k](/packages/irfa-raja-ongkir)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
