![W&T 57630 Manual Download Page 111](http://html1.mh-extra.com/html/wandt/57630/57630_manual_3082028111.webp)
111
W&T
TCP / UDP - Binary
Subject to errors and modifications:
To program Web-IO applications in VB, you therefore need to
represent the byte sequence as it is sent when sending a structure
over the network in the form of a string.
The following source text excerpt shows how strings can be
prepared for sending using the example of the ReadCounter
structure.
First the necessary structures and variables need to be declared
in an external module.
Public Type Struct_ReadCounter
send_sequence As Integer
rec_sequence As Integer
struct_type As Integer
length As Integer
counter_index As Integer
End
Type
Public Type Struct_Counter
send_sequence As Integer
rec_sequence As Integer
struct_type As Integer
length As Integer
counter_index As Integer
counter_value As Long
End
Type
Public ReadCounter As Struct_ReadCounter
Public Counter As Struct_Counter
Public Str_ReadCounter As String * 10
Public
Str_Counter
As
String
*
14
The following routine opens the connection to the Web-IO.
Private Sub ButtonConnect_Click()
'// Open TCP connection
Winsock1.RemotePort = 49153
Winsock1.RemoteHost = "172.16.232.17"
Winsock1.Connect
End Sub
Summary of Contents for 57630
Page 8: ...8 W T Content...
Page 22: ...22 W T Assigning the IP address...
Page 44: ...44 W T configuring the network parameters...
Page 194: ...194 W T Diacnostics and testing...