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
);
}
}
Summary of Contents for MELSEC LJ71C24
Page 1: ......
Page 2: ......
Page 18: ...A 16 A 16 INDEX REVISIONS WARRANTY...
Page 22: ...A 20 A 20 2 LJ71C24 R2 LJ71C24 R2 Before Using the Product...
Page 23: ...A 21 A 21 MEMO...
Page 38: ...4 2 4 2 4 PROCEDURES PRIOR TO OPERATION MEMO 4...
Page 105: ...7 30 7 30 7 SETTINGS FOR THE C24 MEMO...
Page 425: ......
Page 426: ......
Page 427: ......