Skip to content

An application that displays Modbus registers in a similar way to printf.

License

Notifications You must be signed in to change notification settings

tdolata/mbprint

Repository files navigation

mbprint

An application that displays Modbus registers in a similar way to printf.

mbprint [opt] "pattern string"
Options:
-i [serial|ip] serial device or ip address
-p [tcp port] tcp port
-b [baud] baud rate
-d [modbus id] modbus slave address
-h help

Pattern string:
{[:fmt:]:[a-f][:index:]} <=> {[display format]:[byte order][index]]

Display format:
like printf function
is a special switch %b used to display a binary format
Byte order in modbus frame (A - most significant byte):
a - ABCD
b - BADC
c - CDAB
d - DCBA
e - AB
f - BA
Index:
modbus register index count from 0

Example:
mbprint -d1 -i/dev/ttyS0 -b115200 "Some hex value {%08x:a16} and float {%f:a100}"

About

An application that displays Modbus registers in a similar way to printf.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published