Hello,
I've question quite similar to the previous topic. What I want is to pause
some method in which serial communications is proccessed until the answer
arrives. It goes something like that:
For i As Integer = 0 To 255
Write(serialCommand)
XmitWait
{PAUSE until there is an answer from some serial device}
If sRetData Than
device = new Device(Hex(I))
aDevices.Append device
End If
Next
In DataAvailable event handler I have:
sRetData = ReadAll
sRetData is the very same class properity
To explain the situation a bit more : I have automated controller connected
to the serial port of the host computer. Some more devices are connected to
that controller to create measuring network. Each device has an address. I
can control each device directly with ASCII commands when I know it's
address. The routine above is to initilaze such network during application
start (because devices changes from time to time) to know what devices work
and on what addresses. When I try this routine without the pause it return
with the information that there is no device connected and I suppose it is
because any device is even able to answer while the main loop finishes.
I have to say that I'm totally RB newbie so please forgive me if the problem
is trivial.
I would be very grateful for any help, best regards
Pawel
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>