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

📄 driver.h

📁 研华数据采集卡PCI1713,PCI1720,PCL730测试程序
💻 H
📖 第 1 页 / 共 5 页
字号:
           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
} 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;
} PT_DioWritePortByte, FAR * LPT_DioWritePortByte;

typedef struct tagPT_DioReadBit
{
    USHORT      port;
    USHORT      bit;
    USHORT far  *state;
} PT_DioReadBit, FAR * LPT_DioReadBit;

typedef struct tagPT_DioWriteBit
{
    USHORT      port;
    USHORT      bit;
    USHORT      state;
} PT_DioWriteBit, FAR * LPT_DioWriteBit;

typedef struct tagPT_DioGetCurrentDOByte
{
    USHORT      port;
    USHORT far  *value;
} PT_DioGetCurrentDOByte, FAR * LPT_DioGetCurrentDOByte;

typedef struct tagPT_DioGetCurrentDOBit
{
    USHORT      port;
    USHORT      bit;
    USHORT far  *state;
} PT_DioGetCurrentDOBit, FAR * LPT_DioGetCurrentDOBit;


typedef struct tagPT_WritePortByte
{
    USHORT      port;
    USHORT      ByteData;
} PT_WritePortByte, FAR * LPT_WritePortByte;

typedef struct tagPT_WritePortWord
{
    USHORT      port;
    USHORT      WordData;
} PT_WritePortWord, FAR * LPT_WritePortWord;

typedef struct tagPT_ReadPortByte
{
    USHORT      port;
    USHORT far  *ByteData;
} PT_ReadPortByte, FAR * LPT_ReadPortByte;

typedef struct tagPT_ReadPortWord
{
    USHORT      port;
    USHORT far  *WordData;
} PT_ReadPortWord, FAR * LPT_ReadPortWord;

typedef struct tagPT_CounterEventStart
{
    USHORT      counter;
    USHORT      GateMode;
} PT_CounterEventStart, FAR * LPT_CounterEventStart;

typedef struct tagPT_CounterEventRead
{
    USHORT      counter;
    USHORT far  *overflow;
    ULONG far   *count;
} PT_CounterEventRead, FAR * LPT_CounterEventRead;

typedef struct tagPT_CounterFreqStart
{
    USHORT      counter;

⌨️ 快捷键说明

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