⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auto.h

📁 机械手IPC控制器伺服运动程序
💻 H
字号:
#if !defined(AFX_AUTO_H__91E22120_3C50_4F30_80E2_0CAA67B1F5FC__INCLUDED_)
#define AFX_AUTO_H__91E22120_3C50_4F30_80E2_0CAA67B1F5FC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Auto.h : header file
//
#include "common.h"
//#include "MyEdit.h"
#include "DataGlobal.h"
#include "alm1.h"

//#define SYS_STATUS_NOTREADY 1
//#define SYS_STATUS_GOHOME   2
//#define SYS_STATUS_READY    3
//#define SYS_STATUS_RUN      4
//#define SYS_STATUS_PAUSE    5
//#define SYS_STATUS_EMGC     6
//#define SYS_STATUS_CLOSED   0

#define WM_LISTADD (WM_USER+100) 
/////////////////////////////////////////////////////////////////////////////
// CAuto dialog

class CAuto : public CDialog
{
// Construction
public:
	CAuto(CWnd* pParent = NULL);   // standard constructor
	void SaveRecords();
	BOOL CanSerialize();
	void LoadRecords();
	void MoveCheck(int ngroup);
	BOOL SideCheck();
	void MasterMove();
	void SlaveMove();
	void AlarmCheck();
	void GetPosCoord(); 
	void GetPutPoint();
	void IODisplay();
	void IOControl();
    void AlarmStatus(); 
    void AlarmLog();
    void AlarmDisplayON(); 
    void AlarmDisplayOFF(); 
	void SaveGlobal(); 
	void Stack1Proc();
	void Stack2Proc();
//	void FormatData();
    TModeCollection m_Contacts;
	CDataGlobal glb;
	int MasterStep, SlaveStep;
	int Stack1Step, Stack2Step;
	int autorunflg;
	int automopflg;
	int mactindex;
	double waitposmx, waitposmy, waitposmz, waitpossx, waitpossz;
//	long codposmx,codposmy,codposmz;
	int sactindex;
//	long codpossx,codpossz;
	int mcodelong;
	int mcodefst;
	int scodelong;
	int scodefst;
	int gdrunflg;
	int gmopflg;
	double posxwaitm;
	double posywait;
	double poszwaitm;
	double posxwaits;
	double poszwaits;
	double dnzminm;
	double dnzmins;
	double fwdxminm;
	double fwdxmins;
	double putpartm;
	double putpart2m;
	double putzpartm;
	double putzpart2m;
	double putparts;
	double putzparts;
	double m_stmx, m_stmy, m_stmz;
	int rmcflg;
	int mopflg;
	int mopflg2;
	WORD out0;
	WORD wInput0, wInput1;
	WORD wInput;
//	Calm1 * dlgalm1;

// Dialog Data
	//{{AFX_DATA(CAuto)
	enum { IDD = IDD_DIALOGAUTO };
//	CMyEdit	m_edt;
	CString	m_num;
	CString	m_run_main;
	CString	m_mode_main;
	CString	m_put_main;
	CString	m_run_ass;
	CString	m_mode_ass;
	CString	m_pos_ass;
	CString	m_stoppos;
	CString	m_warn;
	CString	m_stopmode;
	CString	m_in;
	CString	m_lift;
	CString	m_shake;
	CString	m_ays;
	CString	m_detect;
	CString	m_put_ass;
	CString	m_vac1;
	CString	m_vac2;
	CString	m_vac3;
	CString	m_vac4;
	CString	m_vac5;
//	CString	m_hold1;

    CString	m_status;

