estop.cpp
来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 84 行
CPP
84 行
// estop.cpp : implementation file
//
#include "stdafx.h"
#include "alfa.h"
#include "estop.h"
#include "MCCL.h"
#include "sys.h"
#include "main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cestop dialog
Cestop::Cestop(CWnd* pParent /*=NULL*/)
: CDialog(Cestop::IDD, pParent)
{
//{{AFX_DATA_INIT(Cestop)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void Cestop::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cestop)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cestop, CDialog)
//{{AFX_MSG_MAP(Cestop)
ON_WM_TIMER()
ON_WM_SHOWWINDOW()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cestop message handlers
void Cestop::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
WORD wInput0;
WORD wInput;
MCC_GetRIOInputValue( &wInput0, RIO_SET1, RIO_PORT0, CARD_INDEX);// get remote I/O set 0's DI0 ~ DI15 statuses
wInput=wInput0;
if(wInput0==(wInput|0x8000))
{
return;
}
else
{
KillTimer(30);
ShowWindow(FALSE);
CMain * main=(CMain*)GetParent();
main->dlghome->ShowWindow(TRUE);
return;
}
CDialog::OnTimer(nIDEvent);
}
void Cestop::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
if(bShow==1)
{
SetTimer(30,40,NULL);
}
else
{
KillTimer(30);
}
// TODO: Add your message handler code here
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?