RS232 very problem

Hi everyone, I created an executable to configure my device using hexadecimal values. I’m using DecodeHex encoding to send it in hex to my device. Now when I fill the boxes and I send, sometimes it configures me well, sometimes it doesn’t send the last two boxes. What’s the problem? This is my executable and my code:

Serial1.Write(DecodeHex("5E")) Serial1.Write(DecodeHex("43")) Serial1.Write(DecodeHex(TextField1.Text)) Serial1.Write(DecodeHex(TextField6.Text)) Serial1.Write(DecodeHex(TextField7.Text)) Serial1.Write(DecodeHex(TextField8.Text)) Serial1.Write(DecodeHex(TextField2.Text)) Serial1.Write(DecodeHex(TextField9.Text)) Serial1.Write(DecodeHex(TextField10.Text)) Serial1.Write(DecodeHex(TextField11.Text))

@Mario Castaldo — Try using Serial1.Flush at the end to force-send the data in buffer.

Great :slight_smile: Thanks