
s9 = "AA AA 00 00 00 00 00 80 00 00 00 01 00 00 06 00 00 00 87 55 55"

s1 = Chr(170) + Chr(170) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0)
s1 = s1 + Chr(128) + Chr(0) + Chr(0) + Chr(0)
s1 = s1 + Chr(1) + Chr(0) + Chr(0)
s1 = s1 + Chr(6) + Chr(0) + Chr(0) + Chr(0)
s1 = s1 + Chr(Asc("87")) + Chr(Asc("55")) + Chr(Asc("55"))



Print Asc(Chr(FromHex("AA")))

COM Open 1 9600
HexString = s9
COM_SendBytesFromHexString
Stop

Variable String  HexString
Variable String  HexByte
Variable Numeric HexLength
Variable Numeric HexIndex
Variable String  BytesString
Label COM_SendBytesFromHexString
	BytesString = ""
	' ----------------------------------------------------------
	HexLength = GetSeparatedStringCount(HexString, " ")
	For HexIndex = 0 To HexLength - 1
		' ------------------------------------------------------
		HexByte = GetSeparatedString(HexString, HexIndex, " ")
		BytesString = BytesString + Chr(FromHex(HexByte))
	Next
	COM WriteString BytesString
Return


COM WriteStringHEX s1
COM WriteStringDEC s1

s1 = COM_Status


'WATCH len(BytesString)
'EXEC DestX = 12
