App. - 31 App. - 31
MELSEC-Q
APPENDIXES
//**************************
// Read
//**************************
private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
int
iRet;
short
sData[5];
String* szMessage= "";
String*
lpszarrData[];
int
iNumber;
String*
szReadData;
// D0-D4 are read
iRet = axActEasyIF1->ReadDeviceBlock2( "D0", 5, sData );
if( iRet == 0 ){
lpszarrData = new String * [ 5 ];
lpszarrData[0] = "D0-D4 = ";
// Storage of data to display the results
for( iNumber = 0 ; iNumber < 5 ; + )
{
lpszarrData[ iNumber ] = sData[ iNumber ].ToString();
}
szReadData
=
String::Join(",",lpszarrData);
MessageBox::Show(String::Format("D0-D4
=
{0}",szReadData));
} else {
MessageBox::Show( String::Format( "Read Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}
//**************************
// Disconnection
//**************************
private: System::Void button3_Click(System::Object * sender, System::EventArgs * e)
{
int
iRet;
//
Disconnection
iRet = axActEasyIF1->Close();
if( iRet == 0 ){
MessageBox::Show( "The disconnection was successful" );
} else {
MessageBox::Show( String::Format( "Disconnection Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}
Содержание MELSEC QJ71C24
Страница 1: ......
Страница 2: ......
Страница 103: ...3 42 3 42 MELSEC Q 3 SPECIFICATIONS MEMO ...
Страница 177: ...6 33 6 33 MELSEC Q 6 DATA COMMUNICATION USING THE NON PROCEDURE PROTOCOL MEMO ...
Страница 397: ...App 24 App 24 MELSEC Q APPENDIXES Connection example 3 Connection example 4 ...
Страница 441: ......
Страница 442: ......