⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple vb .net opc example.vb

📁 vb6.0与OPCSERVER的完整例子
💻 VB
📖 第 1 页 / 共 5 页
字号:
Public Class SimpleOPCInterface
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Public WithEvents _OPCItemSyncReadButton_9 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_8 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_7 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_6 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_5 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_4 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_3 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_2 As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_1 As System.Windows.Forms.Button
    Public WithEvents _OPCItemActiveState_9 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_8 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_7 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_6 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_5 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_4 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_3 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_2 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemActiveState_1 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemWriteButton_9 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_8 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_7 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_6 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_5 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_4 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_3 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_2 As System.Windows.Forms.Button
    Public WithEvents _OPCItemWriteButton_1 As System.Windows.Forms.Button
    Public WithEvents _OPCItemValueToWrite_9 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_8 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_7 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_6 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_5 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_4 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_3 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_2 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValueToWrite_1 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_9 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_8 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_7 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_6 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_5 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_4 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_3 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_2 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_1 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_9 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_8 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_7 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_6 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_5 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_4 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_3 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_2 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_1 As System.Windows.Forms.TextBox
    Public WithEvents OPCAddItems As System.Windows.Forms.Button
    Public WithEvents _OPCItemName_9 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_8 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_7 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_6 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_5 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_4 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_3 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_2 As System.Windows.Forms.TextBox
    Public WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Public WithEvents _OPCItemName_1 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemName_0 As System.Windows.Forms.TextBox
    Public WithEvents OPCServerName As System.Windows.Forms.TextBox
    Public WithEvents AvailableOPCServerList As System.Windows.Forms.ListBox
    Public WithEvents ListOPCServers As System.Windows.Forms.Button
    Public WithEvents OPCServerConnect As System.Windows.Forms.Button
    Public WithEvents OPCGroupFrame As System.Windows.Forms.GroupBox
    Public WithEvents RemoveOPCGroup As System.Windows.Forms.Button
    Public WithEvents AddOPCGroup As System.Windows.Forms.Button
    Public WithEvents GroupActiveState As System.Windows.Forms.CheckBox
    Public WithEvents GroupDeadBand As System.Windows.Forms.TextBox
    Public WithEvents GroupUpdateRate As System.Windows.Forms.TextBox
    Public WithEvents OPCGroupName As System.Windows.Forms.TextBox
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    Public WithEvents ExitExample As System.Windows.Forms.Button
    Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    Public WithEvents OPCNodeName As System.Windows.Forms.TextBox
    Public WithEvents DisconnectFromServer As System.Windows.Forms.Button
    Public WithEvents lblOPCNodeName As System.Windows.Forms.Label
    Public WithEvents Frame2 As System.Windows.Forms.GroupBox
    Public WithEvents OPCRemoveItems As System.Windows.Forms.Button
    Public WithEvents _OPCItemSyncReadButton_0 As System.Windows.Forms.Button
    Public WithEvents _OPCItemActiveState_0 As System.Windows.Forms.CheckBox
    Public WithEvents _OPCItemWriteButton_0 As System.Windows.Forms.Button
    Public WithEvents _OPCItemValueToWrite_0 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemQuality_0 As System.Windows.Forms.TextBox
    Public WithEvents _OPCItemValue_0 As System.Windows.Forms.TextBox
    Public WithEvents Label9 As System.Windows.Forms.Label
    Public WithEvents Label8 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Public WithEvents Label4 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Me.components = New System.ComponentModel.Container
		Me._OPCItemSyncReadButton_9 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_8 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_7 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_6 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_5 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_4 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_3 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_2 = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_1 = New System.Windows.Forms.Button
		Me._OPCItemActiveState_9 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_8 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_7 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_6 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_5 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_4 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_3 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_2 = New System.Windows.Forms.CheckBox
		Me._OPCItemActiveState_1 = New System.Windows.Forms.CheckBox
		Me._OPCItemWriteButton_9 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_8 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_7 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_6 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_5 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_4 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_3 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_2 = New System.Windows.Forms.Button
		Me._OPCItemWriteButton_1 = New System.Windows.Forms.Button
		Me._OPCItemValueToWrite_9 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_8 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_7 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_6 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_5 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_4 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_3 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_2 = New System.Windows.Forms.TextBox
		Me._OPCItemValueToWrite_1 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_9 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_8 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_7 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_6 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_5 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_4 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_3 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_2 = New System.Windows.Forms.TextBox
		Me._OPCItemQuality_1 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_9 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_8 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_7 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_6 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_5 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_4 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_3 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_2 = New System.Windows.Forms.TextBox
		Me._OPCItemValue_1 = New System.Windows.Forms.TextBox
		Me.OPCAddItems = New System.Windows.Forms.Button
		Me._OPCItemName_9 = New System.Windows.Forms.TextBox
		Me._OPCItemName_8 = New System.Windows.Forms.TextBox
		Me._OPCItemName_7 = New System.Windows.Forms.TextBox
		Me._OPCItemName_6 = New System.Windows.Forms.TextBox
		Me._OPCItemName_5 = New System.Windows.Forms.TextBox
		Me._OPCItemName_4 = New System.Windows.Forms.TextBox
		Me._OPCItemName_3 = New System.Windows.Forms.TextBox
		Me._OPCItemName_2 = New System.Windows.Forms.TextBox
		Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
		Me._OPCItemName_1 = New System.Windows.Forms.TextBox
		Me._OPCItemName_0 = New System.Windows.Forms.TextBox
		Me.OPCServerName = New System.Windows.Forms.TextBox
		Me.AvailableOPCServerList = New System.Windows.Forms.ListBox
		Me.ListOPCServers = New System.Windows.Forms.Button
		Me.OPCServerConnect = New System.Windows.Forms.Button
		Me.RemoveOPCGroup = New System.Windows.Forms.Button
		Me.AddOPCGroup = New System.Windows.Forms.Button
		Me.GroupActiveState = New System.Windows.Forms.CheckBox
		Me.GroupDeadBand = New System.Windows.Forms.TextBox
		Me.GroupUpdateRate = New System.Windows.Forms.TextBox
		Me.OPCGroupName = New System.Windows.Forms.TextBox
		Me.OPCNodeName = New System.Windows.Forms.TextBox
		Me.DisconnectFromServer = New System.Windows.Forms.Button
		Me.OPCRemoveItems = New System.Windows.Forms.Button
		Me._OPCItemSyncReadButton_0 = New System.Windows.Forms.Button
		Me._OPCItemActiveState_0 = New System.Windows.Forms.CheckBox
		Me._OPCItemWriteButton_0 = New System.Windows.Forms.Button
		Me._OPCItemValueToWrite_0 = New System.Windows.Forms.TextBox
		Me.OPCGroupFrame = New System.Windows.Forms.GroupBox
		Me.Label6 = New System.Windows.Forms.Label
		Me.Label5 = New System.Windows.Forms.Label
		Me.Label1 = New System.Windows.Forms.Label
		Me.ExitExample = New System.Windows.Forms.Button

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -