Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Serialinchk and Serialflush


kokihualpa Jun 9, 2020 06:27 PM

Do you think the I have problem with this way to use Serialinchk()?

Dim OutstringBC(13) As String * 5 ={"#","C","m1","JJ","J0","J1","J2","J6","J5","J3","J4","JQ","JM"}

public j,cuenta18,espera as boolean

Beginprog

Scan(60,Sec,1,0)

For j=1 To 13
cuenta18=0
Espera=false
SerialOut (Com2,OutstringBC(j)+CRLF,"",0,10)
While (Espera=false)
If SerialInChk(Com2)<1 Then
cuenta18=cuenta18+1
If cuenta18 > 3000 Then Espera = True
Else
SerialIn (Instring(12+j),Com2,100,13,50)
Espera=true
SerialFlush(Com2)
EndIf
Wend
Next j

nextscan

endprog

Log in or register to post/reply in the forum.