Modbus serial master on RTE V3 demo

  • timvh

    timvh - 2012-02-15

    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.

  • mikolaj

    mikolaj - 2012-02-16

    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?

  • timvh

    timvh - 2012-02-17

    <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.