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

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

?? opcitemclass.cls

?? vb6.0與OPCSERVER的完整例子
?? CLS
字號:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "OPCItemClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' The OPCItemClass object houses all of the functionallity used
' to interact with OPC Items.  The OPCItemClass is used primarily
' by the OPCGroupClass.  When AddOPCItem is called on an instance of
' the OPCGroupClass object, it creates an instance of a OPCItemClass
' object.  In general you normally won't directly create a OPCItemClass
' object.  You gain access to them as you add items to your OPCGroupClass
' object.  Each item you add to the group is given a unique item key
' name.  The OPCItemClass object wraps the Automation interface OPCItem
' object. 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 OPCItemClass object handles functions found in the last branch
' of this diagram, the OPCitem object.  I have not implemented all of
' the methods and properties found in this object.  Adding access to
' any methods or properties not currently in this module is easy.
'
' While you won't normally directly create an OPCItemClass object you
' will utilize the functions found in this object.


Option Explicit
Option Base 1

' The OPCItemObj is the Automation Interface OPCItem object.  This is the
' actual object returned by the Automation Interface when the item is added
' to the group in the OPCGroupClass function AddOPCItem.
Dim OPCItemObj As OPCItem

' The OPCOItemID contains the fully qualified item reference to this item.
' In this case of this example and KEPServerEX a typical ItemID might
' appear as "Channel_1.Device_1.R100".  While not as effecient as using the
' actual collection key generated by the ItemIndex, the OPCItemID can be used
' to identify an OPC item in your application.
Dim OPCItemID As String

' The Item Value is a variant used to hold whatever data value that is
' returned by the item refernced in the OPCItemID.  Keep in mind that the
' Variant type my be a single value or an array of values.  To determine
' what type the data is see either the Timer function found in the main
' form of this example or the WriteNewValue function found on the
' frmWriteItem form.
Dim ItemValue As Variant

' The Item quality contains the error condition of the item.  Normally you
' would think that a zero is no error and anything else was error.  In OPC
' terminology the quality value is a bit field.  As a bit field the value
' contained in the quality data is non zero when the data is good.  A value
' &HCO indicates that the item is good and has no error.
Dim ItemQuality As Long

' The ItemTimeStamp contains the time of the last read operation for this item.
' Using this data your application can determine if the data available for
' this item is fresh enough to be used.
Dim ItemTimeStamp As Date

' The ItemDataType contains the datatype of the OPC item as it was requested
' by your application.  This does not however guarantee that the OPC server has
' not returned the data in another format.  You should check the variant type
' of data returned from the OPC server for this item.
Dim ItemDataType As Integer
Dim ItemIndex As Long


' This function is called from OPCGroupClass function AddOPCItem to
' establish the contents of this tag.
'
Sub SetOPCItem(OPCItemObject As OPCItem, OPCItem_IDval As String, ByVal OPCItemIndex As Long, ByVal ItmDataType As Integer)
    ' Assign the group object for this instance of the class
    Set OPCItemObj = OPCItemObject
    Dim newString As String
    newString = OPCItem_IDval
    OPCItemID = newString
    
    ItemIndex = OPCItemIndex
    ' This is the data type that was requested during the AddItem call
    ' This may not be the actual datatype of the item once the OPC Server accepts the item
    ' Use the GetItemDataType in OPCItemDirect mode to find what type the OPC
    ' Server has assigned to the item
    ItemDataType = ItmDataType
End Sub

' This function is called from the DataChange event handler found in
' the OPCGroupClass.  The function simply updates the fields for this item
'
Sub UpdateOPCItemData(ByVal ItmVal As Variant, ByVal ItmQuality As Long, ByVal ItmTime As Date)

    ItemValue = ItmVal
    ItemQuality = ItmQuality
    ItemTimeStamp = ItmTime

End Sub

' This function returns the ItemID string for this item.
'
Function GetItemID()
    GetItemID = OPCItemID
End Function

' This function returns the ItemIndex for this item.
'
Function GetItemIndex()
    GetItemIndex = ItemIndex
