
Variable Numeric Slot_Commands = 1

Button 1 Label Log_Run
Button 2 Label Log_Stop
Button 3 Label Log_Pause
Button 4 Label Log_Resume

Button 6 Label Backup_File

Button 8  Label Interval_001
Button 9  Label Interval_01
Button 10 Label Interval_1
Button 11 Label Interval_10

Stop

' =============================================================
'  SEND COMMAND (default timeout = 0.5 Sec)
' =============================================================
Label SendCommand
	Variable String SC1           '<-- Parameter Command-String
	SlotText Slot_Commands = SC1
	Variable Numeric SC2
	For SC2 = 0.1 To 0.5 Step 0.1 ' <-- 0.5 seconds timeout
		If SlotText(Slot_Commands) = ""
			Exit
		EndIf
		Wait Seconds 0.1
	Next
Return

' =============================================================
'  COMMANDS
' =============================================================

' ----------------------------------------------------- Toolbar commands
Label Log_Run
	SendCommand("LogRun")
Return
Label Log_Stop
	SendCommand("LogStop")
Return
Label Log_Pause
	SendCommand("LogPause")
Return
Label Log_Resume
	SendCommand("LogResume")
Return

Label Backup_File
	SendCommand("BackupFile")
Return

Label Interval_001
	SendCommand("RecordingInterval 0.01")
Return
Label Interval_01
	SendCommand("RecordingInterval 0.1")
Return
Label Interval_1
	SendCommand("RecordingInterval 1")
Return
Label Interval_10
	SendCommand("RecordingInterval 10")
Return


