AndreySV/check_modbus — pull request #5 by sq5gvm (2014-08-02 20:36:53+00:00)
Title: Cleanup connection buffer before requesting data from devices (probably RTU only)

When using serial connection sometimes there can be data awaiting in serial port buffer, even before sending request. It can be modbus RTU data eg. response to previous query sent after timeout occured (which could be "dangerous" if contains data from different register) or simply garbage from serial line.
Added modbus_flush command - flushing connection buffers before requesting new data from device resolves problem.