http://www.3s-software.com/index.shtml?en_modbus_lib&sitesearchmatch=modbus#sitesearchmatch it says, that there's no modbus serial master library at all. Why is it then possible to add a modbus master com port device? Is there something like a demo modbus library that I could test?
You don't need a library to access the slaves.
You only need to add them to your Master (Modbus_COM => Modbus_Master => Modbus_Slave(s)).
In the Slave configuration you can specify the slave address and Modbus Registers you want to read/write.
PS, for the slaves, automatically implicit variables are created.
E.g. Modbus_Slave_COM_Port.xError (Modbus_Slave_COM_Port is the name of the slave in the Device Tree).
Automatically a library will be added, but this is hidden and you don't need it to get communication.
Thank you a lot!
Could you please tell me if there's any way to check in the programm the status of the communication with a modbus slave?
<modbusslavedevicename>.xError to see is there is a communication error.
<modbusslavedevicename>.xReset to reset the error and start communication again.
<modbusslavedevicename>.byModbusError gives information about the error.
In the Modbus library is a Struct "MB_ErrorCodes" which gives you the information about the errors.</modbusslavedevicename></modbusslavedevicename></modbusslavedevicename>
For advanced users:
Through the menu: Tools=> Options =>Feature sets, you can specify that you don't want to hide System Libraries.
Here you can see the information of the Struct.
Log in to post a comment.