4.3.5.4
Example Input Routine
Notice on line 26 we check for data first before extracting data from
the input. Then if we have actual data we turn off the timer.
Otherwise the timer routine toggles the port open/close.
1: Private Function inputInputString() As String
2: Dim str As String
3: Dim t1 As Single
4: Dim temp$
5: Dim stra As String
6: Dim stri(300) As String
7: t1 = Timer
8:
9: If (portType = "ethernet") Then
10: Do
11: DoEvents
12: tcpClient.GetData temp$
13: str = str + temp$
14: Loop Until InStr(str, Chr(3)) Or Timer - t1 > 1
15: On Error Resume Next
16: ElseIf (portType = "USB") Then
17: Do
18: DoEvents
19: stra = usb.ReadReport
20: str = str & stra
21: 'str = str & ReadReport
22: Loop Until InStr(str, Asc(3)) Or Timer - t1 > 0.09
23: Else
24: Do
25: DoEvents
26: If MSComm1.InBufferCount > 0 Then
27: str = str & MSComm1.Input
28: End If
29: Loop Until InStr(str, Chr(3)) Or Timer - t1 > 1
30:
31: If InStr(str, Chr(3)) > 0 Then
32: tmrOpenClose.Enabled = False
33: End If
34:
35: frm_EXTRAS.txt_MSCOMMBUFF.Text = str
36: tmr_COMMWDT.Enabled = True
37: On Error Resume Next
118080-001 REV A
Page 33 of 95
Содержание SLM SERIES
Страница 15: ...SLM MANUAL 6 118073 001 Rev C Figure 2 2 Unit Dimensions 1200W ...
Страница 19: ...SLM MANUAL 10 118073 001 Rev C Figure 3 3 Local Programming via External Voltage Source ...
Страница 20: ...SLM MANUAL 11 118073 001 Rev C Figure 3 4 Remote Monitoring ...
Страница 40: ...Figure 9 Web Page 1 Contact Information 118080 001 REV A Page 13 of 95 ...
Страница 46: ...4 2 2 9 About Displays version information and model number Figure 15 About 118080 001 REV A Page 19 of 95 ...
Страница 98: ...Request Faults 68 20 ASCII 118080 001 REV A Page 71 of 95 ...