Scroll to navigation

mb2hal(1) LinuxCNC Documentation mb2hal(1)

NAME

mb2hal - HAL userspace component for Modbus

SYNOPSIS

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

DESCRIPTION

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.

PINS

fnct_01_read_coils:

fnct_02_read_discrete_inputs:

fnct_03_read_holding_registers:

fnct_04_read_input_registers:

fnct_05_write_single_coil:


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

fnct_06_write_single_register:

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).

fnct_15_write_multiple_coils:

fnct_16_write_multiple_registers:

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

Each transaction

Error counter

m = HAL_TX_NAME or transaction number if not set, n = element number (NELEMENTS)
Example:
mb2hal.00.01.<type> (transaction=00, second register=01 (00 is the first one))
mb2hal.TxName.01.<type> (HAL_TX_NAME=TxName, second register=01 (00 is the first one))

AUTHOR

Victor Rocco

LICENSE

GPL

November 20, 2021 Modbus to HAL