const auto text=QTextCodec::codecForName("cp1251")->fromUnicode(msg);
Msg+=STX+QString::number(j)+text+CR+ETX+CheckSum(QString::number(j)+text)+CR+LF;
serialPort->write(Msg);
TEXT is the division of ASCII text message itself and the number of characters for one text is limited to less than 240 characters (including “CR”) and below