App. - 85 App. - 85
APPENDIXES
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
);
}
}
Содержание MELSEC LJ71C24
Страница 1: ......
Страница 2: ......
Страница 18: ...A 16 A 16 INDEX REVISIONS WARRANTY...
Страница 22: ...A 20 A 20 2 LJ71C24 R2 LJ71C24 R2 Before Using the Product...
Страница 23: ...A 21 A 21 MEMO...
Страница 38: ...4 2 4 2 4 PROCEDURES PRIOR TO OPERATION MEMO 4...
Страница 105: ...7 30 7 30 7 SETTINGS FOR THE C24 MEMO...
Страница 391: ...App 62 App 62 APPENDIXES 3 Refresh parameter setting In Refresh Parameter set the following network parameters...
Страница 425: ......
Страница 426: ......
Страница 427: ......