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

📄 driver.pas

📁 温度恒温控制,与PLC,工控板通讯,实现炉字过程控制.
💻 PAS
📖 第 1 页 / 共 5 页
字号:

 {-----------------------2.0B--------------------------}
 { 2.0c mask, declare it later
 PT_DeviceGetParam = Record
    nID        : Smallint;
    nSize      : ^Longint;
    pBuffer    : ^Longint;
 End;
 }
 {-----------------------2.0B--------------------------}

 
{ ************************************************************************ }
{    DaughterSet Definition                                                }
{ ************************************************************************ }
 DAUGHTERSET = Record
    dwBoardID : Longint;              { expansion board ID }
    usNum     : Smallint;              { available expansion channels }
    fGain     : Single;               { gain for expansion channel }
    usCards   : Smallint;              { number of expansion cards }
 End;

{ ************************************************************************ }
{    Analog Input Configuration Definition                                 }
{ ************************************************************************ }
 DEVCONFIG_AI = Record
    dwBoardID     : Longint;     { board ID code                         }
    ulChanConfig  : Longint;     { 0-single ended, 1-differential        }
    usGainCtrMode : Smallint;     { 1-by jumper, 0-programmable           }
    usPolarity    : Smallint;     { 0-bipolar, 1-unipolar                 }
    usDasGain     : Smallint;     { not used if GainCtrMode = 1           }
    usNumExpChan  : Smallint;     { DAS channels attached expansion board }
    usCjcChannel  : Smallint;     { cold junction channel                 }
    Daughter: array [0..MAX_DAUGHTER_NUM-1] of DAUGHTERSET ;  { expansion board settings }
    ulChanConfigEx: array [0..3] of Longint; { Extension the channel configuration, so we can max support 128 AI channels' setting. }

 End;

{ ************************************************************************ }
{    DEVCONFIG_COM Definition                                              }
{ ************************************************************************ }
 DEVCONFIG_COM = Record
    usCommPort    : Smallint;                { serial port  }
    dwBaudRate    : Longint;                 { baud rate    }
    usParity      : Smallint;                { parity check }
    usDataBits    : Smallint;                { data bits    }
    usStopBits    : Smallint;                { stop bits    }
    usTxMode      : Smallint;                { transmission mode }
    usPortAddress : Smallint;                { communication port address }
 End;

{ ************************************************************************ }
{    TRIGLEVEL Definition                                                  }
{ ************************************************************************ }
 TRIGLEVEL = Record
  fLow  : Single;
  fHigh : Single;
 End;


 PT_DEVLIST = Record
    dwDeviceNum      : Longint;
    szDeviceName     : array [0..49] of char;
    nNumOfSubdevices : Smallint;
 End;

 PT_DeviceGetFeatures  = Record
    buffer : Pointer;        { LPDEVFEATURES }
    size   : Smallint;
 End;

 PT_AIConfig  = Record
    DasChan : Smallint;
    DasGain : Smallint;
 End;

 PT_AIGetConfig  = Record
    buffer : Pointer;        { LPDEVCONFIG_AI }
    size   : Smallint;
 End;

 PT_AIBinaryIn  = Record
    chan     : Smallint;
    TrigMode : Smallint;
    reading  : Pointer;      { USHORT far *reading }
 End;

 PT_AIScale  = Record
    reading  : Smallint;
    MaxVolt  : Single;
    MaxCount : Smallint;
    offset   : Smallint;
    voltage  : ^Single;      { Float far *Voltage }
 End;

 PT_AIVoltageIn  = Record
    chan : Smallint;
    gain : Smallint;
    TrigMode : Smallint;
    voltage  : ^Single;      { Float far *Voltage }
 End;

 PT_AIVoltageInExp  = Record
    DasChan : Smallint;
    DasGain : Smallint;
    ExpChan : Smallint;
    voltage : ^Single;      { Float far *Voltage }
 End;

 PT_MAIConfig  = Record
    NumChan   : Smallint;
    StartChan : Smallint;
    GainArray : ^Smallint;  { USHORT far *Reading }
 End;

 PT_MAIBinaryIn  = Record
    NumChan      : Smallint;
    StartChan    : Smallint;
    TrigMode     : Smallint;
    ReadingArray : ^Single; { USHORT far *Reading }
 End;

 PT_MAIVoltageIn  = Record
    NumChan   : Smallint;
    StartChan : Smallint;
    GainArray : ^Smallint;  { Float far *VoltageArray }
    TrigMode  : Smallint;
    VoltageArray : ^Single;  { Float far *VoltageArray }
 End;

 PT_MAIVoltageInExp  = Record
    NumChan : Smallint;
    DasChanArray : ^Smallint;  { USHORT far *DasChanArray }
    DasGainArray : ^Smallint;  { USHORT far *DasGainArray }
    ExpChanArray : ^Smallint;  { USHORT far *ExpChanArray }
    VoltageArray : ^Single;    { Float  far *VoltageArray }
 End;

 PT_TCMuxRead  = Record
    DasChan   : Smallint;
    DasGain   : Smallint;
    ExpChan   : Smallint;
    TCType    : Smallint;
    TempScale : Smallint;
    temp      : ^Single;       { FLOAT far *temp }
 End;

 PT_AOConfig  = Record
    chan : Smallint;
    RefSrc : Smallint;
    MaxValue : Single;
    MinValue : Single;
 End;

 PT_AOBinaryOut  = Record
    chan : Smallint;
    BinData : Smallint;
 End;

 PT_AOVoltageOut  = Record
    chan : Smallint;
    OutputValue : Single;
 End;

 PT_AOScale  = Record
    chan        : Smallint;
    OutputValue : Single;
    BinData     : ^Smallint;   { USHORT far *BinData }
 End;

 PT_DioSetPortMode  = Record
    port : Smallint;
    dir  : Smallint;
 End;

 PT_DioGetConfig  = Record
    PortArray : ^Smallint;     { SHORT far *PortArray }
    NumOfPorts : Smallint;
 End;

 PT_DioReadPortByte  = Record
    port : Smallint;
    value: ^Smallint;          { USHORT far *value }
 End;

 PT_DioWritePortByte  = Record
    port : Smallint;
    mask : Smallint;
    state : Smallint;
 End;

 PT_DioReadBit  = Record
    port  : Smallint;
    bit   : Smallint;
    state : ^Smallint;
 End;

 PT_DioWriteBit  = Record
    port  : Smallint;
    bit   : Smallint;
    state : Smallint;
 End;

 PT_DioGetCurrentDOByte  = Record
    port : Smallint;
    value: ^Smallint;    { USHORT far *state }
 End;

 PT_DioGetCurrentDOBit   = Record
    port  : Smallint;
    bit   : Smallint;
    state : ^Smallint;   { USHORT far *state }
 End;

 PT_WritePortByte  = Record
    port     : Smallint;
    ByteData : Smallint;
 End;

 PT_WritePortWord  = Record
    port     : Smallint;
    WordData : Smallint;
 End;

 {-------------- 2.0C ---------------}
 PT_WritePortDword  = Record
    port     : Smallint;
    WordData : Longint;
 End;
 {-------------- 2.0C ---------------}

 PT_ReadPortByte   = Record
    port     : Smallint;
    ByteData : ^Longint;
 End;

 PT_ReadPortWord  = Record
    port     : Smallint;
    WordData : ^Longint;
 End;

 {-------------- 2.0C ---------------}
 PT_ReadPortDword  = Record
    port     : Smallint;
    WordData : ^Longint;
 End;
 {-------------- 2.0C ---------------}

 PT_CounterEventStart  = Record
    counter  : Smallint;
    GateMode : Smallint;
 End;

 PT_CounterEventRead  = Record
    counter  : Smallint;
    overflow : ^Smallint;       { USHORT far *overflow }
    count    : ^Longint;      { ULONG far *count }
 End;

 PT_CounterFreqStart  = Record
    counter    : Smallint;
    GatePeriod : Smallint;
    GateMode   : Smallint;
 End;

 PT_CounterFreqRead  = Record
    counter : Smallint;
    freq    : ^Single;       { FLOAT far *freq }
 End;

 PT_CounterPulseStart  = Record
    counter  : Smallint;
    period   : Single;
    UpCycle  : Single;
    GateMode : Smallint;
 End;

 PT_QCounterConfig  = Record
    counter       : Smallint;
    LatchSrc      : Smallint;
    LatchOverflow : Smallint;
    ResetOnLatch  : Smallint;
    ResetValue    : Smallint;
 End;

 PT_QCounterConfigSys  = Record
    SysClock    : Smallint;
    TimeBase    : Smallint;
    TimeDivider : Smallint;
    CascadeMode : Smallint;
 End;

 PT_QCounterStart  = Record
    counter   : Smallint;
    InputMode : Smallint;
 End;

 PT_QCounterRead   = Record
    counter  : Smallint;
    overflow : ^Smallint;      { USHORT far * }
    LoCount  : ^Longint;       { ULONG far * }
    HiCount  : ^Longint;       { ULONG far * }
 End;

 PT_AlarmConfig  = Record
    chan    : Smallint;
    LoLimit : Single;
    HiLimit : Single;
 End;

 PT_AlarmEnable  = Record
    chan      : Smallint;
    LatchMode : Smallint;
    enabled   : Smallint;
 End;

 PT_AlarmCheck   = Record
    chan    : Smallint;
    LoState : ^Smallint;       { USHORT far * }
    HiState : ^Smallint;       { USHORT far * }
 End;

 PT_WDTEnable  = Record
    message     : Smallint;
    Destination : Longint;     { HWND }
 End;

 PT_FAIIntStart = Record
    TrigSrc    : Smallint;
    SampleRate : Longint;
    chan       : Smallint;
    gain       : Smallint;
    buffer     : ^Smallint;

⌨️ 快捷键说明

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