Quote Originally Posted by dbasnett View Post
Does this, "the controller hangs after the first 3 commands or so. It seems it doesn't like the multiple "vbCr"..." mean there is still a problem?

I can' tell if you are making progress or not.
When I choose to write only one command per line and then do the cmds.Add(string) to the list, yes there obviously is an issue between this method and the controller.

I'm making progress yes. First because the reading of bytes+motion WITH my 50 times LOOP is running correctly. That is already a huge step from what I had. I'm still unsure the RTB displays everything correctly when it begins to stack-up. I will have to check this later. Secondly, the way the return string is verified and then we're still able to move on to the next position is also a step up.

I'm checking the return string in the ProgressChanged part of the BCKGND Worker, don't know if it's good or not. But in the DoWork, all the chars of the string are not yet appended to the RTB (the variable you named "s") and it's only when it's displayed in the RTB that it is complete. I can then proceed to put it in my "IF" condition:

Code:
If s.substring(s.Length-2,1) ="1" Then

updateLabelText("MOTION STATUS HAS BEEN VERIFIED = 1")

cmdDone.Set()

Else
'motion is not complete

updateLabelText("Motion not complete")

End If