AdvancedHMI Software
General Category => Support Questions => Topic started by: kallileo on February 28, 2021, 06:35:36 AM
-
I use Modbus RTU driver to connect to a Modbus slave.
The addressing scheme of the slave is 0 based so in order to read HR 400050 I have to put the address 400051 in basic label.
Is it possible to setup the AHMI driver to be 0 based as well?
The method modbusRTUCom1.CloseConnection() can be used to close the connection.
How can I reopen it?
-
The 0 base is the register offset. The 1 base is the Modicon style addressing. This follows the majority of the industry standard.
To re-open a connection, simply perform another read or write.
-
I trying to give the user the option to select the Com port through a ComboBox, as well as BaudRate and Modbus slave address.
As far as I understand if I drag n drop the Modbus driver into the form then the connection will be started automatically when the Form loads.
What if I want to start the connection manually after selecting the port, baudrate and slave address for example on button click and also be able to disconnect change comms settings and then connected again.
Do I need to read and write registers connected to BasicLabels manually?
Is there any example project that could help understanding how AdvancedHMI works?
-
You can set the DisableSubscriptions to True in design view, then set it to false using code behind a button.
You can find some sample projects here:
https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/