亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? opcserverclass.cls

?? vb開發的一個opcclient源代碼
?? CLS
?? 第 1 頁 / 共 3 頁
字號:
    
ShowOPCLastUpdateTimeError:
    Call DisplayOPC_COM_ErrorValue("LastUpdate", Err.Number)
    GetLastUpdateTime = False
    
SkipOPCLastUpdateTimeError:
End Function


' Get the major version number of the connected server
'
Function GetMajorVersion(ByRef MajorVersion As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCMajorVersionError
    
    ' Attempt to get the server MajorVersion.
    MajorVersion = OPCServerObj.MajorVersion
    GetMajorVersion = True
    GoTo SkipOPCMajorVersionError
    
ShowOPCMajorVersionError:
    Call DisplayOPC_COM_ErrorValue("MajorVersion", Err.Number)
    GetMajorVersion = False
    
SkipOPCMajorVersionError:
End Function


' Get the minor version number of the connected server
'
Function GetMinorVersion(ByRef MinorVersion As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCMinorVersionError
    
    ' Attempt to get the server MinorVersion.
    MinorVersion = OPCServerObj.MinorVersion
    GetMinorVersion = True
    GoTo SkipOPCMinorVersionError
    
ShowOPCMinorVersionError:
    Call DisplayOPC_COM_ErrorValue("MinorVersion", Err.Number)
    GetMinorVersion = False
    
SkipOPCMinorVersionError:
End Function


' Get the build number of the connected server
'
Function GetBuildNumber(ByRef BuildNumber As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCBuildNumberError
    
    ' Attempt to get the server BuildNumber.
    BuildNumber = OPCServerObj.BuildNumber
    GetBuildNumber = True
    GoTo SkipOPCBuildNumberError
    
ShowOPCBuildNumberError:
    Call DisplayOPC_COM_ErrorValue("BuildNumber", Err.Number)
    GetBuildNumber = False
    
SkipOPCBuildNumberError:
End Function


' Get the Vendor Info of the connected server
' The vendor info will return a string describing the
' name of the vendor of the OPC server.  In some cases this string
' will return the name of the OPC Server toolkit vendor if
' the connected OPC server uses a toolkit.
'
Function GetVendorInfo(ByRef VendorInfo As String)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCVendorInfoError
        
    ' Attempt to get the server VendorInfo.
    VendorInfo = OPCServerObj.VendorInfo
    GetVendorInfo = True
    GoTo SkipOPCVendorInfoError
    
ShowOPCVendorInfoError:
    Call DisplayOPC_COM_ErrorValue("VendorInfo", Err.Number)
    GetVendorInfo = False
    
SkipOPCVendorInfoError:
End Function


' Get the Server State property of the connected server
' The value retured will be one of the following
' OPC_STATUS_RUNNING      - 1 - Server is running normally
' OPC_STATUS_FAILED       - 2 - Vendor specific fatal error has occured
' OPC_STATUS_NOCONFIG     - 3 - Server Running but no Configuration Data available
' OPC_STATUS_SUSPENDED    - 4 - Server is suspended and not receiving data
' OPC_STATUS_TEST         - 5 - Server in test mode
' OPC_STATUS_DISCONNECTED - 6 - Server has disconnected
'
Function GetServerState(ByRef ServerState As Long)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCServerStateError
    
    ' Attempt to get the server ServerState.
    ServerState = OPCServerObj.ServerState
    GetServerState = True
    GoTo SkipOPCServerStateError
    
ShowOPCServerStateError:
    Call DisplayOPC_COM_ErrorValue("ServerState", Err.Number)
    GetServerState = False
    
SkipOPCServerStateError:
End Function

' This function returns an OPC browse object from the server object
' held in this instance of the OPCServerClass.  This function may return
' a true condition indicating that the function succeeded, however the
' the OPCBrowserObject may still be set to Nothing if the connected
' server does not support browsing.  With that in mind check the
' returned object for "Nothing" before use.

Function GetServerBrowseObject(ByRef OPCBrowserObject As OPCBrowserClass)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCBrowserError
    
    Dim OPCBrowserObj As OPCBrowser
        
    ' Attempt to get the server browse object
    Set OPCBrowserObj = OPCServerObj.CreateBrowser
    If Not OPCBrowserObj Is Nothing Then
        Set OPCBrowserObject = New OPCBrowserClass
        OPCBrowserObject.SetBrowserObject OPCBrowserObj
    Else
        Set OPCBrowserObject = Nothing
    End If
    GetServerBrowseObject = True
    GoTo SkipOPCBrowserError
    
ShowOPCBrowserError:
    Call DisplayOPC_COM_ErrorValue("Browser Object", Err.Number)
    GetServerBrowseObject = False
    
SkipOPCBrowserError:
End Function

' The next section of this module covers the management of OPC groups
' within the OPCServerClass object. When adding an OPC group the initial
' state of the groups atrributes must be set.  A group has the following
' attributes, GroupName, Update Rate, DeadBand, and ActiveState.  The
' actual ServerGroups.Add function only allows you to specify the group
' name when adding a new group.  To set the attributes listed above you
' can use the Set Default functions that follow to establish the initial
' conditions for a new group.



' The SetDefaultGroupIsActive allows you to set the default active
' condition on the ServerGroups object determining the active
' state of a newly added group.  Once a group is added you can change
' these attributes by using the functions found in the OPCGroupClass
' object. The active state of a group allows you to literally turn the
' data in this group on or off.  For the OPC server this means that
' your application either needs the data in the group(On/Active) or
' it doesn't(Off/Inactive).  Using the active state of the group
' your VB application can tailor how much data the OPC server is trying
' read from your devices.  By turing a group off that you don't
' currently need you can reduce the amount of data the OPC server is
' reading from a device.  This of course has the benefit of increasing
' the performance of the OPC server for the data items that you do still
' need to acquire.  I recommend using the active state of the group or
' of the item(shown later), instead of continuously adding and removing
' items from a group as a means of controlling what data the OPC server
' is gathering from the devices.
'
Function SetDefaultGroupIsActive(ByVal State As Boolean)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCDefaultGroupIsActiveError
    
    ServerGroups.DefaultGroupIsActive = State
    SetDefaultGroupIsActive = True
    GoTo SkipOPCDefaultGroupIsActiveError
    
ShowOPCDefaultGroupIsActiveError:
    Call DisplayOPC_COM_ErrorValue("DefaultGroupIsActive", Err.Number)
    SetDefaultGroupIsActive = False
    
SkipOPCDefaultGroupIsActiveError:
End Function


' The SetDefaultGroupUpdateRate allows you to set the default UpdateRate
' condition on the ServerGroups object determining the Update Rate
' of a newly added group.  Once a group is added you can change
' these attributes by using the functions found in the OPCGroupClass
' object. The update rate is entered in milliseconds.  The range is
' 0 to 2147483647 milliseconds which is about 596 hours. Entering
' value of 0 tells the OPC server you want it to acquire data in this
' group as fast as possible.  The update rate on a group is very
' powerful tool for optimizing your application's communications.
' If you set every group you add to a server to an update interval of
' 0 the server will attempt to gather all of your data as quickly as
' possible.  If all of your data requires the best possible update
' speed then this is probably OK.  But what if some of your data doesn't
' really change but once every 10 minutes or so.  To read this as fast
' as possible would waste a considerable amount of the communications
' bandwidth of your OPC server.  Since the OPC server allows you to add
' multiple groups to the server you can separate your data into separate
' groups, with each group having its own update rate.  In this way fast
' data can be gathered quickly and slow data can be gathered slowly.
'
Function SetDefaultGroupUpdateRate(ByVal Rate As Long)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCDefaultUpdateRateError
    
    ServerGroups.DefaultGroupUpdateRate = Rate
    SetDefaultGroupUpdateRate = True
    GoTo SkipOPCDefaultUpdateRateError
    
ShowOPCDefaultUpdateRateError:
    Call DisplayOPC_COM_ErrorValue("SetDefaultGroupUpdateRate", Err.Number)
    SetDefaultGroupUpdateRate = False
    
SkipOPCDefaultUpdateRateError:
End Function


' The SetDefaultGroupDeadBand allows you to set the default Deadband
' condition on the ServerGroups object determining the DeadBand
' of a newly added group.  Once a group is added you can change
' these attributes by using the functions found in the OPCGroupClass
' object.  Deadband is an interesting feature of the an OPC server.
' Deadband allows you to limit the amount of data changes the OPC
' will return for items in this group.  It does this by establishing the
' ratio of change that must occur in a given item before the OPC server
' will pass the changed value back to the connected OPC client.
' The Deadband ranges from 0 to 100 percent. The actual percentage of
' effect that the deadband has upon changing data depends of the
' data tpye of the OPC item.  If the data type of the OPC item is a BYTE
' which has a range of 0 to 255 a deadband value of 1 percent would
' require that the value contained in this BYTE item must change by
' atleast 2.5 before the OPC server will inform the OPC client of the
' change.  Unlike the the Active state and Update Rate of a group the
' Deadband feature will not optimize the communications bandwidth of the
' OPC server.  Deadband is more likely to be used to prevent an
' application like a data logger from logging every little change in
' value due to a noisy enviroment as an example.
'
Function SetDefaultGroupDeadBand(ByVal DeadBand As Single)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCDefaultGroupDeadBandError
    
    ServerGroups.DefaultGroupDeadband = DeadBand
    SetDefaultGroupDeadBand = True
    GoTo SkipOPCDefaultGroupDeadBandError
    
ShowOPCDefaultGroupDeadBandError:
    Call DisplayOPC_COM_ErrorValue("SetDefaultGroupDeadBand", Err.Number)
    SetDefaultGroupDeadBand = False
    
SkipOPCDefaultGroupDeadBandError:
End Function


' The name say it all, gets the default active state from the
' ServerGroups collection object.
'
Function GetDefaultGroupIsActive(ByRef State As Boolean)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetDefaultGroupIsActiveError
    
    State = ServerGroups.DefaultGroupIsActive
    GetDefaultGroupIsActive = True
    GoTo SkipOPCGetDefaultGroupIsActiveError
    
ShowOPCGetDefaultGroupIsActiveError:
    Call DisplayOPC_COM_ErrorValue("GetDefaultGroupIsActive", Err.Number)
    GetDefaultGroupIsActive = False
    
SkipOPCGetDefaultGroupIsActiveError:
End Function


' The name say it all, gets the default UpdateRate from the
' ServerGroups collection object.
'
Function GetDefaultGroupUpdateRate(ByRef Rate As Long)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetDefaultUpdateRateError
    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人综合自拍| 国产精品成人在线观看| 奇米影视在线99精品| 欧美一区二区观看视频| 午夜精品久久久久影视| 欧美日本在线一区| 毛片一区二区三区| 久久久久国产精品麻豆ai换脸| 高清av一区二区| 国产精品久久久久永久免费观看 | 91丨九色丨蝌蚪丨老版| 亚洲人成人一区二区在线观看| 91福利精品第一导航| 日韩国产欧美视频| 国产亚洲自拍一区| 99re66热这里只有精品3直播| 亚洲永久精品大片| 欧美mv和日韩mv国产网站| 99久久精品国产麻豆演员表| 婷婷综合五月天| 国产拍揄自揄精品视频麻豆| 91视频在线观看| 蜜臀av一区二区在线观看| 欧美经典一区二区| 精品视频在线免费| 成人免费高清在线| 香蕉av福利精品导航 | 日本一区二区三区视频视频| 91蜜桃网址入口| 久久精品国产亚洲a| 亚洲乱码中文字幕| 精品国产123| 在线观看精品一区| 国产成人精品网址| 日精品一区二区三区| 国产精品国产自产拍在线| 精品嫩草影院久久| 欧美午夜宅男影院| 成人久久久精品乱码一区二区三区| 亚洲国产美国国产综合一区二区| 久久精品视频免费观看| 欧美日韩国产综合久久| 成人h动漫精品一区二区| 日本不卡一区二区三区| 一区二区三区不卡在线观看| 久久久久久久久伊人| 欧美一区二区三区在线电影| 91视频精品在这里| 成人午夜短视频| 久久99久久99小草精品免视看| 亚洲主播在线观看| 亚洲欧美日韩电影| 国产精品精品国产色婷婷| 欧美精品一区二区在线播放| 欧美日韩不卡一区二区| 在线亚洲欧美专区二区| 波多野结衣精品在线| 国产精品一区二区黑丝| 麻豆成人免费电影| 日韩制服丝袜先锋影音| 亚洲国产aⅴ成人精品无吗| 亚洲视频一区二区在线| 中文字幕精品在线不卡| 久久久精品蜜桃| 久久九九久久九九| 精品福利av导航| 日韩一级二级三级精品视频| 欧美男男青年gay1069videost | 色偷偷成人一区二区三区91| 国产成人欧美日韩在线电影| 激情综合五月天| 精品一区二区三区免费| 蜜臀va亚洲va欧美va天堂 | 欧美精品在线观看一区二区| 色天天综合色天天久久| 一本一道久久a久久精品| 99精品国产99久久久久久白柏| 国产sm精品调教视频网站| 国产不卡免费视频| 国产91丝袜在线播放| 成人性生交大合| aaa欧美色吧激情视频| 色天天综合色天天久久| 欧美三级三级三级爽爽爽| 欧美日韩一区精品| 欧美一卡二卡三卡四卡| 精品国产成人在线影院| 国产欧美一区二区三区鸳鸯浴| 亚洲国产成人私人影院tom| 国产精品福利电影一区二区三区四区| 国产精品剧情在线亚洲| 亚洲欧美另类小说| 五月婷婷另类国产| 久久爱www久久做| 成人av网站免费观看| 色视频欧美一区二区三区| 欧美日韩视频在线一区二区| 欧美不卡视频一区| 国产精品传媒入口麻豆| 五月天一区二区| 久久国产视频网| 风间由美中文字幕在线看视频国产欧美 | 成人久久久精品乱码一区二区三区| 99re热视频精品| 欧美精品自拍偷拍| 国产亚洲va综合人人澡精品 | 国产亚洲福利社区一区| 亚洲情趣在线观看| 免费高清不卡av| 91网页版在线| 日韩丝袜美女视频| 中文字幕亚洲一区二区av在线 | 亚洲日本欧美天堂| 免费观看日韩电影| 91香蕉视频黄| 久久久噜噜噜久久人人看| 亚洲日本电影在线| 欧美bbbbb| 91麻豆国产福利精品| 日韩欧美一二三区| 亚洲免费观看高清完整版在线| 久久99在线观看| 欧美在线不卡视频| 国产视频一区不卡| 视频精品一区二区| 99re热这里只有精品视频| 欧美草草影院在线视频| 一区二区三区日韩精品视频| 久久不见久久见中文字幕免费| 一本到高清视频免费精品| 精品久久久久久久久久久久久久久久久 | 成人欧美一区二区三区白人| 人人爽香蕉精品| 在线视频欧美区| 欧美经典一区二区| 国产综合久久久久久久久久久久| 日本精品一级二级| 亚洲国产精品ⅴa在线观看| 喷白浆一区二区| 欧美日韩在线电影| 亚洲丝袜美腿综合| 国产91丝袜在线观看| 亚洲精品在线观看网站| 视频一区国产视频| 欧美私模裸体表演在线观看| 亚洲欧洲在线观看av| 狠狠色丁香婷婷综合久久片| 制服丝袜激情欧洲亚洲| 一区二区三区在线视频观看| jizzjizzjizz欧美| 国产拍欧美日韩视频二区| 激情文学综合插| 欧美大片在线观看一区| 香蕉影视欧美成人| 欧美日韩国产综合视频在线观看| 亚洲一区免费视频| 色诱亚洲精品久久久久久| 亚洲欧洲av另类| a级精品国产片在线观看| 国产精品美女久久久久久久久| 国内精品视频666| 久久综合色之久久综合| 精品综合久久久久久8888| 精品欧美一区二区三区精品久久| 日本一区中文字幕| 日韩欧美中文字幕公布| 老司机免费视频一区二区| 精品国产sm最大网站| 国产成人精品免费视频网站| 久久精品欧美一区二区三区麻豆| 黑人巨大精品欧美一区| 久久久久国产免费免费| 成人精品视频一区| 国产精品福利一区| 欧美怡红院视频| 日韩不卡一区二区三区 | 在线观看日韩毛片| 天天操天天综合网| 日韩小视频在线观看专区| 美女一区二区三区| 国产无一区二区| 99久久国产综合精品麻豆| 一区二区三区美女| 7777精品伊人久久久大香线蕉| 免费在线观看日韩欧美| 精品国产a毛片| a级高清视频欧美日韩| 亚洲香蕉伊在人在线观| 欧美一区二区视频在线观看2020| 久久 天天综合| 国产日产欧美精品一区二区三区| 成人动漫av在线| 亚洲国产一二三| www国产成人免费观看视频 深夜成人网| 国产伦理精品不卡| 一区二区三区四区乱视频| 日韩一区二区在线免费观看| 成熟亚洲日本毛茸茸凸凹| 亚洲综合色在线| 久久综合网色—综合色88|