Mitsubishi QJ71C24N User Manual page 405

Melsec-q series
Hide thumbs Also See for QJ71C24N:
Table of Contents

Advertisement

APPENDIXES
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
App. - 32
3)
When Visual Basic
®
6.0 is used
MELSEC-Q
App. - 32

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qj71c24n-r2Qj71c24n-r4Qj71c24Qj71c24-r2

Table of Contents