W&T 57630 Manual page 111

Web-io series 12+12 digital
Table of Contents

Advertisement

W&T
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
Subject to errors and modifications:
TCP / UDP - Binary
111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

57631

Table of Contents