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

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

?? opcgroupclass.cls

?? vb開發的一個opcclient源代碼
?? CLS
?? 第 1 頁 / 共 3 頁
字號:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "OPCGroupClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' The OPCGroupClass object houses all of the functionallity used
' to interact with OPC groups.  The OPCGroupClass is used primarily
' by the OPCServerClass.  When AddOPCGroup is called on an instance of
' the OPCServerClass object, it creates an instance of a OPCGroupClass
' object.  In general you normally won't directly create a OPCGroupClass
' object.  You gain access to them as you add groups to your OPCServerClass
' object.  Each group you add to the server is given a unique group key
' name.  Using this key name and the GetOPCServerGroupCollection function
' of the OPCServerClass you can access specific instances of the
' OPCGroupClass.  The OPCGroupClass object wraps the Automation
' interface OPCGroup object and OPCItems (Collection). This diagram shows the relationships
' between the various components of the Automation interface wrapper.
'
'    OPCServer
'           |
'           +-OPC Groups (Collection)
'                      |
' >                    +-OPC Group                           <
' >                              |                           <
' >                              +-OPC Items (Collection)    <
'                                           |
'                                           +-OPC Items
'
' The OPCGroupClass object handles functions found in the second two
' branches of this diagram, the OPCGroup object and OPCItems collection.
' I have not implemented all of the methods and properties found in these
' objects.  Adding access to any methods or properties not currently in
' this module is easy.
'
' While you won't normally directly create an OPCGroupClass object you
' will utilize the functions found in this object.


Option Explicit
Option Base 1

' The OPCGroupName contains the actual string name that you provided
' when adding the group.  If you left the group name blank when adding
' the group this name will contain the group name assigned by the OPC
' server.  This is a convient feature of the OPC server interface.
' Your program doesn't need to supply a group name you can allow the
' server to provide one.  There is a catch however, some servers may not
' have implemented this properly.  In some cases you may be able to
' add the first group without a name but the second time you add a group
' it may fail because the server thinks the second group name is the
' same as the first blank group you added.  This problem is rare.
' Our KEPServer and KEPServerEX will allow you to add as many groups
' as you like.
Dim OPCGroupName As String

' This is a string key used to reference this OPCGroupClass object.  The
' OPCGroupKey can be used by the VB application anyway the user
' sees fit.  In some cases this is used as a key in controls such as
' a treeview of a listview.  Using this key and the GetOPCServerGroupCollection
' of the OPCServerClass object you can get direct access to a specific
' instance of the OPCGroupClass.  This key is generated by the AddOPCGroup
' function of the OPCServerClass object.
Dim OPCGroupKey As String

' The OPCGroupObj is the actual group object of the Automation Interface
Dim WithEvents OPCGroupObj As OPCGroup
Attribute OPCGroupObj.VB_VarHelpID = -1

' As items are added to this group they will be placed into this collection
Dim OPCGroupItems As New Collection

' This value holds the numeric value of the OPCGroupKey string above.
Dim GroupIndex As Integer

' This routine initializes the OPCGroupClass object.
'
Sub SetOPCGroup(ByVal OPCGroupObject As OPCGroup, ByVal GroupName As String, ByVal GroupKey As String, ByVal GroupIndx As Integer)
    ' Assign the group object for this instance of the class
    Dim StoreName As String
    Dim StoreKey As String
    
    Set OPCGroupObj = OPCGroupObject
    StoreName = GroupName
    OPCGroupName = StoreName
    
    StoreKey = GroupKey
    OPCGroupKey = StoreKey
    
    GroupIndex = GroupIndx
    ' ****************************************************************
    ' Mark this group to receive asynchronous updates via the DataChange event.
    ' This setting is IMPORTANT. Without setting '.IsSubcribed' to True your
    ' VB application will not receive DataChange notifications.  This will
    ' make it appear that you have not properly connected to the server.
    
    OPCGroupObj.IsSubscribed = True
   
End Sub

' This sub simply returns the group name set when the class instance was created'
'
Function GetGroupName()
    GetGroupName = OPCGroupName
