App. - 32 App. - 32
MELSEC-Q
APPENDIXES
3) When Visual Basic
®
6.0 is used
Private Sub Command1_Click()
'***********************************
' Connection
'***********************************
Dim rtn As Long
'Get
LogicalstationNumber
ActEasyIF1.ActLogicalStationNumber = Val(Text1.Text)
'Connection
rtn = ActEasyIF1.Open()
If rtn = 0 Then
MsgBox "The connection was successful"
Else
MsgBox "Connection Error :" & Hex(rtn)
End
If
End Sub
Private Sub Command2_Click()
'***********************************
' Read
'***********************************
Dim rtn As Long
Dim idata(5) As Integer
'D0-D4 are read
rtn = ActEasyIF1.ReadDeviceBlock2("D0", 5, idata(0))
If rtn = 0 Then
MsgBox "D0-D5 = " & idata(0) & "," & idata(1) & "," & idata(2) & "," & idata(3) & "," & idata(4)
Else
MsgBox "Read Error :" & Hex(rtn)
End
If
End Sub
Private Sub Command3_Click()
'***********************************
' Disconnection
'***********************************
Dim rtn As Long
'Disconnection
rtn = ActEasyIF1.Close()
If rtn = 0 Then
MsgBox "The disconnection was successful"
Else
MsgBox "Disconnection Error :" & Hex(rtn)
End
If
End Sub
Summary of Contents for MELSEC QJ71C24
Page 1: ......
Page 2: ......
Page 103: ...3 42 3 42 MELSEC Q 3 SPECIFICATIONS MEMO ...
Page 177: ...6 33 6 33 MELSEC Q 6 DATA COMMUNICATION USING THE NON PROCEDURE PROTOCOL MEMO ...
Page 397: ...App 24 App 24 MELSEC Q APPENDIXES Connection example 3 Connection example 4 ...
Page 441: ......
Page 442: ......