118142-001 Rev B
Page 29 of 104
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.2.5 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.
4.2.5.1
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
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
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 ...