summaryrefslogtreecommitdiff
path: root/src/hal/user_comps/mb2hal/examples/mb2hal_example_01_arduino.ini
blob: 7bc294dd46e745ad82d412a090fdb1cdd63c2eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
# 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 succesful, 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