Modbus

The Modbus Connector is a communications protocol for PLC systems.

Configuration

  • Address. Address to Modbus device.

  • Port. Port to use, usually 502.

  • SerialPort settings

    • Enable Serial Port. If you are using Serial port insted of TCP.

    • Serial Port. RTU connection. Example ,COM1, COM2 etc.

    • Baudrate. Symbols per seconds. ex 4800, 9600.

    • StopBits. How many bits it should stop after transmisson, None, One, Two, OnePointFive(1.5).

    • Parity. A parity bit, or check bit, is a bit added to a string of binary code to ensure that the total number of 1-bits in the string is none ,even, odd, mark or space.

  • Logging

    • Enable log. Set this to enable logging of Modbus Connector.

    • Path to logfile. The file where the Modbus Connector appends logs.

    • Max size of logfile. Maximum size of logfile (in kilo bytes). Setting this to zero indicates no limit.

    • Log level. Controls at what level logs will be written.

Get Started

All commands can be sent in synchronous or asynchronous mode. If a value is accessed in synchronous mode the program will stop and wait for slave to response. If the slave didn't answer within a specified time a timeout exception is called. The class uses multi threading for both synchronous and asynchronous access. For the communication two lines are created. This is necessary because the synchronous thread has to wait for a previous command to finish.

Operations TODO

Last updated