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

📄 unit1.h

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "..\..\..\..\..\Include\Driver.h"
#include "..\..\..\..\..\Include\paras.h"
#include "..\..\..\..\..\Include\event.h"

#define  TIMER_BASE_50KHZ 50000.0L
#define  TIMER_BASE_5KHZ  5000.0L
#define  TIMER_BASE_500HZ 500.0L
#define  TIMER_BASE_50HZ  50.0L
#define  TIMER_BASE_5HZ   5.0L

//---------------------------------------------------------------------------
class EventThread : public TThread
{
private:
protected:
        void __fastcall Execute();
public:
        __fastcall EventThread(bool CreateSuspended);
};
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published:	// IDE-managed Components
        TGroupBox *GroupBox1;
        TEdit *editDevName;
        TButton *btnSelDev;
        TGroupBox *GroupBox2;
        TButton *btnSetTimer;
        TLabel *Label1;
        TEdit *editTimerInt;
        TEdit *editRealTimer;
        TLabel *labUnit;
        TGroupBox *GroupBox4;
        TLabel *Label3;
        TEdit *editEventCount;
        TButton *btnEnable;
        TButton *btnDisable;
        TLabel *Label4;
        TButton *btnClose;
        TRadioButton *radUs;
        TRadioButton *radMs;
        TRadioButton *radS;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall btnSelDevClick(TObject *Sender);
        void __fastcall btnSetTimerClick(TObject *Sender);
        void __fastcall radUsClick(TObject *Sender);
        void __fastcall radMsClick(TObject *Sender);
        void __fastcall radSClick(TObject *Sender);
        void __fastcall btnEnableClick(TObject *Sender);
        void __fastcall btnDisableClick(TObject *Sender);
        void __fastcall btnCloseClick(TObject *Sender);
private:	// User declarations
        LRESULT m_ErrCde;
        LONG    m_DriverHandle;
        ULONG   m_ulDevNum;
        char    m_szErrMsg[80];
        BOOL    m_bContinue;
        USHORT  m_Unit;
        void*   m_pThreadHandle;
        EventThread *pEventThread;

public:		// User declarations
        __fastcall TForm2(TComponent* Owner);
        void CheckEvent();    // Event checking
        void KillThread();    // Kill the thread
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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