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

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

?? kepserverex_simple_vb_opc.frm

?? Simple OPC client,值得研究。
?? FRM
?? 第 1 頁 / 共 5 頁
字號:
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   8520
      TabIndex        =   100
      Top             =   2280
      Width           =   1695
   End
   Begin VB.Label Label10 
      Caption         =   "ATCE Department."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   99
      Top             =   0
      Width           =   1695
   End
   Begin VB.Label Label3 
      Caption         =   "ATCE Dep."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   8520
      TabIndex        =   96
      Top             =   2040
      Width           =   1455
   End
   Begin VB.Label Label2 
      Caption         =   "ABB Shaghai Co.,Ltd"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   1
      Left            =   0
      TabIndex        =   95
      Top             =   0
      Width           =   1935
   End
End
Attribute VB_Name = "SimpleOPCInterface"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' This example attempts to demonstrate the steps required to connect
' with and access data from and OPC server.

Option Explicit
Option Base 1

' Server and group related data
' The OPCServer objects must be declared here due to the use of WithEvents
Dim WithEvents AnOPCServer As OPCServer
Attribute AnOPCServer.VB_VarHelpID = -1
Dim WithEvents ConnectedOPCServer As OPCServer
Attribute ConnectedOPCServer.VB_VarHelpID = -1
Dim ConnectedServerGroup As OPCGroups
Dim WithEvents ConnectedGroup As OPCGroup
Attribute ConnectedGroup.VB_VarHelpID = -1

' OPC Item related data
Dim OPCItemCollection As OPCItems
Dim OneOPCItem As OPCItem
Dim ItemCount As Long
Dim OPCItemIDs(10) As String
Dim ItemServerHandles() As Long
Dim ItemServerErrors() As Long
Dim ClientHandles(10) As Long

' General startup initialization
Private Sub Form_Load()
    AvailableOPCServerList.AddItem "Click on 'List OPC Servers' to start"
End Sub

' Make sure things get shut down properly upon closing application
Private Sub Form_Terminate()
    Call ExitExample_Click
End Sub

' This sub handles gathering a list of available OPC Servers and displays them
' The OPCServer Object provides a method called 'GetOPCServers' that will allow
' you to get a list of the OPC Servers that are installed on your machine.  The
' list is retured as a string array.
Private Sub ListOPCServers_Click()
    Dim AllOPCServers As Variant
    Dim i As Integer

    'Set error handling for OPC Function
    On Error GoTo ShowOPCGetServersError

    ' Create a temporary OPCServer object and use it to get the list of
    ' available OPC Servers
    Set AnOPCServer = New OPCServer
    ' Clear the list control used to display them
    AvailableOPCServerList.Clear
    AllOPCServers = AnOPCServer.GetOPCServers
    ' Load the list returned into the List box for user selection
    For i = LBound(AllOPCServers) To UBound(AllOPCServers)
        AvailableOPCServerList.AddItem AllOPCServers(i)
    Next i
    
    GoTo SkipOPCGetServersError
    
ShowOPCGetServersError:
    Call DisplayOPC_COM_ErrorValue("Get OPC Server List", Err.Number)
SkipOPCGetServersError:
    ' Release the temporary OPCServer object now that we're done with it
    Set AnOPCServer = Nothing
    
End Sub

' This sub loads the OPC Server name when selected from the list
' and places it in the OPCServerName object
Private Sub AvailableOPCServerList_Click()
    ' When a user selects a server from the list box its name is placed
    ' in the OPCServerName
    OPCServerName = AvailableOPCServerList.List(AvailableOPCServerList.ListIndex)
End Sub


' This sub handles connecting with the selected OPC Server
' The OPCServer Object provides a method called 'Connect' that allows you
' to 'connect' with an OPC server.  The 'Connect' method can take two arguments,
' a server name and a Node name.  The Node name is optional and does not have to
' be used to connect to a local server.  When the 'Connect' method is called you
' should see the OPC Server application start if it is not aleady running.
'
'Special Note: When connect remotely to another PC running the serverEx make
'sure that you have properly configured DCOM on both PC's. You will find documentation
'explaining exactly how to do this on your installation CD or at the ware web site.

Private Sub OPCServerConnect_Click()
Dim ConnectedServerName As String
Dim ConnectedNodeName As Variant


