?? i7000.bas
字號:
Attribute VB_Name = "i7000"
Option Explicit
'------------------------ Error Message ------------------
Global Const NoError = 0
Global Const FunctionError = 1
Global Const PortError = 2
Global Const BaudRateError = 3
Global Const DataError = 4
Global Const StopError = 5
Global Const ParityError = 6
Global Const CheckSumError = 7
Global Const ComPortNotOpen = 8
Global Const SendThreadCreateError = 9
Global Const SendCmdError = 10
Global Const ReadComStatusError = 11
Global Const ResultStrCheckError = 12
Global Const CmdError = 13
Global Const TimeOut = 15
Global Const ModuleIdError = 17
Global Const AdChannelError = 18
Global Const UnderInputRange = 19
Global Const ExceedInputRange = 20
Global Const InvalidateCounterNo = 21
Global Const InvalidateCounterValue = 22
'---------------------- UART.DLL -----------------------------------------------
Declare Function Get_Uart_Version Lib "uart.dll" () As Integer
Declare Function Open_Com Lib "uart.dll" (ByVal port As Integer, ByVal BaudRate As Long, ByVal cData As Byte, ByVal cParity As Byte, ByVal cStop As Byte) As Integer
Declare Function Change_Baudrate Lib "uart.dll" (ByVal port As Integer, ByVal lBaudrate As Long) As Integer
Declare Function Change_Config Lib "uart.dll" (ByVal port As Integer, ByVal BaudRate As Long, ByVal cData As Byte, ByVal cParity As Byte, ByVal cStop As Byte) As Integer
Declare Function Get_Com_Status Lib "uart.dll" (ByVal port As Integer) As Integer
Declare Function Close_Com Lib "uart.dll" (ByVal port As Integer) As Boolean
Declare Function Send_Binary Lib "uart.dll" (ByVal port As Integer, ByRef szBuf As Byte, ByVal length As Integer) As Integer
Declare Function Receive_Binary Lib "uart.dll" (ByVal port As Integer, ByRef szResult As Byte, ByVal TimeOut As Integer, ByVal length As Integer, wT As Integer) As Integer
'Receive_Binary(unsigned char cPort, char szResult[], WORD wTimeOut, WORD wLen, WORD *wT)
Declare Function Send_Cmd Lib "uart.dll" (ByVal port As Integer, ByVal Cmd As String, ByVal wChkSum As Integer) As Integer
Declare Function Receive_Cmd Lib "uart.dll" (ByVal port As Integer, ByVal szResult As String, ByVal TimeOut As Integer, ByVal Checksum As Integer, wT As Integer) As Integer
Declare Function Send_Receive_Cmd Lib "uart.dll" (ByVal port As Integer, ByVal szCmd As String, ByVal szResult As String, ByVal TimeOut As Integer, ByVal Checksum As Integer, wT As Integer) As Integer
Declare Function Send_Receive_Binary Lib "uart.dll" (ByVal port As Integer, ByRef CmdByte As Byte, ByVal in_Len As Integer, ByRef ResultByte As Byte, ByVal out_Len As Integer, ByVal wTimeOut As Integer) As Integer
Declare Function ModbusGetCRC16 Lib "uart.dll" (ByRef puchMsg As Byte, ByRef crc As Byte, ByVal DataLen As Integer) As Integer
'---------------------- I7000.DLL --------------------------------------------
Declare Function Get_Dll_Version Lib "I7000.dll" () As Integer
Declare Function GetChCount_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByRef wDICh As Integer, ByRef wDOCh As Integer, ByRef wAICh As Integer, ByRef wAOCh As Integer) As Integer
Declare Function DigitalOutAll_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wGroupCount As Integer, ByRef wDO As Long) As Integer
Declare Function DigitalOutGroup_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wGroupIndex As Integer, ByVal wDO As Long) As Integer
Declare Function DigitalOutBit_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wBitIndex As Integer, ByVal wDO As Integer) As Integer
Declare Function DigitalIOReadBackAll_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByRef wDO As Long, ByRef wDI As Long) As Integer
Declare Function DigitalIOReadBackGroup_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wType As Integer, ByVal wGroupIndex As Integer, ByRef wIOValue As Long) As Integer
Declare Function DigitalIOReadBackBit_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wType As Integer, ByVal wBitIndex As Integer, ByRef wIOBit As Integer) As Integer
Declare Function DigitalOnLineStatus_FR Lib "I7000.dll" (ByVal bPort As Byte, ByVal bAdd As Byte, ByVal bcheck As Byte, ByVal wTimeOut As Integer, ByVal wType As Integer, ByRef wDIOStatus As Integer) As Integer
Declare Function ReadConfigStatus Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function Test Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogIn Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogInFsr Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogInHex Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogIn8 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogInAll Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function In8_7017 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogOut Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function AnalogOutReadBack Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalOut Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalOut_7016 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalOutReadBack Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalIn Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalInCounterRead Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ClearDigitalInCounter Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DigitalInLatch Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ClearDigitalInLatch Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ThermocoupleOpen_7011 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function EnableAlarm Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DisableAlarm Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ClearLatchAlarm Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function SetAlarmLimitValue Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadAlarmLimitValue Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadOutputAlarmState Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadEventCounter Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ClearEventCounter Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function SetLedDisplay_7033 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function GetLedDisplay_7033 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function SetLedDisplay Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function GetLedDisplay Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function SetupLinearMapping Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function DisableLinearMapping Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function EnableLinearMapping Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadLinearMappingStatus Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadSourceValueOfLM Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadTargetValueOfLM Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function CounterIn_7080 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function ReadCounterMaxValue_7080 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String) As Integer
Declare Function SetCounterMaxValue_7080 Lib "I7000.dll" (w7000 As Integer, f7000 As Single, ByVal SendTo7000 As String, ByVal ReceiveFrom7000 As String, ByVal MaxValue As Double) As Integer
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -