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

📄 drivce.h

📁 研华板卡通过visual c++多线程进行控制
💻 H
📖 第 1 页 / 共 5 页
字号:
#define FID_FAICheck                   63
#define FID_FAITransfer                64
#define FID_FAIStop                    65
#define FID_FAIWatchdogConfig          66
#define FID_FAIIntWatchdogStart        67
#define FID_FAIDmaWatchdogStart        68
#define FID_FAIWatchdogCheck           69
#define FID_FAOIntStart                70
#define FID_FAODmaStart                71
#define FID_FAOScale                   72
#define FID_FAOLoad                    73
#define FID_FAOCheck                   74
#define FID_FAOStop                    75
#define FID_ClearOverrun               76
#define FID_EnableEvent                77
#define FID_CheckEvent                 78
#define FID_AllocateDMABuffer          79
#define FID_FreeDMABuffer              80
#define FID_EnableCANEvent             81
#define FID_GetCANEventData            82
#define FID_TimerCountSetting		   83
#define FID_CounterPWMSetting 		   84
#define FID_CounterPWMEnable           85
#define FID_DioTimerSetting 		   86
#define FID_EnableEventEx    		   87
#define FID_DICounterReset    		   88
#define FID_FDITransfer                89
#define FID_EnableSyncAO               90
#define FID_WriteSyncAO                91
#define FID_AOCurrentOut               92
#define FID_ADAMCounterSetHWConfig	   93	
#define FID_ADAMCounterGetHWConfig	   94
#define FID_ADAMAISetHWConfig		   95	
#define FID_ADAMAIGetHWConfig		   96
#define FID_ADAMAOSetHWConfig		   97	
#define FID_ADAMAOGetHWConfig		   98
#define FID_GetFIFOSize		           99
#define FID_PWMStartRead	           100
#define FID_FAIDmaExStart              101
#define FID_FAOWaveFormStart		   102 	

typedef struct _DRIVERINFO
{
    struct _DRIVERINFO far * pNext;       // next device info. address
    ULONG       ulDeviceNum;              // device number
    HGLOBAL     hDriverInfo;              // driver info. handle
    USHORT      usUsageCount;             // usage count
    HINSTANCE   hDriverInstance;          // driver instance handle
    FARPROC     lpfnDriverEntry;          // driver entry address
    LONG        hDeviceInfo;              // deivce info. (Lock data)
} DRIVERINFO, FAR * LPDRIVERINFO;

/*************************************************************************
    define gain listing
*************************************************************************/
typedef  struct tagGAINLIST
{
  USHORT   usGainCde;
	FLOAT    fMaxGainVal;
	FLOAT    fMinGainVal;
	CHAR     szGainStr[16];
} GAINLIST;

/*************************************************************************
    Define hardware board(device) features.

    Note: definition for dwPermutaion member

           Bit 0: Software AI
           Bit 1: DMA AI
           Bit 2: Interrupt AI
           Bit 3: Condition AI
           Bit 4: Software AO
           Bit 5: DMA AO
           Bit 6: Interrupt AO
           Bit 7: Condition AO
           Bit 8: Software DI
           Bit 9: DMA DI
           Bit 10: Interrupt DI
           Bit 11: Condition DI
           Bit 12: Software DO
           Bit 13: DMA DO
           Bit 14: Interrupt DO
           Bit 15: Condition DO
           Bit 16: High Gain
           Bit 17: Auto Channel Scan
           Bit 18: Pacer Trigger
           Bit 19: External Trigger
           Bit 20: Down Counter
           Bit 21: Dual DMA
           Bit 22: Monitoring
           Bit 23: QCounter

************************************************************************/
typedef struct tagDEVFEATURES
{
    CHAR     szDriverVer[8];    // device driver version
    CHAR     szDriverName[MAX_DRIVER_NAME_LEN];  // device driver name
    DWORD    dwBoardID;         // board ID
    USHORT   usMaxAIDiffChl;    // Max. number of differential channel
    USHORT   usMaxAISiglChl;    // Max. number of single-end channel
    USHORT   usMaxAOChl;        // Max. number of D/A channel
    USHORT   usMaxDOChl;        // Max. number of digital out channel
    USHORT   usMaxDIChl;        // Max. number of digital input channel
    USHORT   usDIOPort;         // specifies if programmable or not
    USHORT   usMaxTimerChl;     // Max. number of Counter/Timer channel
    USHORT   usMaxAlarmChl;     // Max number of  alram channel
    USHORT   usNumADBit;        // number of bits for A/D converter
    USHORT   usNumADByte;       // A/D channel width in bytes.
    USHORT   usNumDABit;        // number of bits for D/A converter.
    USHORT   usNumDAByte;       // D/A channel width in bytes.
    USHORT   usNumGain ;        // Max. number of gain code
    GAINLIST glGainList[16];    // Gain listing
    DWORD    dwPermutation[4];  // Permutation
} DEVFEATURES, FAR * LPDEVFEATURES;

