Sub Process_Globals
Public Serial1 As Serial
End Sub
Private Sub AppStart
Serial1.Initialize(31250)
AddLooper("Looper1")
End Sub
Sub Looper1
Serial1.Write(Array As Byte(0x99, 0x1E, 0x45))
End Sub
Yes, I asking for this example because I found many of the example in this forum using "AsyncStreams" and I'm not quite understand what's AsyncStreams and why not using serial1.stream directly.
I'll look into the related discussion and try to figure out what's the different.. Thanks for your help Erel!
If you are only writing then there is no difference. AsyncStreams takes care of checking whether there is new data and raises the NewData event when the data is available.
AsyncStreams also raises the Disconnected event if the connection breaks. However it will never happen with serial ports.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.