DOKK / manpages / debian 12 / linuxcnc-uspace / mb2hal.1.en
mb2hal(1) LinuxCNC Documentation mb2hal(1)

mb2hal - HAL userspace component for Modbus

loadusr -W mb2hal config=config_file.ini
loadusr -Wn mymodule mb2hal config=config_file.ini

MB2HAL is a generic userspace HAL component to communicate with one or more Modbus devices. It supoorts Modbus RTU and Modbus TCP.

See http://linuxcnc.org/docs/html/drivers/mb2hal.html for more information.


NELEMENTS needs to be 1 or PIN_NAMES must contain just one name.

NELEMENTS needs to be 1 or PIN_NAMES must contain just one name. Both pin values are added and limited to 65535 (UINT16_MAX). Use one and let the other open (read as 0).

Both pin values are added and limited to 65535 (UINT16_MAX). Use one and let the other open (read as 0).

Error counter

m = HAL_TX_NAME or transaction number if not set, n = element number (NELEMENTS)
Example:
mb2hal.00.01.int (TRANSACTION_00, second register)
mb2hal.readStatus.01.bit (HAL_TX_NAME=readStatus, first bit)

Victor Rocco

GPL

November 20, 2021 Modbus to HAL