![Spellman SLM SERIES Скачать руководство пользователя страница 61](http://html.mh-extra.com/html/spellman/slm-series/slm-series_instruction-manual_1346474061.webp)
38: End If
39: StatusBar1.Panels(3).Text = "RX: " & str
40: inputInputString = str
41: tmr_RCVTIMER.Enabled = True
42: End Function
4.3.5.5
Example Timer Routine: Toggle Port State
This is the timer routine in which the open/closed state of the port is
toggled. If communications are interrupted, the USB device will re-
register itself with the OS (vendor term: renumeration). Once this
happens, re-opening the port will enable communications. Until the
re-registration happens, open operations will fail. Notice line 5
where we register an error handler.
1:Private Sub tmrOpenClose_Timer()
2: If MSComm1.PortOpen = True Then
3:
4: MSComm1.PortOpen = False
5: On Error GoTo done
6: MSComm1.PortOpen = True
7: done:
8: tmrOpenClose.Enabled = False
9: End If
10:
11: End Sub
4.3.5.6
Example Timer Routine: Port Reconnection
This is another timer routine whose purpose is to turn the port on if
it is off. Notice that in line 8 an error handler is called because if the
device has not re-registered itself with the OS, an error will be
raised.
1: Private Sub tmr_COMMWDT_Timer()
2:
3: tmr_COMMWDT.Enabled = False
4:
5: If CommStatusFlag = True Then
6:
7: If MSComm1.PortOpen = False Then
8: On Error GoTo done
9: MSComm1.PortOpen = True
10: done:
11: End If
12:
13: ElseIf CommStatusFlag = False Then
14:
118080-001 REV A
Page 34 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 ...