Mitsubishi Electric CR750-Q Instruction Manual page 615

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

Private Sub Winsock1_Error(ByVal Number As Integer, _
Description As String, ByVal Scode As Long, _
ByVal Source As String, ByVal HelpFile As String, _
ByVal HelpContext As Long, CancelDisplay As Boolean)
Socket
Check1.Value = False
Command1.Enabled = False
Winsock1.Close
MsgBox " Error:" & Number & "(" & Description & ")"
End Sub
b) Program for the server (when using the personal computer as the server and using the controller as the
client).
Option Explicit
Dim RecvData() As Byte
Private Sub Form_Load()
Text1.Enabled = False
End Sub
Private Sub Check1_Click()
If Check1.Value Then
Text1.Text = Winsock1.LocalIP
Winsock1.LocalPort = Text2.Text
Winsock1.Listen
Else
Command1.Enabled = False
Winsock1.Close
End If
End Sub
Private Sub Winsock1_Connect()' Process when the network can be connected
Command1.Enabled = True
End Sub
Private Sub Winsock1_Close()' Process when the network is closed
Check1.Value = False
End Sub
Private Sub Command1_Click()' Process when "Transmission" command button is clicked
Winsock1.SendData (Text3.Text)
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) ' Process when the connection
demand comes
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
Command1.Enabled = True
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)' Process when the received data arrives
If bytesTotal > 0 Then
' Make edit of the IP address impossible.
' Process when the connection check button is clicked
' Process when an error occurs in Window
Real-time external control function Appendix-595
7Appendix

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents