
118142-001 Rev B
Page 36 of 104
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:
Summary of Contents for DXM100 Series
Page 11: ...DXM100 MANUAL 5 118147 001 Rev D Figure 2 1 Unit Dimensions ...
Page 16: ...DXM100 MANUAL 10 118147 001 Rev D Figure 3 3 Local Programming Via External Voltage Source ...
Page 17: ...DXM100 MANUAL 11 118147 001 Rev D Figure 3 4 Remote Monitoring ...
Page 18: ...DXM100 MANUAL 12 118147 001 Rev D RELAY Figure 3 5 Enable Interlock Logic Control ...
Page 37: ...118142 001 Rev B Page 13 of 104 Figure 9 Web Page 1 Contact Information ...