Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dotbus is a lightweight and efficient Modbus/TCP library for C#. Designed with a focus on minimal memory allocation.

License

Notifications You must be signed in to change notification settings

bonk-dev/dotbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

41 Commits

Repository files navigation

.bus

dotbus is a lightweight and efficient Modbus/TCP library for C#. Designed with a focus on minimal memory allocation.

Usage

var client = new TcpClient()
{
 NoDelay = true
};
// Connect the TcpClient
await client.ConnectAsync("192.168.0.10", 502);
var stream = client.GetStream();
// Create the ModbusTcpClient (slave id: 0x01)
await using var mClient = new ModbusTcpClient(stream, 0x01);
// Allocate buffer for coils
var coils = new Memory<bool>(new bool[2000]);
// Read coils
await mClient.ReadCoilsAsync(coils, 0, Requests.MaxCoilAmount);

See full usage in the dotbus.cli project.

About

dotbus is a lightweight and efficient Modbus/TCP library for C#. Designed with a focus on minimal memory allocation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /