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

📄 autoteach.h

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

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AutoTeach.h : header file
//
#include "common.h"
#include "MyEditFull.h"
#include "AutoTeachSet1.h"
#include "AutoTeachSet2.h"
#include "AutoTeachDelay.h"
#include "autoteachstatus.h"
#include "AutoTeachKey.h"
//#include "alm1.h"
#include "alm2.h"
#include "DataGlobal.h"
//#include "alm3.h"
//#include "alm4.h"
//#include "alm5.h"
//#include "alm6.h"
//#include "alm7.h"
//#include "alm8.h"
//#include "alm9.h"
//#include "alm10.h"
//#include "alm11.h"
//#include "alm12.h"
//#include "alm13.h"
//#include "alm14.h"
//#include "alm15.h"
//#include "alm16.h"
#define Line			 0
#define Speed            1
#define Outon            2
#define Outoff           3
#define Waitinput        4
#define Vac1on           5
#define Vac1off          6
#define Vac2on           7
#define Vac2off          8
#define Vac3on           9
#define Vac3off         10 
#define Vac4on          11
#define Vac4off         12
#define Vac5on          13
#define Vac5off         14
#define Ckon            15
#define Ckoff           16
#define Mdelay          17
#define Vac1Dec         18
#define Vac2Dec         19
#define Vac3Dec         20
#define Vac4Dec         21
#define Vac5Dec         22
#define CkDec           23
#define Side            24
#define Correct         25
#define Stack1          26    
#define Stack2          27
#define Mnop            28
#define Nipon            5
#define Nipoff           6
#define Sdelay           7
#define NipDec           8
#define Snop             9

/////////////////////////////////////////////////////////////////////////////
// CAutoTeach dialog

class CAutoTeach : public CDialog
{
// Construction
public:
	void SaveRecords();
	void ShowCommand(int index);
	void LoadRecords();
	BOOL CanSerialize();
    void IOControl(); 
    void AlarmStatus();
	void AlarmCheck(); 
	void MoveCheck(int ngroup);
	void AlarmDisplayON(); 
	void AlarmDisplayOFF(); 
	void GetPosCoord();
	void SaveGlobal();
	void AlarmLog(); 
	CAutoTeach(CWnd* pParent = NULL);   // standard constructor
    Tteachcollection m_teach;
	CDataGlobal glb;
	CAutoTeachSet1 * dlgautoteachset1;
	CAutoTeachSet2 * dlgautoteachset2;
	CAutoTeachDelay * dlgautoteachdelay;
	Cautoteachstatus * dlgautoteachstatus;
	CAutoTeachKey * dlgautoteachkey;
	Calm2 * dlgalm2;
	que command[1024];
	int CommandLength;
	int Curindex;// Max. Line in list1 
	int Cursel;  // Current Line in list
	int runflg;
	int mopflg;
	int m_min;
	int j_marm;
	int k_sarm;
	int n_max;
	int prgcount;
	int m_speedtch;
	int s_speedtch;
	int rmcflg;
	int mopflg2;
//	long codtmx;
//	long codtmy;
//	long codtmz;
//	long codtsx;
//	long codtsy;
//	long codtsz;
	int nx;
	int ny;
	int nz;
	int stack1flg0;
	int stack1flg1;
//	int stack1flg2;
//	int stack1flg3;
//	int stack1flg4;	
	long m_longx;
	long m_longy;
	long m_longz;
	int nx2;
	int ny2;
	int nz2;
	int stack2flg0;
	int stack2flg1;
//	int stack2flg2;
//	int stack2flg3;
//	int stack2flg4;	
	long m_longx2;
	long m_longy2;
	long m_longz2;
	double	atte_waitmx;
	double	atte_waitmz;
	double	atte_waitsx;
	double	atte_waitsz;
	double	atte_waity;
	int	waitrdy;
	int	g0flg;
	int	g1flg;
	int g2flg;
	int m_MoldOpen;
	int m_MoldOpened;
	int m_TimerCount;
//	double wait_mx, wait_mz, wait_y, wait_sx, wait_sz;
	double waitposmx, waitposmz, waitposmy, waitpossx, waitpossz;
    double m_codtmx, m_codtmz, m_codtmy, m_codtsx, m_codtsz;
    double m_encmx, m_encmz, m_encmy, m_encsx, m_encsz;
	double m_stmx, m_stmy, m_stmz;
	double m_StackOrgZ, m_StackOrgX, m_StackMovZ, m_StackMovX;

    CString m_encmx_str, m_encmz_str, m_encmy_str, m_encsx_str, m_encsz_str;
	CString m_num;
	int Vac1_Start,   Vac2_Start,   Vac3_Start,   Vac4_Start,   Vac5_Start;
	int Nip_Start, Pin_Start, Side_Start;
	int Vac1_Start_n, Vac2_Start_n, Vac3_Start_n, Vac4_Start_n, Vac5_Start_n;
    int	Nip_Start_n;
	int Vac1_Timer,   Vac2_Timer,   Vac3_Timer,   Vac4_Timer,   Vac5_Timer;
	int Nip_Timer, Pin_Timer, Side_Timer;
	int Vac1_Timer_n, Vac2_Timer_n, Vac3_Timer_n, Vac4_Timer_n, Vac5_Timer_n;
	int Nip_Timer_n;
	int Vac1_Check, Vac2_Check, Vac3_Check, Vac4_Check, Vac5_Check, Nip_Check;
    int Wait1_Start, Wait2_Start;
    int Wait1_Timer, Wait2_Timer;
    int SglBlk, CycleSt, SglCount, DlyChk, CurLine, Hold_Flag;
	int m_Mold_Cur, m_Mold_Set, m_Mold_Total, m_Mold_Stack1, m_Mold_Stack2, m_Mold_Stack1D, m_Mold_Stack2D;
	int m_S1ZDown, m_S1ZUp, m_S2ZDown, m_S2ZUp, m_MZ_Speed, m_Stack_Flag;
	int m_Mold_Close;
	int m_Stack1_Full, m_Stack2_Full, m_Stack1_Num, m_Stack2_Num;
	int m_QC_Num, m_NG_Num;
	int Get_Flag, Across_State;
	WORD OUT0, wInput, wInput0, wInput1, wInput2, wInput3;

//    int Vac1_Timer=0, Vac2_Timer=0, Vac3_Timer=0, Vac4_Timer=0, Vac5_Timer=0;
//    int Ck_Timer=0, Nip_Timer=0;

// Dialog Data
	//{{AFX_DATA(CAutoTeach)
	enum { IDD = IDD_AUTOTEACH };
//	CMyEditFull	m_edit;
	CMyEditFull	m_edit7;
	CListBox m_list1;
//	double	m_atmx;
//	double	m_atmz;
//	double	m_atmsy;
//	double	m_atsx;
//	double	m_atsz;
	CString m_atmx_str;
	CString m_atmz_str;
	CString m_atmsy_str;
	CString m_atsx_str;
	CString m_atsz_str;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAutoTeach)
	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(CAutoTeach)
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnButton2();
	afx_msg void OnChangeEdit1();
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeList1();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButton3();
	afx_msg void OnButton4();
	afx_msg void OnDestroy();
	afx_msg void OnRadio1();
	afx_msg void OnCheck4();
	afx_msg void OnButton41();
	afx_msg void OnButton8();
	afx_msg void OnButton7();
	afx_msg void OnButton6();
	afx_msg void OnButton12();
	afx_msg void OnButton13();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_AUTOTEACH_H__DFA48711_C4D2_4D62_915F_E063C3F25F7C__INCLUDED_)

⌨️ 快捷键说明

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