EasyManua.ls Logo

Spellman ST SERIES - Page 44

Spellman ST SERIES
108 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
101501-565 Rev C Page 13 of 58
tcpClient.RemoteHost = host
tcpClient.RemotePort = portNumber
tcpClient.Connect
For further information regarding the use of the above commands, please
refer to your Visual Studio Help File.
4.2.5.1 Data Output Example
MSComm1 is the serial port and TcpClient is the
Ethernet port.
If (portType = "ethernet") Then
tcpClient.SendData (str)
Else
MSComm1.InBufferCount = 0
On Error GoTo done
MSComm1.Output = str
done:
tmrOpenClose.Enabled = True
End If
4.2.5.2 Data Input Example
If (portType = "ethernet") Then
Do
DoEvents
tcpClient.GetData temp$
str = str + temp$
Loop Until InStr(str, Chr(3)) Or Timer - t1 > 1
On Error Resume Next
Else
Do
DoEvents
If MSComm1.InBufferCount > 0 Then
str = str & MSComm1.Input
End If
Loop Until InStr(str, Chr(3)) Or Timer - t1 > 1
If InStr(str, Chr(3)) > 0 Then
tmrOpenClose.Enabled = False
End If
End If

Table of Contents

Related product manuals