experiment_watch.cpp

来自「开发虚拟的被控对象及虚拟的PLC,模似PLC的工作过程进行实验。用户可根据具体的」· C++ 代码 · 共 36 行

CPP
36
字号
#include "StdAfx.h"
#include "PLC_DEMO.h"

#include "PLC_DEMODoc.h"
#include "PLC_DEMOView.h"
#include "MainFrm.h"
#include "Makesure_in_out_point.h"
#include "Fetch_communicate.h"

extern int signinput[8];//输入接口状态存储
extern int signoutput[10];//输出接口状态存储

extern int forautotruckinput[2];
extern int forautotruckoutput[7];

extern CPLC_DEMOView *forrun;
extern bool autotruckenable;


UINT Mywatch(LPVOID PHWndView) 
{  
	int xx=1;
	//while(xx)
	{
	if(autotruckenable)
	{
		Sleep(50);
		if((signoutput[forautotruckoutput[1]])
			&&(((!signoutput[forautotruckoutput[4]])
			||(!signoutput[forautotruckoutput[5]]))
			||(!signoutput[forautotruckoutput[6]])))
			AfxMessageBox("have  wrong");
	}
	}
	return(0);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?