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

📄 diodform.h

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

#ifndef DIOWFormH
#define DIOWFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "..\..\..\include\Driver.h"
//---------------------------------------------------------------------------
class TMainFrm : public TForm
{
__published:	// IDE-managed Components
                TGroupBox *DigitalOutput;
        TCheckBox *chkD0;
        TCheckBox *chkD1;
        TCheckBox *chkD2;
        TCheckBox *chkD3;
        TCheckBox *chkD4;
        TCheckBox *chkD5;
        TCheckBox *chkD6;
        TCheckBox *chkD7;
        TCheckBox *chkD15;
        TCheckBox *chkD14;
        TCheckBox *chkD13;
        TCheckBox *chkD12;
        TCheckBox *chkD11;
        TCheckBox *chkD10;
        TCheckBox *chkD9;
        TCheckBox *chkD8;
        TCheckBox *chkD23;
        TCheckBox *chkD22;
        TCheckBox *chkD21;
        TCheckBox *chkD20;
        TCheckBox *chkD19;
        TCheckBox *chkD18;
        TCheckBox *chkD17;
        TCheckBox *chkD16;
        TCheckBox *chkD31;
        TCheckBox *chkD30;
        TCheckBox *chkD29;
        TCheckBox *chkD28;
        TCheckBox *chkD27;
        TCheckBox *chkD26;
        TCheckBox *chkD25;
        TCheckBox *chkD24;
        TButton *btnWrite;
        TButton *btnDWrite;
        TButton *btnRead;
        TButton *btnDRead;
        TButton *btnExit;
        TLabel *Label2;
        TEdit *txtReadMask;
        TLabel *Label1;
        TEdit *txtReadData;
        TLabel *Label8;
        TEdit *txtWriteDMask;
        TLabel *Label9;
        TEdit *txtReadDMask;
        TLabel *Label10;
        TEdit *txtReadDData;
        TGroupBox *Channel;
        TGroupBox *GroupBox13;
        TLabel *Label11;
        TLabel *Label12;
        TGroupBox *PortInput;
        TLabel *Label3;
        TLabel *Label13;
        TEdit *txtWriteMask;
        TLabel *Hex;
        TLabel *Label14;
        TLabel *Label15;
        TLabel *Label16;
        TLabel *Label17;
        TLabel *Label22;
        TEdit *txtDeviceName;
        TButton *btnSelectDevice;
        TComboBox *cbbPortNum;
        TButton *btnGetD;
        TButton *btnGetDD;
        TGroupBox *GroupBox1;
        TLabel *Label4;
        TEdit *txtGetDODMask;
        TLabel *Label21;
        TEdit *txtGetDOMask;
        TLabel *Label7;
        TLabel *Label20;
        TLabel *Label5;
        TEdit *txtGetCurrentDO;
        TLabel *Label18;
        TLabel *Label19;
        TEdit *txtGetCurrentDOD;
        TLabel *Label6;
        
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall btnSelDevClick(TObject *Sender);
        void __fastcall btnExitClick(TObject *Sender);
        void __fastcall txtKeyPress(TObject *Sender, char &Key);
        void __fastcall btnWriteClick(TObject *Sender);
        void __fastcall btnDWriteClick(TObject *Sender);
        void __fastcall btnGetDClick(TObject *Sender);
        void __fastcall btnGetDDClick(TObject *Sender);
        void __fastcall btnReadClick(TObject *Sender);
        void __fastcall btnDReadClick(TObject *Sender);
        void __fastcall btnSelectDeviceClick(TObject *Sender);
        void __fastcall btnPortNum(TObject *Sender);

private:	// User declarations
public:		// User declarations
        __fastcall TMainFrm(TComponent* Owner);
        
	DEVFEATURES m_DeviceFeatures;
        PT_DioReadPortWord      m_ptDioReadPortWord;     //DioReadPortWord table
        PT_DioWritePortWord     m_ptDioWritePortWord;    //DioWritePortWord table
        PT_DioReadPortDword     m_ptDioReadPortDword;    //DioReadPortDword table
        PT_DioWritePortDword    m_ptDioWritePortDword;   //DioWritePortDword table
        PT_DioGetCurrentDOWord	m_ptDioGetCurrentDOWord; //DioGetCurrentDOWord table
        PT_DioGetCurrentDODword m_ptDioGetCurrentDODword;//DioGetCurrentDODword table

	int m_DOChanNum;
        int m_DIChanNum;
        int m_ChanNum;


        ULONG m_ulDevNum;
 	LRESULT m_ErrCde;                                 //Return Eror Code
	LONG  m_DeviceHandle;                             //driver handle
	char szErrMsg[80];                              //Use for MessageBox function

        ULONG  ulDataLength;

        ULONG m_DeviceNum;

        ULONG       m_PortNum;
        int         m_DOPortNum;
        int         m_DIPortNum;
        USHORT      m_DiValue;								// read port Word  value
        ULONG       m_DDiValue;								// read port DWord value
        USHORT	    m_ValidMask;							// read port Word  valid mask
        ULONG	    m_DValidMask;							// read port DWord valid mask
        ULONG       m_DoState;                  // write port data
        USHORT	    m_WriteMask;	        // write port Word  mask
        ULONG	    m_DWriteMask;		// write port DWord mask
        USHORT	    m_GetDOValue;
        ULONG	    m_DGetDOValue;
        TCheckBox * gwCheckBox[32];            // Record TcheckBox

        int i;
        AnsiString szBuff;
};
//---------------------------------------------------------------------------
extern PACKAGE TMainFrm *MainFrm;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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