/*************************************************************************
    AOSET Definition
*************************************************************************/
typedef  struct tagAOSET
{
    USHORT  usAOSource;     // 0-internal, 1-external
    FLOAT   fAOMaxVol;      // maximum output voltage
    FLOAT   fAOMinVol;      // minimum output voltage
    FLOAT   fAOMaxCur;      // maximum output voltage
    FLOAT   fAOMinCur;      // minimum output voltage

} AOSET, FAR * LPAOSET;

/*************************************************************************
    DaughterSet Definition
*************************************************************************/
typedef  struct tagDAUGHTERSET
{
    DWORD   dwBoardID;              // expansion board ID
    USHORT  usNum;                  // available expansion channels
    FLOAT   fGain;                  // gain for expansion channel
    USHORT  usCards;                // number of expansion cards
} DAUGHTERSET, FAR * LPDAUGHTERSET;

/**************************************************************************
    Analog Input Configuration Definition
***************************************************************************/
typedef struct tagDEVCONFIG_AI
{
    DWORD   dwBoardID;         // board ID code
    USHORT  usChanConfig;      // 0-single ended, 1-differential
    USHORT  usGainCtrMode;     // 1-by jumper, 0-programmable
    USHORT  usPolarity;        // 0-bipolar, 1-unipolar
    USHORT  usDasGain;         // not used if GainCtrMode = 1
    USHORT  usNumExpChan;      // DAS channels attached expansion board
    USHORT  usCjcChannel;      // cold junction channel
    DAUGHTERSET Daughter[MAX_DAUGHTER_NUM];   // expansion board settings
} DEVCONFIG_AI, FAR * LPDEVCONFIG_AI;

/**************************************************************************
    DEVCONFIG_COM Definition
***************************************************************************/
typedef struct tagDEVCONFIG_COM
{
    USHORT  usCommPort;                     // serial port
    DWORD   dwBaudRate;                     // baud rate
    USHORT  usParity;                       // parity check
    USHORT  usDataBits;                     // data bits
    USHORT  usStopBits;                     // stop bits
    USHORT  usTxMode;                       // transmission mode
    USHORT  usPortAddress;                  // communication port address
} DEVCONFIG_COM, FAR * LPDEVCONFIG_COM;

/**************************************************************************
    TRIGLEVEL Definition
***************************************************************************/
typedef struct tagTRIGLEVEL
{
	FLOAT fLow;
	FLOAT fHigh;
} TRIGLEVEL;


typedef struct tagPT_DEVLIST
{
    DWORD   dwDeviceNum;
    char    szDeviceName[50];
    SHORT   nNumOfSubdevices;
} DEVLIST, FAR *LPDEVLIST;

typedef struct tagPT_DeviceGetFeatures
{
    LPDEVFEATURES  buffer;
    USHORT         size;
} PT_DeviceGetFeatures, FAR * LPT_DeviceGetFeatures;

typedef struct tagPT_AIConfig
{
    USHORT      DasChan;
    USHORT      DasGain;
} PT_AIConfig, FAR * LPT_AIConfig;

