' ------------------------------------------
'  You need Com0Com with COM17 and COM18  
' ------------------------------------------
'  To send chars open a Terminal on COM17
'  or start a second Automation.exe
'  with SHIFT + DoubleClick
' ------------------------------------------
Controls CloseTextBox
COM Open 18 9600
Print COM_Status + CRLF
Controls ClearTextBox
Controls OpenTextBox
ReceiveLoop

Stop

Label ReceiveLoop
	ReceiveFromSerial
	Wait Seconds 0.01
Goto ReceiveLoop

Label ReceiveFromSerial
	String Terminator = Chr(13)+Chr(10)
	String ReceivedLine
	String HexLine
	ReceivedLine = COM_ReceiveUntil(Terminator)
	If ReceivedLine <> ""
		HexLine = ""
		For v1 = 1 To Len(ReceivedLine)
			HexLine = HexLine + Right("0" + Hex(Asc(Mid(ReceivedLine, v1))), 2) + " "
		Next
		Controls ClearTextBox
		Print HexLine + CRLF
	EndIf
Return


'BOOKMARKS 

'EDITEDLINES 7 2 -1 3 -1 6 -1 5 -1 6 -1 7 3 10 4 9 1 10 

'WATCH dummy
