Button 1 Text "22M4CW"
Button 2 Text "2M4CCW"
Button 4 Text "START"
Button 5 Text "STOP"

COM Open 12 9600
s1 = COM_Status
s2 = COM_PortNames

Option Speed 9
Controls OpenTextBox
Goto Timer1
Stop

Label "22M4CW"
	COM WriteString "22M4CW" + CR + LF
Return

Label "2M4CCW"
	COM WriteString "2M4CCW"  + CR + LF
Return

Label "START"
	COM WriteString "START"  + CR + LF
Return

Label "STOP"
	COM WriteString "STOP"  + CR + LF
Return

Label Timer1
	s2 = COM_Received
	If s2 <> ""
		Print s2
	EndIf
	Wait Seconds 0.1
Goto Timer1

'======================================================================
' serial port command list
'======================================================================

'COM Open 1 9600
'
's1 = COM_Status
'Print s1
'
's2 = COM_Received
'Print s1
'
's1 = COM_PortNames
'Print s1
'
'v1 = SpaceSeparatedStringCount(COM_PortNames)
'
's1 = SpaceSeparatedString(COM_PortNames,3)
'
'
'COM WriteString s1 + CRLF
'
'COM WriteLine s1
'
'COM DiscardOutBuffer
'
'COM DiscardInBuffer
'
'COM EnableDTR
'
'COM EnableRTS
'
'COM DisableDTR
'
'COM DisableRTS
'
'COM Close
'


'WATCH COM_PortNames
'WATCH COM_Status
'WATCH COM_Received
