My problem is with the event.
I have 6 devices that need to access it in one second for data collection.
It should work like this:
Pressed the button that will access the devices automatically every 10 seconds.
Let's call a timer with 10 seconds INTERVAL.
The application sends the command ID01 to the serial port and awaiting a response.
If do not answer or the answer that comes is different from what I hope, that Reeves command.
In the fifth time, warns that not received the response.
So changes to ID01, and repeat the steps above.
If has answer and what is expected.
So changes to ID02 and repeat the above steps.
Thus even ID06.
Expect the cycle of 10 seconds and restarts the cycle.
private void button10_Click(object sender, EventArgs e)
CommPort com = CommPort.Instance;
for (int i = 0; i <= 6; i++)
for (int x = 0;x <= 5;x++)
string vstr = "ID0" + i.ToString();
string s_ID_compare = "0"+i.ToString();
vstr = ConvertEscapeSequences(vstr);
if(returned data = s_ID_compare)