' Test to see if the User has entered or selected an OPC server name yet if not post a message
If InStr(OPCServerName.Text, "Click") = 0 Then
    'Set error handling for OPC Function
    On Error GoTo ShowOPCConnectError
    '
    'Create a new OPC Server object
    Set ConnectedOPCServer = New OPCServer
    'Load the selected server name to start the interface
    ConnectedServerName = OPCServerName.Text
    'Load the node name of the connected server. The node name should be entered
    'without the use of forward slashes \\.
    ConnectedNodeName = OPCNodeName.Text
    'Attempt to connect with the server
    ConnectedOPCServer.Connect ConnectedServerName, ConnectedNodeName
    
    ' Throughout this example you will see a lot of code that simply enables
    ' and disables the various controls on the form.  The purpose of these
    ' actions is to demonstrate and insure the proper sequence of events when
    ' making an OPC connection.
    ' If we successfully connect to a server allow the user to disconnect
    DisconnectFromServer.Enabled = True
    ' Don't allow a reconnect until the user disconnects
    OPCServerConnect.Enabled = False
    AvailableOPCServerList.Enabled = False
    OPCServerName.Enabled = False
    
    ' Enable the group controls now that we have a server connection
    OPCGroupName.Enabled = True
    GroupUpdateRate.Enabled = True
    GroupDeadBand.Enabled = True
    GroupActiveState.Enabled = True
    AddOPCGroup.Enabled = True ' Remove group isn't enable until a group has been added
    
    GoTo SkipOPCConnectError
    
ShowOPCConnectError:
    DisconnectFromServer.Enabled = False
    Set ConnectedOPCServer = Nothing
    Call DisplayOPC_COM_ErrorValue("Connect", Err.Number)
SkipOPCConnectError:
Else
    ' A server name has not been selected yet post an error to the user
    Dim Response
    Response = MsgBox("You must first select an OPC Server, Click on the 'List OPC Servers' button and select a server", vbOKOnly, "OPC Server Connect")
End If
End Sub

' This sub handles disconnecting from the OPC Server.  The OPCServer Object
' provides the method 'Disconnect'.  Calling this on an active OPCSerer
' object will release the OPC Server interface with your application.  When
' this occurs you should see the OPC server application shut down if it started
' automatically on the OPC connect. This step should not occur until the group
' and items have been removed
Private Sub DisconnectFromServer_Click()

' Test to see if the OPC Server connection is currently available
If Not ConnectedOPCServer Is Nothing Then
    'Set error handling for OPC Function
    On Error GoTo ShowOPCDisconnectError

    'Disconnect from the server, This should only occur after the items and group
    ' have been removed
    ConnectedOPCServer.Disconnect
    
    ' Release the old instance of the OPC Server object and allow the resources
    ' to be freed
    Set ConnectedOPCServer = Nothing

    ' Allow a reconnect once the disconnect completes
    OPCServerConnect.Enabled = True
    AvailableOPCServerList.Enabled = True
    OPCServerName.Enabled = True
    
    ' Don't alllow the Disconnect to be issued now that the connection is closed
    DisconnectFromServer.Enabled = False
    
    ' Disable the group controls now that we no longer have a server connection
    OPCGroupName.Enabled = False
    GroupUpdateRate.Enabled = False
    GroupDeadBand.Enabled = False
    GroupActiveState.Enabled = False
    AddOPCGroup.Enabled = False
End If
    
    GoTo SkipDisconnectError

ShowOPCDisconnectError:
    Call DisplayOPC_COM_ErrorValue("Disconnect", Err.Number)
SkipDisconnectError:
End Sub

' This sub handles adding the group to the OPC server and establishing the
' group interface.  When adding a group you can preset some of the group
' parameters using the properties '.DefaultGroupIsActive'
' and '.DefaultGroupDeadband'.  Set these before adding the group. Once the
' group has been successfully added you can change these same settings
' along with the group update rate on the fly using the properties on the
' resulting OPCGroup object.
Private Sub AddOPCGroup_Click()
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGroupAddError

    'Prepare to add a group to the current OPC Server
    ' Get the group interface from the server object
    Set ConnectedServerGroup = ConnectedOPCServer.OPCGroups

    ' Set the desire active state for the group
    ConnectedServerGroup.DefaultGroupIsActive = GroupActiveState.Value

    'Set the desired percent deadband
    ConnectedServerGroup.DefaultGroupDeadband = Val(GroupDeadBand.Text)

    ' Add the group and set its update rate
    Set ConnectedGroup = ConnectedServerGroup.Add(OPCGroupName.Text)
    ' Set the update rate for the group
    ConnectedGroup.UpdateRate = Val(GroupUpdateRate.Text)
    
    ' ****************************************************************
    ' 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.
    
    ConnectedGroup.IsSubscribed = True
    
    '*****************************************************************

    ' Now that a group has been added disable the Add group Button and enable
    ' the Remove group Button.  This demo application adds only a single group
    AddOPCGroup.Enabled = False
    OPCGroupName.Enabled = False
    RemoveOPCGroup.Enabled = True
    
    ' Enable the OPC item controls now that a group has been added
    OPCAddItems.Enabled = True
    Dim i As Integer
    For i = 0 To 9
       OPCItemName(i).Enabled = True
    Next i

    ' Disable the Disconnect Server button since we now have a group that must be removed first
    DisconnectFromServer.Enabled = False

    GoTo SkipAddGroupError