End Function

' This sub simply returns the group key set when the class instance was created
'
Function GetGroupKey()
    GetGroupKey = OPCGroupKey
End Function

' This sub simply returns the group index set when the class instance was created
'
Function GetGroupIndex()
    GetGroupIndex = GroupIndex
End Function

' This sub simply returns the Item Collection that is part of this class.
'
Function GetOPCGroupItemsCollection()
    Set GetOPCGroupItemsCollection = OPCGroupItems
End Function

' This function allows the group's active state to be changed on the fly.  The
' OPCGroup object provides a number of properties that can be used to control
' a group's operation.  The '.IsActive' property allows you to turn all of the
' OPC items in the group On(active) and Off(inactive).  To see the effect that
' the group's '.InActive' property has on an OPC Server run this demo and connect
' with KEPServerEX, add a group, add a few items.  Once you see changing data
' right click on the group to access the group properties then toggle
' the active state.  If you watch the KEPServerEX OPC Server you will see
' it's active tag count change from 'No Active Items' when the group is made
' inactive to the count of item in the group when the group is made active.
' Changing the actvie state of a group can be useful in controlling how your
' application makes use of an OPC Server's communication bandwidth.  If you don't
' need any of the data in a given group simply set it inactive, this will allow an
' OPC Server to gather only the data current required by your application.
'
Function SetGroupActiveState(ByVal ActiveState As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGroupActiveError
    OPCGroupObj.IsActive = ActiveState
    SetGroupActiveState = True
    GoTo SkipGroupActiveError
ShowOPCGroupActiveError:
    Call DisplayOPC_COM_ErrorValue("Group Active State", Err.Number)
    SetGroupActiveState = False
SkipGroupActiveError:
    
End Function

' This function get the current value of the group's active state
'
Function GetGroupActiveState(ByRef ActiveState As Boolean)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetGroupActiveError
    ActiveState = OPCGroupObj.IsActive
    GetGroupActiveState = True
    GoTo SkipGetGroupActiveError
ShowOPCGetGroupActiveError:
    Call DisplayOPC_COM_ErrorValue("Get Group Active State", Err.Number)
    GetGroupActiveState = False
SkipGetGroupActiveError:
    
End Function


' This function allows the group's deadband to be changed on the fly.  Like the
' '.IsActive' property, the '.DeadBand' property can be changed at any time.
' The Deadband property allows you to control how much change must occur in
' an OPC item in this group before the value will be reported in the 'DataChange'
' event.  The value entered for '.DeadBand' is 0 to 100 as a percentage of full
' scale for each OPC item data type within this group.  If your OPC item is a
' Short(VT_I2) then your full scale is -32768 to 32767 or 65535.  If you
' enter a Deadband value of 1% then all OPC Items in this goup would need
' to change by a value of 655 before the change would be returned in the
' 'DataChange' event.  The '.DeadBand' property is a floating point number
' allowing very small ranges of change to be filtered.
'
Function SetGroupDeadBand(ByVal DeadBand As Single)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCSetGroupDeadBandError
    
    OPCGroupObj.DeadBand = DeadBand
    SetGroupDeadBand = True
    GoTo SkipSetGroupDeadBandError

ShowOPCSetGroupDeadBandError:
    Call DisplayOPC_COM_ErrorValue("Set Group Dead Band", Err.Number)
    SetGroupDeadBand = False
SkipSetGroupDeadBandError:
End Function

' This function get the current value of the group's Dead Band
'
Function GetGroupDeadBand(ByRef DeadBand As Single)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetGroupDeadBandError
    
    DeadBand = OPCGroupObj.DeadBand
    GetGroupDeadBand = True
    GoTo SkipGetGroupDeadBandError

ShowOPCGetGroupDeadBandError:
    Call DisplayOPC_COM_ErrorValue("Get Group Dead Band", Err.Number)
    GetGroupDeadBand = False
SkipGetGroupDeadBandError:
End Function

' This function allows the group's update rate to be changed on the fly.  The
' '.UpdateRate' property allows you to control how often data from this
' group will be returned to your application in the 'DataChange' event.
' The '.UpdateRate' property can be used to control and improve the overall
' performance of you application.  In this example you can see that the update
' rate is set for a fast update speed.  In a demo that's OK.  In your real
' world application, forcing the OPC Server to gather all of the OPC items in
' a group at their fastest rate may not be ideal.  In applications where you
' have data that needs to be acquired at different rates you can create
' multiple groups each with its own update rate.  Using multiple groups would
' allow you to gather time critical data in GroupA with an update rate
' of 200 millliseconds, and gather low priority data from GroupB with an
' update rate of 7000 milliseconds.  The lowest value for the '.UpdateRate'
' is 0 which tells the OPC Server go as fast as possible.  The maximium is
' 2147483647 milliseconds which is about 596 hours.
'
Function SetGroupUpdateRate(ByVal UpdateRate As Long)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCSetGroupUdateRateError
    
    OPCGroupObj.UpdateRate = UpdateRate
    SetGroupUpdateRate = True
    GoTo SkipSetGroupUdateRateError

ShowOPCSetGroupUdateRateError:
    Call DisplayOPC_COM_ErrorValue("Set Group Update Rate", Err.Number)
    SetGroupUpdateRate = False
SkipSetGroupUdateRateError:
End Function

' This function gets the current value of the group's Update Rate
'
Function GetGroupUpdateRate(ByRef UpdateRate As Long)
    'Set error handling for OPC Function

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机免费视频一区二区| 精品久久久久一区| 国产91精品久久久久久久网曝门 | 国产一区二区中文字幕| 久久成人羞羞网站| 日本欧美一区二区三区乱码| 亚洲成av人片在线观看无码| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产精品一卡二| 亚洲午夜av在线| 亚洲成人精品在线观看| 亚洲18色成人| 婷婷综合久久一区二区三区| 蜜桃视频在线观看一区| 激情伊人五月天久久综合| 国产精品综合在线视频| 波多野结衣亚洲| av一区二区久久| 在线观看视频一区二区| 欧美亚洲综合久久| 欧美日韩精品一区二区| 欧美日韩精品免费观看视频| 欧美日韩国产免费一区二区| 欧美精品1区2区| 欧美精品一区二区不卡| 国产欧美日韩在线看| 最新不卡av在线| 亚洲成av人片| 六月婷婷色综合| av网站一区二区三区| 欧美日韩国产免费| 国产日产精品一区| 亚洲综合视频在线观看| 日韩1区2区3区| 国产成人亚洲综合a∨婷婷| 色婷婷精品大在线视频| 337p亚洲精品色噜噜噜| 亚洲国产精品成人综合| 亚洲综合一区二区精品导航| 麻豆精品视频在线观看| jlzzjlzz亚洲日本少妇| 欧美精品自拍偷拍| 国产精品久久毛片| 奇米一区二区三区av| 91麻豆福利精品推荐| 欧美成人女星排名| 一二三区精品视频| 国产在线精品一区在线观看麻豆| 一本一本久久a久久精品综合麻豆| 在线不卡中文字幕播放| 国产精品不卡一区| 精品制服美女丁香| 色婷婷亚洲精品| 久久久九九九九| 偷拍一区二区三区| 欧洲一区二区三区在线| 日本一区二区综合亚洲| 久草中文综合在线| 国产一区福利在线| 日韩欧美国产综合| 91精品一区二区三区在线观看| 风流少妇一区二区| 欧美日韩成人综合| 中文字幕第一区综合| 久久超级碰视频| 欧美日韩免费视频| 亚洲综合一区在线| 色8久久人人97超碰香蕉987| 中文字幕欧美日本乱码一线二线| 久久 天天综合| 精品国产三级a在线观看| 午夜欧美大尺度福利影院在线看| 色综合久久综合网欧美综合网| 欧美国产禁国产网站cc| 国产精品一线二线三线| 欧美日韩三级一区| 亚洲色图一区二区三区| 成人一级片在线观看| 国产网站一区二区三区| 国产成人自拍在线| 久久久99久久| 精品无人码麻豆乱码1区2区| 精品日韩一区二区三区免费视频| 免费视频最近日韩| 精品国产在天天线2019| 紧缚奴在线一区二区三区| 精品成人一区二区| 国产精品资源在线| 国产精品伦一区| 色天天综合色天天久久| 亚洲午夜影视影院在线观看| 欧美日韩精品一区二区天天拍小说| 日韩激情一区二区| 精品国产欧美一区二区| 高清不卡一区二区| 亚洲精品成a人| 欧美精品欧美精品系列| 免费人成网站在线观看欧美高清| www国产精品av| 91天堂素人约啪| 午夜精品国产更新| 久久精品一区二区| 在线观看国产日韩| 激情另类小说区图片区视频区| 中文字幕av不卡| 欧美日韩亚州综合| 国产毛片一区二区| 尤物在线观看一区| 精品对白一区国产伦| 91理论电影在线观看| 美日韩一级片在线观看| 中文字幕制服丝袜一区二区三区| 欧美日韩一区二区三区四区五区 | 一区二区三区中文字幕精品精品| 欧美精品一级二级三级| 成人精品鲁一区一区二区| 亚洲成人动漫一区| 欧美激情一区二区三区不卡| 欧美性xxxxx极品少妇| 国产露脸91国语对白| 亚洲综合激情网| 欧美国产综合一区二区| 欧美日韩不卡视频| 99re在线精品| 国产综合色产在线精品| 午夜精品一区二区三区免费视频| 国产无人区一区二区三区| 欧美一级在线观看| 色狠狠一区二区| 国产69精品久久久久毛片| 日本在线不卡一区| 亚洲精品成人在线| 国产精品麻豆欧美日韩ww| 日韩精品一区二区三区在线播放| 在线一区二区视频| 成人av网站大全| 韩国一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 一区二区三区波多野结衣在线观看 | 欧美在线免费视屏| www.欧美.com| 高清不卡一区二区| 国产九色sp调教91| 精品一区二区三区免费观看| 亚洲成av人片在线观看无码| 亚洲精品视频免费看| 日本一区二区电影| 国产网站一区二区| 久久久亚洲精品石原莉奈| 日韩一卡二卡三卡国产欧美| 欧美精品视频www在线观看| 欧美性猛交xxxx乱大交退制版 | 精品国产人成亚洲区| 日韩三级伦理片妻子的秘密按摩| 欧美精品自拍偷拍| 欧美一区二区视频在线观看2022| 欧美日韩一二区| 91麻豆精品久久久久蜜臀| 欧美精品日韩综合在线| 欧美另类z0zxhd电影| 欧美福利视频导航| 日韩一区二区麻豆国产| 欧美r级在线观看| 国产三级一区二区| 中文av一区特黄| 亚洲欧美韩国综合色| 亚洲线精品一区二区三区| 午夜成人在线视频| 久久99国产精品成人| 东方欧美亚洲色图在线| 99久久精品国产精品久久| 在线欧美日韩精品| 51精品秘密在线观看| 欧美电影免费观看高清完整版在线| 精品福利一二区| 国产精品久久精品日日| 亚洲综合色网站| 男人的天堂久久精品| 国产成人免费av在线| 色域天天综合网| 日韩欧美aaaaaa| 中文字幕在线观看不卡视频| 亚洲一区二区三区四区五区黄| 琪琪久久久久日韩精品| 成人99免费视频| 欧美精选一区二区| 中文字幕欧美日韩一区| 亚洲国产wwwccc36天堂| 精品一区二区三区免费毛片爱| av在线不卡观看免费观看| 欧美日韩电影在线| 国产欧美视频一区二区| 亚洲电影在线播放| 国产揄拍国内精品对白| 在线精品视频小说1| 2023国产一二三区日本精品2022| 中文欧美字幕免费| 精品一区二区影视| 在线观看一区二区精品视频| 国产视频不卡一区|