118150-001 REV. B
Page 45 of 66
4.9 Enabling Communications Objects in Visual Basic for Ethernet
Communications
For Ethernet communications, we need Microsoft Winsock Control 6.0
and SP5. To enable this in your VB 6 project, go to:
Project -> Components
Once selected in your toolbox you will have an icon of two computers
linked together and it will be named: Winsock.This can be dragged and
dropped into your application. Then set the object’s properties.
4.10 Configuring Communications in Visual Basic for Ethernet
In order to configure the Winsock Object, you must make the following
initialization in the object’s properties:
Protocol
0
– sckTCPProtocol
Then, in the application code, include the following commands:
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.
Data Output Example
MSComm1 is both the serial and USB port. 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
Data Input Example
If (portType = "ethernet") Then
Содержание XRB011
Страница 11: ...SPELLMAN HIGH VOLTAGE Introduction 1 Installation and Operating Manual Page1 6 118149 001 REV F 50W OPTION ...
Страница 69: ...118150 001 REV B Page 33 of 66 Figure 9 Web Page 1 Contact Information ...
Страница 74: ...118150 001 REV B Page 38 of 66 4 3 2 7 Version Information Figure 15 Version Information ...