#TEST 04: TCP all supported Modbus functions.
#  - TCP = MoD_RsSim V8.20 (www.plcsimulator.org) on Windows XP SP3.

[MB2HAL_INIT]
INIT_DEBUG=3
SLOWDOWN=0.0
TOTAL_TRANSACTIONS=5

[TRANSACTION_00]
#Manually change values in Mod_RsSim and see result here
LINK_TYPE=tcp
TCP_IP=192.168.2.10
TCP_PORT=502
MB_SLAVE_ID=0
MB_TX_CODE=fnct_02_read_discrete_inputs
FIRST_ELEMENT=1
NELEMENTS=8
HAL_TX_NAME=rd_di
MAX_UPDATE_RATE=0.0
DEBUG=1

[TRANSACTION_01]
#Set values in TRANSACTION_04and read the result here
#Also manually change values in Mod_RsSim and see result here
MB_TX_CODE=fnct_03_read_holding_registers
FIRST_ELEMENT=0
NELEMENTS=8
HAL_TX_NAME=rd_hold_reg
MAX_UPDATE_RATE=0.0
DEBUG=1

[TRANSACTION_02]
#Manually change values in Mod_RsSim and see result here
MB_TX_CODE=fnct_04_read_input_registers
FIRST_ELEMENT=1
NELEMENTS=8
HAL_TX_NAME=rd_in_reg
MAX_UPDATE_RATE=0.0
DEBUG=1

[TRANSACTION_03]
#Manually change values in halrun, example: setp mb2hal.wr_mult_coils.02 1
#and see the result in ModRsSim
MB_TX_CODE=fnct_15_write_multiple_coils
FIRST_ELEMENT=1
NELEMENTS=8
HAL_TX_NAME=wr_mult_coils
MAX_UPDATE_RATE=0.0
DEBUG=1

[TRANSACTION_04]
#Ina halrun manually do: setp mb2hal.wr_mult_reg.02 2
#then with "show" check: mb2hal.rd_in_reg.01.int = 2
MB_TX_CODE=fnct_16_write_multiple_registers
FIRST_ELEMENT=0
NELEMENTS=8
HAL_TX_NAME=wr_mult_reg
MAX_UPDATE_RATE=0.0
DEBUG=1