ShowOPCGroupAddError:
    Call DisplayOPC_COM_ErrorValue("Add Group", Err.Number)
SkipAddGroupError:

End Sub

' This sub handles removing a group from the OPC server, this must be done after
' items have been removed.  The 'Remove' method allows a group to be removed
' by name from the OPC Server.  If your application will maintains more than
' one group you will need to keep a list of the group names for use in the
' 'Remove' method.  In this demo there is only one group.  The name is maintained
' in the OPCGroupName TextBox but it can not be changed once the group is added.
Private Sub RemoveOPCGroup_Click()

' Test to see if the OPC Group object is currently available
If Not ConnectedServerGroup Is Nothing Then
    'Set error handling for OPC Function
    On Error GoTo ShowOPCGroupRemoveError

    ' Remove the group from the server
    ConnectedServerGroup.Remove (OPCGroupName.Text)
    ' Release the group interface and allow the server to cleanup the resources used
    Set ConnectedServerGroup = Nothing
    Set ConnectedGroup = Nothing

    ' Enable the Add group Button and disable the Remove group Button
    AddOPCGroup.Enabled = True
    OPCGroupName.Enabled = True
    RemoveOPCGroup.Enabled = False

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品日产卡一卡二卡麻豆| 五月天丁香久久| 亚洲成a人片在线观看中文| 精品一区二区在线免费观看| aaa亚洲精品| 日韩精品一区二区三区视频| 亚洲最大的成人av| 国产大陆精品国产| 91精品国产麻豆| 一区二区三区中文字幕精品精品| 极品少妇一区二区三区精品视频| 欧美性受xxxx黑人xyx| 中文一区二区在线观看| 久久精品99国产精品日本| 欧美男生操女生| 亚洲精品国产一区二区精华液| 国产成人精品亚洲日本在线桃色| 欧美一区二区免费视频| 亚洲一区二区成人在线观看| 99国内精品久久| 中文字幕不卡在线观看| 国产一区二区伦理| 久久综合久久综合久久| 麻豆国产精品一区二区三区| 欧美图区在线视频| 亚洲一区二区在线观看视频| 日本丶国产丶欧美色综合| 国产精品久久久久久久午夜片| 国产精品乡下勾搭老头1| 2023国产精品| 国产自产视频一区二区三区| 精品国产一区二区三区忘忧草| 日韩综合在线视频| 91麻豆精品国产91久久久更新时间| 午夜精品久久久久影视| 欧美视频你懂的| 亚洲a一区二区| 91精品国产乱码久久蜜臀| 久久99深爱久久99精品| 日韩三级在线免费观看| 国产一区二区久久| 国产精品色眯眯| 在线亚洲一区观看| 日韩国产一区二| 欧美一二三四区在线| 国产精品一区二区在线看| 中文字幕第一区二区| 欧洲精品一区二区三区在线观看| 亚洲高清免费在线| 日韩精品综合一本久道在线视频| 久久激情五月激情| 国产免费观看久久| 91成人免费在线视频| 蜜乳av一区二区| 国产精品高潮呻吟久久| 欧美综合久久久| 奇米精品一区二区三区在线观看 | 精品综合久久久久久8888| 日韩女优制服丝袜电影| 国产v综合v亚洲欧| 亚洲一区视频在线| 精品国一区二区三区| eeuss鲁一区二区三区| 亚洲电影欧美电影有声小说| 欧美sm美女调教| 99久久精品免费看国产| 五月综合激情日本mⅴ| 国产午夜久久久久| 欧美精品第一页| 高清beeg欧美| 日韩电影一区二区三区| 亚洲欧洲精品天堂一级| 91麻豆精品国产91久久久久| 波多野结衣视频一区| 日韩成人午夜电影| 亚洲视频电影在线| 精品日韩一区二区三区 | 日韩一级大片在线观看| 99视频精品全部免费在线| 男女激情视频一区| 中文字幕中文字幕在线一区| 欧美一级二级三级蜜桃| 91浏览器打开| 国产超碰在线一区| 免费观看一级欧美片| 亚洲综合视频在线观看| 国产欧美日韩麻豆91| 日韩一区二区高清| 欧美亚洲一区二区三区四区| 国产suv精品一区二区6| 久久99国产精品免费| 亚洲国产你懂的| 亚洲乱码一区二区三区在线观看| 26uuu久久综合| 日韩一级欧美一级| 91精品国产综合久久久蜜臀粉嫩 | 国产美女一区二区三区| 秋霞av亚洲一区二区三| 亚洲免费在线观看视频| 中文字幕乱码日本亚洲一区二区| 欧美一区二区免费视频| 欧美日韩成人综合天天影院| 色欧美日韩亚洲| 成人av在线播放网址| 国产夫妻精品视频| 国产裸体歌舞团一区二区| 激情国产一区二区 | 亚洲在线成人精品| 亚洲欧美激情在线| 一区二区三区中文在线| 亚洲色图欧美在线| 亚洲人妖av一区二区| 中文字幕一区在线观看视频| 日本一区二区三区四区 | 日韩小视频在线观看专区| 欧美精品日日鲁夜夜添| 欧美精品自拍偷拍动漫精品| 欧美日韩视频在线第一区| 欧美午夜在线一二页| 在线观看亚洲专区| 欧美老肥妇做.爰bbww| 欧美日韩国产经典色站一区二区三区| 欧美影院一区二区三区| 欧洲日韩一区二区三区| 欧美日韩和欧美的一区二区| 91精品蜜臀在线一区尤物| 91精品欧美福利在线观看| 日韩一区二区三区三四区视频在线观看| 日韩亚洲欧美一区二区三区| 日韩精品中文字幕在线一区| 精品福利一区二区三区免费视频| 精品国产百合女同互慰| 中文字幕不卡在线播放| 一区二区三区精品在线观看| 午夜不卡av免费| 在线亚洲一区观看| 日韩一级高清毛片| 欧美韩日一区二区三区四区| 最新中文字幕一区二区三区| 亚洲永久精品国产| 免费观看成人av| 高清成人在线观看| 欧美性猛片aaaaaaa做受| 日韩午夜激情av| 国产欧美视频一区二区| 一二三区精品视频| 久久99国内精品| 成人sese在线| 91麻豆精品国产91久久久| 欧美经典一区二区三区| 亚洲一区二区精品视频| 国产又黄又大久久| 欧洲激情一区二区| 26uuu亚洲| 一区二区三区电影在线播| 精品一区二区成人精品| 97久久精品人人澡人人爽| 91精品一区二区三区久久久久久| 国产婷婷色一区二区三区四区| 亚洲女同女同女同女同女同69| 蜜芽一区二区三区| 91黄色免费版| 亚洲黄色免费网站| 美腿丝袜亚洲一区| 91麻豆产精品久久久久久 | 亚洲精品欧美二区三区中文字幕| 免费成人小视频| 91免费精品国自产拍在线不卡| 欧美一区二区三区视频在线观看| 日本一区二区在线不卡| 免费人成黄页网站在线一区二区| 成人av在线一区二区三区| 日韩精品一区二区三区在线观看| 亚洲三级在线看| 激情另类小说区图片区视频区| 欧美天堂亚洲电影院在线播放| 中文欧美字幕免费| 麻豆成人免费电影| 欧美老肥妇做.爰bbww| 亚洲乱码国产乱码精品精小说| 国产精品资源网| 日韩视频一区二区三区| 亚洲成人高清在线| 在线视频国产一区| 成人欧美一区二区三区视频网页| 国产在线国偷精品免费看| 欧美精品一卡两卡| 亚洲丶国产丶欧美一区二区三区| 波多野洁衣一区| 中文字幕在线观看不卡| 国产伦精品一区二区三区视频青涩| 日韩欧美一级精品久久| 麻豆精品视频在线观看免费| 在线综合+亚洲+欧美中文字幕| 亚洲国产精品精华液网站| 欧美专区日韩专区| 亚洲国产精品一区二区www| 欧美亚洲自拍偷拍| 亚洲一级二级三级| 欧美偷拍一区二区|