typedef struct tagPT_AIGetConfig
{
    LPDEVCONFIG_AI buffer;
    USHORT         size;
} PT_AIGetConfig, FAR * LPT_AIGetConfig;

typedef struct tagPT_AIBinaryIn
{
    USHORT      chan;
    USHORT      TrigMode;
    USHORT far  *reading;
} PT_AIBinaryIn, FAR * LPT_AIBinaryIn;

typedef struct tagPT_AIScale
{
    USHORT      reading;
    FLOAT       MaxVolt;
    USHORT      MaxCount;
    USHORT      offset;
    FLOAT far   *voltage;
} PT_AIScale, FAR * LPT_AIScale;

typedef struct tagPT_AIVoltageIn
{
    USHORT      chan;
    USHORT      gain;
    USHORT      TrigMode;
    FLOAT far   *voltage;
} PT_AIVoltageIn, FAR * LPT_AIVoltageIn;

typedef struct tagPT_AIVoltageInExp
{
    USHORT      DasChan;
    USHORT      DasGain;
    USHORT      ExpChan;
    FLOAT far   *voltage;
} PT_AIVoltageInExp, FAR * LPT_AIVoltageInExp;

typedef struct tagPT_MAIConfig
{
    USHORT      NumChan;
    USHORT      StartChan;
    USHORT far  *GainArray;
} PT_MAIConfig, FAR * LPT_MAIConfig;

typedef struct tagPT_MAIBinaryIn
{
    USHORT      NumChan;
    USHORT      StartChan;
    USHORT      TrigMode;
    USHORT far  *ReadingArray;
} PT_MAIBinaryIn, FAR * LPT_MAIBinaryIn;

typedef struct tagPT_MAIVoltageIn
{
    USHORT      NumChan;
    USHORT      StartChan;
    USHORT far  *GainArray;
    USHORT      TrigMode;
    FLOAT far   *VoltageArray;
} PT_MAIVoltageIn, FAR * LPT_MAIVoltageIn;

typedef struct tagPT_MAIVoltageInExp
{
    USHORT      NumChan;
    USHORT far  *DasChanArray;
    USHORT far  *DasGainArray;
    USHORT far  *ExpChanArray;
    FLOAT far   *VoltageArray;
} PT_MAIVoltageInExp, FAR * LPT_MAIVoltageInExp;

typedef struct tagPT_TCMuxRead
{
    USHORT      DasChan;
    USHORT      DasGain;
    USHORT      ExpChan;
    USHORT      TCType;
    USHORT      TempScale;
    FLOAT far   *temp;
} PT_TCMuxRead, FAR * LPT_TCMuxRead;

typedef struct tagPT_AOConfig
{
    USHORT      chan;
    USHORT      RefSrc;
    FLOAT       MaxValue;
    FLOAT       MinValue;
} PT_AOConfig, FAR * LPT_AOConfig;

typedef struct tagPT_AOBinaryOut
{
    USHORT      chan;
    USHORT      BinData;
} PT_AOBinaryOut, FAR * LPT_AOBinaryOut;

typedef struct tagPT_AOVoltageOut
{
    USHORT      chan;
    FLOAT       OutputValue;
} PT_AOVoltageOut, FAR * LPT_AOVoltageOut;

typedef struct tagPT_AOScale
{
    USHORT      chan;
    FLOAT       OutputValue;
    USHORT far  *BinData;
}PT_AOScale,    FAR * LPT_AOScale;

typedef struct tagPT_DioSetPortMode
{
    USHORT      port;
    USHORT      dir;
} PT_DioSetPortMode, FAR * LPT_DioSetPortMode;

typedef struct tagPT_DioGetConfig
{
    SHORT far      *PortArray;
    USHORT         NumOfPorts;
} PT_DioGetConfig, FAR * LPT_DioGetConfig;

typedef struct tagPT_DioReadPortByte
{
    USHORT      port;
    USHORT far  *value;
} PT_DioReadPortByte, FAR * LPT_DioReadPortByte;

typedef struct tagPT_DioWritePortByte
{
    USHORT      port;
    USHORT      mask;
    USHORT      state;

⌨️ 快捷键说明

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