App. - 33 App. - 33
MELSEC-Q
APPENDICES
4) When
Visual
C++
®
6.0 is used
//**************************
// Connection
//**************************
void CVCDlg::OnOpen()
{
long
lRet;
CString
szMessage;
// Reflects the logical station No. set in the text box to variables.
UpdateData();
//
Get
LogicalstationNumber
m_actEasyIf.SetActLogicalStationNumber( m_lLogicalStationNumber );
//
Connection
lRet
=
m_actEasyIf.Open();
if( lRet == 0 ){
MessageBox( "The connection was successful" );
} else {
szMessage.Format( "Connection Error : %x", lRet );
MessageBox(
szMessage
);
}
}
//**************************
// Read
//**************************
void CVCDlg::OnRead()
{
long
lRet;
short
sData[5];
CString
szMessage;
// D0-D4 are read
lRet
=
m_actEasyIf.ReadDeviceBlock2( "D0", 5, sData );
if( lRet == 0 ){
szMessage.Format(
"D0-D5
=
%d,%d,%d,%d,%d",
sData[0],sData[1],sData[2],sData[3],sData[4] );
MessageBox(
szMessage
);
} else {
szMessage.Format( "Read Error : %x", lRet );
MessageBox(
szMessage
);
}
}
Summary of Contents for GX Configurator-SC
Page 2: ......
Page 103: ...3 42 3 42 MELSEC Q 3 SPECIFICATIONS MEMO ...
Page 138: ...4 35 4 35 MELSEC Q 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MEMO ...
Page 397: ...App 24 App 24 MELSEC Q APPENDICES Connection example 3 Connection example 4 ...
Page 439: ...WARRANTY ...
Page 441: ......