Elo TouchSystems ET1229L Series User Manual page 166

12.1" lcd touchmonior with optional magnetic stripe reader, finger print reader and rear facing customer display
Hide thumbs Also See for ET1229L Series:
Table of Contents

Advertisement

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)
'
'
12345678901234567890123456789
' e.g. "/get
'+=========================================+
'|| 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
11111111112222222222
port_name
COM14"
Section 5. Example Applications
||
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Entuitive 1229l

Table of Contents