
Section 5. Example Applications
129
If Err.Number <> 0 Then
' Process error using Err.Description
' contains error description for the demo,
' we'll just display it
txtInfo.Text = Err.Description
' Reset the error handling
On Error GoTo 0
' exit this sub
Exit Sub
End If
' reset the error handling
On Error GoTo 0
' send the command to get the port number
Put #1, , "/get port_name" + Chr$(10)
' get the response from driver which should contain the
' com port number
Get #1, , buf$
' Expected response:
' (character position in the response string)
'
11111111112222222222
'
12345678901234567890123456789
' e.g. "/get
port_name
COM14"
'+=========================================+
'|| IMPORTANT: CLOSE THE DEVICE DRIVER
||
'||
BEFORE TRYING TO REOPEN IT ||
'+=========================================+
Close #1
' Make sure we got back a valid response.
‘ This checks that we have received a “/get” response and that
‘ “port_name” and “COM” are present and in the right locations.
If Left(buf, 4) = "/get" _
And InStr(buf, "port_name") = 13 _
And InStr(buf, "COM") = 25 Then
' Just for information, display the com port number
txtInfo.Text = "Opening Serial IO on port " & Mid(buf, 25, 5)
' Get the port number value from character position 28
' (and 29 if two digits long) of the response
PortNumber = Val(Mid(buf, 28, 2))
'+------------------------------------+
'| open the driver as a serial device |
'+------------------------------------+
' make sure the on_comm function will be
' triggered by the device driver by setting
' the receive threshold to 1 (one)
MSComm1.RThreshold = 1
Summary of Contents for Entuitive 1525L Series
Page 8: ...2 5 Side View Base Bottom View User Controls ...
Page 27: ...2 24 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Page 31: ...3 28 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Page 44: ...C 41 See Detail A Detail A ...
Page 45: ...C 42 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Page 48: ...45 N10051 ...
Page 49: ...46 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Page 59: ...56 Figure 1 1 USB Swipe Reader ...
Page 63: ...USB Swipe Reader 60 ...
Page 67: ...USB Swipe Reader 64 ...
Page 69: ...USB Swipe Reader 66 ...
Page 117: ...MagTek Device Drivers for Windows 114 ...
Page 127: ...MagTek Device Drivers for Windows 124 ...
Page 141: ...MagTek Device Drivers for Windows 138 ...
Page 163: ...MagTek Device Drivers for Windows 160 ...
Page 165: ...MagTek Device Drivers for Windows 162 ...