End Function

' This function returns a value for this item.  The value returned can
' be either the local ItemValue or the Item value as it is contained in the
' OPC Servers copy of the Automation Interface's OPCItem object.  The mode
' parameter selects which item will be read.
'
Function GetItemValue(ByVal Mode As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemValueError
    
    If Mode = OPCItemDirect Then
        GetItemValue = OPCItemObj.Value
    Else
        GetItemValue = ItemValue
    End If
GoTo SkipOPCGetItemValueError

ShowOPCGetItemValueError:
    Call DisplayOPC_COM_ErrorValue("GetItemValue", Err.Number)
SkipOPCGetItemValueError:

End Function

' This function returns a quality for this item.  The value returned can
' be either the local quality value or the quality value as it is contained
' in the OPC Servers copy of the Automation Interface's OPCItem object.
' The mode parameter selects which value will be read.
'
Function GetItemQuality(ByVal Mode As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemQualityError
    
    If Mode = OPCItemDirect Then
        GetItemQuality = OPCItemObj.Quality
    Else
        GetItemQuality = ItemQuality
    End If
    
GoTo SkipOPCGetItemQualityError

ShowOPCGetItemQualityError:
    Call DisplayOPC_COM_ErrorValue("GetItemQuality", Err.Number)
SkipOPCGetItemQualityError:

End Function


' This function allows the quality of this item to be set. This is used in
' the AsyncWriteComplete call back event of teh OPCGroupClass object.
'
Function SetItemQuality(ByVal Quality As Long)
    ItemQuality = Quality
End Function

' This function returns a time stamp for this item.  The value returned can
' be either the local time stamp or the time stamp as it is contained
' in the OPC Servers copy of the Automation Interface's OPCItem object.
' The mode parameter selects which value will be read.
'
 Function GetItemTimeStamp(ByVal Mode As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemTimeStampError
    
    If Mode = OPCItemDirect Then
        GetItemTimeStamp = OPCItemObj.TimeStamp
    Else
        GetItemTimeStamp = ItemTimeStamp
    End If
    
GoTo SkipOPCGetItemTimeStampError

ShowOPCGetItemTimeStampError:
    Call DisplayOPC_COM_ErrorValue("GetItemTimeStamp", Err.Number)
SkipOPCGetItemTimeStampError:

End Function
 
' This function returns a data type for this item.  The value returned can
' be either the local data type or the data type as it is contained
' in the OPC Servers copy of the Automation Interface's OPCItem object.
' The mode parameter selects which value will be read.
'
 Function GetItemDataType(ByVal Mode As Integer)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemDataTypeError

    If Mode = OPCItemDirect Then
        GetItemDataType = OPCItemObj.RequestedDataType
    Else
        GetItemDataType = ItemDataType
    End If
    
GoTo SkipOPCGetItemDataTypeError

ShowOPCGetItemDataTypeError:
    Call DisplayOPC_COM_ErrorValue("GetItemDataType", Err.Number)
SkipOPCGetItemDataTypeError:
    
End Function

Function GetItemCanonicalType()
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemCanonicalTypeError
    
    GetItemCanonicalType = OPCItemObj.CanonicalDataType
    
GoTo SkipOPCGetItemCanonicalTypeError

ShowOPCGetItemCanonicalTypeError:
    Call DisplayOPC_COM_ErrorValue("GetItemCanonicalType", Err.Number)
SkipOPCGetItemCanonicalTypeError:

End Function

Function GetItemServerHandle()
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemServerHandleError
    
    GetItemServerHandle = OPCItemObj.ServerHandle
    
GoTo SkipOPCGetItemServerHandleError

ShowOPCGetItemServerHandleError:
    Call DisplayOPC_COM_ErrorValue("GetItemServerHandle", Err.Number)
SkipOPCGetItemServerHandleError:

End Function

Function GetItemActiveState()
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetItemActiveStateError
    
    GetItemActiveState = OPCItemObj.IsActive
    
    GoTo SkipOPCGetItemActiveStateError

ShowOPCGetItemActiveStateError:
    Call DisplayOPC_COM_ErrorValue("GetItemActiveState", Err.Number)
SkipOPCGetItemActiveStateError:

End Function

' This function allows you to turn a specific OPC item on and off
' using the .IsActive flag of the item.
'
Function SetItemActiveState(ByVal ActiveState As Boolean)
    'Set error handling for OPC Function
    On Error GoTo ShowOPCSetItemActiveStateError
    
    OPCItemObj.IsActive = ActiveState
    
GoTo SkipOPCSetItemActiveStateError

ShowOPCSetItemActiveStateError:
    Call DisplayOPC_COM_ErrorValue("SetItemActiveState", Err.Number)
SkipOPCSetItemActiveStateError:

End Function

' Handles displaying any OPC/COM/VB errors that are caught by the exception handler
Sub DisplayOPC_COM_ErrorValue(OPC_Function As String, ErrorCode As Long)
    Dim Response
    Dim ErrorDisplay As String
    ErrorDisplay = "The OPC function '" + OPC_Function + "' has returned an error of " + Str(ErrorCode) + " or Hex 0x" + Hex(ErrorCode)
    Response = MsgBox(ErrorDisplay, vbOKOnly, "OPC Function Error")
End Sub


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲五码中文字幕| 丁香婷婷综合色啪| 国产69精品久久久久777| 欧美视频一区二区三区四区| 久久久另类综合| 偷偷要91色婷婷| 91麻豆swag| 久久中文娱乐网| 免费成人在线影院| 色呦呦国产精品| 国产精品第四页| 国产麻豆成人传媒免费观看| 91精品国产综合久久婷婷香蕉| 欧美激情一区不卡| 国产米奇在线777精品观看| 91精品国产色综合久久ai换脸| 亚洲精品视频在线观看免费| jlzzjlzz亚洲女人18| 久久久久久久综合狠狠综合| 久久精品国产一区二区三| 欧美日韩不卡一区二区| 亚洲.国产.中文慕字在线| 91老师国产黑色丝袜在线| 国产精品久99| 99精品视频中文字幕| 中文字幕亚洲在| aaa欧美色吧激情视频| 国产精品免费网站在线观看| 成人听书哪个软件好| 亚洲国产精品精华液2区45| 国产精品99久久久| 中文字幕一区在线观看| 91网站黄www| 一区二区欧美国产| 欧美酷刑日本凌虐凌虐| 秋霞影院一区二区| www国产成人| 国产美女一区二区| 亚洲国产精品ⅴa在线观看| 成人免费毛片高清视频| 亚洲品质自拍视频| 欧美日韩国产综合久久| 日本aⅴ免费视频一区二区三区 | 亚洲大片免费看| 欧美三级日韩三级| 久久精品国产秦先生| 久久久久久久久久久电影| 成人精品视频一区| 亚洲精品成人精品456| 欧美午夜精品电影| 免费成人美女在线观看| 国产午夜精品一区二区三区视频| 不卡的av电影在线观看| 亚洲一区二区视频| 欧美电影免费观看高清完整版在线 | 日韩美女主播在线视频一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美va亚洲va香蕉在线| www.在线欧美| 日韩成人午夜精品| 中文字幕av一区二区三区| 欧美主播一区二区三区| 蓝色福利精品导航| 亚洲欧美怡红院| 777奇米四色成人影色区| 国产麻豆91精品| 午夜精品视频在线观看| 国产日韩欧美一区二区三区综合| 日本精品一区二区三区高清| 秋霞午夜av一区二区三区| 国产精品视频线看| 日韩久久久久久| 91日韩在线专区| 久久成人18免费观看| 亚洲精品国久久99热| 精品国产凹凸成av人网站| 在线观看视频一区| 成人国产在线观看| 日本成人在线电影网| 亚洲精品日韩专区silk| 国产亚洲欧美激情| 69p69国产精品| 91亚洲国产成人精品一区二区三 | 亚洲成a人片在线观看中文| 久久精品夜色噜噜亚洲aⅴ| 欧美日韩久久久| 99久久久无码国产精品| 精品制服美女久久| 天天亚洲美女在线视频| 亚洲欧美电影院| 国产精品人成在线观看免费| 精品欧美久久久| 欧美一区二区性放荡片| 欧美色爱综合网| 972aa.com艺术欧美| 国产精品1区2区| 久久99国内精品| 婷婷亚洲久悠悠色悠在线播放| 亚洲天堂2014| 自拍偷自拍亚洲精品播放| 中文无字幕一区二区三区| 欧美mv日韩mv国产网站| 日韩一区和二区| 91精品一区二区三区久久久久久| 色欧美乱欧美15图片| 91成人在线精品| 色先锋久久av资源部| 91天堂素人约啪| 97se亚洲国产综合在线| 99精品国产热久久91蜜凸| 风流少妇一区二区| 成人午夜激情在线| 成人免费看黄yyy456| 成人免费高清视频在线观看| 成人精品免费看| av电影天堂一区二区在线| 99热精品一区二区| 日本韩国精品一区二区在线观看| 91日韩一区二区三区| 在线观看日韩一区| 欧美精品在线一区二区三区| 欧美一区二区精品在线| 日韩一区二区三区三四区视频在线观看 | 夜夜操天天操亚洲| 亚洲国产综合视频在线观看| 亚洲二区在线观看| 日本女人一区二区三区| 国产在线视视频有精品| 成人黄色免费短视频| 在线观看一区日韩| 欧美精品久久久久久久久老牛影院| 欧美精品一卡二卡| 久久久久久黄色| 亚洲视频一区二区免费在线观看| 伊人婷婷欧美激情| 免费av成人在线| 国产.欧美.日韩| 欧美三区在线视频| 亚洲精品一区二区在线观看| 欧美国产精品一区二区三区| 亚洲综合自拍偷拍| 美国欧美日韩国产在线播放| 国产·精品毛片| 欧美精品黑人性xxxx| 久久久亚洲精品石原莉奈| 成人免费一区二区三区在线观看 | 综合自拍亚洲综合图不卡区| 亚洲一区中文日韩| 国产麻豆成人传媒免费观看| 一本色道久久加勒比精品| 91精品国产综合久久精品麻豆| 岛国av在线一区| hitomi一区二区三区精品| 欧美午夜电影在线播放| 26uuu国产电影一区二区| 亚洲欧洲国产专区| 久久av资源网| 欧美午夜片在线观看| 亚洲国产精品激情在线观看| 日韩精品亚洲一区二区三区免费| 成人av中文字幕| 欧美不卡视频一区| 一区二区理论电影在线观看| 国产99久久久久| 日韩欧美一级精品久久| 亚洲精选视频在线| 国产999精品久久久久久| 91精品午夜视频| 一区二区三区在线高清| 国产91丝袜在线18| 日韩美女主播在线视频一区二区三区 | 色综合天天天天做夜夜夜夜做| 日韩精品一区二区在线| 午夜精品久久久久久久蜜桃app| 国产成人精品免费一区二区| 欧美一级专区免费大片| 亚洲制服欧美中文字幕中文字幕| 成人av资源网站| 国产日韩精品视频一区| 激情深爱一区二区| 日韩一区二区三区四区| 三级欧美在线一区| 欧美视频自拍偷拍| 亚洲卡通欧美制服中文| 99精品视频在线播放观看| 日本一区二区三区电影| 国产精品资源网站| 精品免费国产二区三区| 乱一区二区av| 欧美xxxx老人做受| 国内精品伊人久久久久av影院| 欧美一区二区播放| 七七婷婷婷婷精品国产| 91麻豆精品国产91| 日本成人中文字幕| 欧美成人aa大片| 国产精品一区二区在线观看网站| 26uuu亚洲综合色欧美 | 国产精品情趣视频| 成人精品一区二区三区四区|