Hi...I am a noob...first and foremost. I am doing a school project in which I am using motors that run on RS232. My com2.writeline code works fine, however I am stuck on reading back on the port. Here is what I want to do:
When the motor runs, it sets a bit saying it is in motion (RBo). I want to poll that bit until the motor turns off. I can do this by looking at the specific bit as a 1 or a 0. Or, I can look at the status Byte and go from there. I am completely new to doing this, and I would really appreciate any com port samples/examples that implement this, or a good code critique...again I am a noob. :)
Here is my code so far:
com2.WriteLine(Chr(130) +
"WAKE ")com2.WriteLine(
"A=" + Acceleration2.Text + " ")com2.WriteLine(
"V=" + Velocity2.Text + " ")com2.WriteLine(
"P=" + d2 + Position2.Text + " ")com2.WriteLine(
"G ") Docom2.WriteLine(
"RBo ")incomingdata = com2.ReadChar()
'If IncomingData Is Nothing Thenbytetest.Text = IncomingData
If IncomingData = "49" Then Exit Do End If LoopThanks!!