1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Dim soc1 As New TcpClient : déclaration des socket
Dim soc2 As New TcpClient : déclaration des socket
soc1.Client.Connect("192.168.1.101", 2001), Communication avec le port de l'automate :ccool:
soc2.Client.Connect("192.168.1.101", 771)' Communication avec le PortServer : :ccool:
soc1.Client.Send(tab) envoi la trame : :ccool:
soc2.Client.Receive(tab1)
i = 0
Dim j As Integer
j = tab1.Length
While i < 100
'mesrec = mesrec + Hex(tab1(i))
mesrec = mesrec + Chr(tab1(i))
i = i + 1
End While
MessageBox.Show(mesrec) : reception de la trame. : :arf::cry: |
Partager