Your code needs proper indenting because it is hard to read.
I do not know at the moment if this will make any difference, but personally I would reverse lines 3 and 4.
Your subject says Help with modbusrtu. There are many member functions of the class posted that start with ModbusRTU, so which one is the problem?
It would also help if you poster the ModbusRTU.hpp code so that everyone can see what you have done. It is possible that the problem starts in the ".hpp" file, but shows up in the ".cpp" file.
Since you are new it is best to add a new message and not change the original post as it can confuse people.
Looking at the code you have posted I see things like _DO and _AO. It is best not to start variable names or function names with an underscore as this could clash with what might be in the include files like "iostream". Best to leave the underscore(s) for the standard header files. Also names like "DO" make me think that this is defined as a constant that can not be changed. Without the class definition I am not sure what you are doing.
Proper indenting and a few less blank lines in some places and a blank line in other places will make the code easier to read.
I do not know at the moment if this will make any difference, but personally I would reverse lines 3 and 4.
In general, it's good practise to include user-written, higher-level header files first, and lower-level standard library includes afterwards. This makes it easier to check whether you've included everything you need to in your own header files.