#
# mb2hal_example_01_arduino.ini
# m2hal example file to connect to an Arduino board using Modbus.
# Tested 2012-10-12 with Arduino Mega 2560 R3. Modbusino librarie and
# and mb2hal_example_01_arduino.inoi sketch.
#
# Copyright © 2011-2012 Victor Rocco <victor _ rocco AT hotmail DOC com>


#Load the modbus HAL userspace module as the example below
#loadusr -W mb2hal config=mb2hal_example_01_arduino.ini

[MB2HAL_INIT]

INIT_DEBUG=3
HAL_MODULE_NAME=mb2hal
SLOWDOWN=0.0
TOTAL_TRANSACTIONS=2

[TRANSACTION_00]
LINK_TYPE=serial
SERIAL_PORT=/dev/ttyACM0
SERIAL_BAUD=115200
SERIAL_BITS=8
SERIAL_PARITY=none
SERIAL_STOP=1
SERIAL_DELAY_MS=10
MB_SLAVE_ID=1
MB_TX_CODE=fnct_03_read_holding_registers
FIRST_ELEMENT=0
NELEMENTS=5
HAL_TX_NAME=RegIn
MAX_UPDATE_RATE=0.0
#MB_RESPONSE_TIMEOUT_MS is a high number, because Arduino fails to respond fast
#to the 1st request. If the first request is TIMED OUT, all next requests will
#be TIMED OUT again. I don't know if it is a Arduino or Modbusino problem.
#If the 1st request is successful, tipical next responses are in the 10 to 30 ms order.
MB_RESPONSE_TIMEOUT_MS=1200
MB_BYTE_TIMEOUT_MS=100
DEBUG=1

[TRANSACTION_01]
MB_TX_CODE=fnct_16_write_multiple_registers
FIRST_ELEMENT=5
NELEMENTS=5
HAL_TX_NAME=RegOut
MAX_UPDATE_RATE=0.0
DEBUG=1