	CStatic	m_vac;
	CStatic	m_sdm;
	CStatic	m_mop;
	CStatic	m_emc;
	CStatic	m_efp;
	CStatic	m_ck;
	CStatic	m_auto;
	CStatic	m_mop2;
	CStatic	m_hold1;
	CStatic	m_hold2;
	CString m_mdmx_str;
	CString m_mdmz_str;
	CString m_mdmsy_str;
	CString m_mdsx_str;
	CString m_mdsz_str;
	int     m_moldcount;
	int     m_moldset;
	int     m_moldtotal;
	int     m_fixstep;
    int     m_sysalarm;
	int     m_inputdata;
    CPoint led[10];
	Calm1 * dlgalm1;
// Added From Global Area To Here
    int FixStep; // Fix Mode Step
	int Vac1Chk,Vac2Chk,Vac3Chk,Vac4Chk,Vac5Chk,Hold1Chk,Hold2Chk,GrispChk; // Vac./Hold/Grisp Check
	int MWaitMode,MPutMode,SPutMode ; // Master Waiting Mode,Master/Slave Putting Mode
    int PinCtrl; // Eject Pin Control
	int Stack1Used, Stack2Used; // Stack
	int m_Stack1_Full, m_Stack2_Full;
	int	autokk;
	int	moprun;
	int mldinrun;
	int travrun;
	int mldoutrun;
	int travinrun;
	int	vac1start; // for Vac. On
	int	vac2start; // for Hold On
	int	hold1start;// for Grisp On
	int hold1over; // for Grisp Off
	int vac1over;
	int pinstart;  // for Eject Pin On
    int conveyact; // for Conveyor On
	unsigned int	vac1tim; // for Vac. On
	unsigned int	vac2tim; // for Hold On
	unsigned int	pintim;  // for Eject Pin On
	unsigned int	vac1tim_n;
	unsigned int	hold1tim;   // for Grisp On
	unsigned int	hold1tim_n; // for Grisp Off
	unsigned int	conveytime; // for Conveyor On Time

	int mafrun;
	int waitrun;
	int	progovrun;
	int	statasact;
	int	statastrav;
	int	stataswait;
	int	actflg;
	int	rotflg;
	int	acttim;
	int	rottim;
	int	almclr;
	int startrun;
//	int LatchedAlm;
/////////////////////////////////////////////////////////////////////////////
// CAuto dialog
//	WORD out0;
//	WORD wInput0, wInput1;
//	WORD wInput;
	float tm_indown;
	float tm_outdown;
	float tm_inup;
	float tm_outup;
	float tm_infwd;
	float tm_outfwd;
	float tm_inback;
	float tm_outback;
	float tm_vac1on;
	float tm_vac1off;
	float tm_vac2on;
	float tm_vac2off;
	float tm_holdon;
	float tm_holdoff;
	float ts_indown;
	float ts_outdown;
	float ts_inup;
	float ts_outup;
	float ts_infwd;
	float ts_outfwd;
	float ts_inback;
	float ts_outback;
	float ts_holdon;
	float ts_holdoff;
	float tm_inj;
	float tm_conv;
	float tm_spary1;
	float tm_spary2;
// Stack1,2
	int m_Stack1_nX, m_Stack1_nY, m_Stack1_nZ;
    int m_Stack1_ZDownSpd, m_Stack1_ZUpSpd;
	double m_Stack1_dX, m_Stack1_dY, m_Stack1_dZ;
	int m_Stack2_nX, m_Stack2_nY, m_Stack2_nZ;
    int m_Stack2_ZDownSpd, m_Stack2_ZUpSpd;
	double m_Stack2_dX, m_Stack2_dY, m_Stack2_dZ;
	double m_MX_ORG;
	int TimerCount;
//	int PutPointA, PutPointB, PutPointC;
    int PutPoint[3], PointNum;
	int PutStep, Side_Flag, PointIndex;
	double MXPos, MZPos, SXPos, SZPos, SXPos1;
	double EPosMX, EPosMZ, EPosMSY, EPosSX, EPosSZ;
	double m_curcmx, m_curcmz, m_curcmsy, m_curcsx, m_curcsz, m_dummy;
    int RobotRun_Flag, Divide_Flag;
	int GTimeCountTemp;
	int Get_Flag, Get_Flag1, Mold_Close;
    int m_NG_Num, m_QC_Num, m_Stack1_Num, m_Stack2_Num;
	unsigned int AlmTemp;
    int IOStatus[10];
//	int testtime=0;

	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAuto)
	public:
	virtual void Serialize(CArchive& ar);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CAuto)
	afx_msg void OnButton1();
//	afx_msg void OnChangeEdit1();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnButton2();
	afx_msg void OnTimer(UINT nIDEvent);
//	afx_msg void OnListAdd();
	afx_msg void OnButtonTimer();
	afx_msg void OnButtonCounter();
	afx_msg void OnButtonSpeed();
	afx_msg void OnButtonPos();
	afx_msg void OnButtonReset();
	afx_msg void OnDestroy();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_AUTO_H__91E22120_3C50_4F30_80E2_0CAA67B1F5FC__INCLUDED_)

⌨️ 快捷键说明

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