App. - 30 App. - 30
MELSEC-Q
APPENDIXES
Private Sub Command2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Command2.Click
'***********************************
' Read
'***********************************
Dim rtn As Integer
Dim idata(5) As Short
'D0-D4 are read
rtn = AxActEasyIF1.ReadDeviceBlock2("D0", 5, idata(0))
If rtn = 0 Then
MsgBox("D0-D4 = " & idata(0) & "," & idata(1) & "," & idata(2) & "," & idata(3) & "," & idata(4))
Else
MsgBox("Read Error :" & Hex(rtn))
End
If
End Sub
Private Sub Command3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Command3.Click
'***********************************
' Disconnection
'***********************************
Dim rtn As Integer
'Disconnection
rtn = AxActEasyIF1.Close()
If rtn = 0 Then
MsgBox("The disconnection was successful")
Else
MsgBox("Disconnection Error :" & Hex(rtn))
End
If
End Sub
2) When Visual C++
®
.NET 2003 is used
//**************************
// Connection
//**************************
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
int
iRet;
// Get LogicalstationNumber
axActEasyIF1->ActLogicalStationNumber=Convert::ToInt32(textBox1->Text);
//
Connection
iRet = axActEasyIF1->Open();
if( iRet == 0 ){
MessageBox::Show( "The connection was successful" );
}
else
{
MessageBox::Show( String::Format( "Connection Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}
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: ......