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

📄 info_frm.frm

📁 VB和西门子s300plc串口通讯程序 能实现读写功能
💻 FRM
字号:
VERSION 5.00
Begin VB.Form INFO_FRM 
   Caption         =   "PLC信息"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form2"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "PLC的版本信息"
      Height          =   1935
      Left            =   240
      TabIndex        =   2
      Top             =   120
      Width           =   4215
      Begin VB.TextBox TxtAG 
         Height          =   270
         Index           =   1
         Left            =   1560
         TabIndex        =   10
         Top             =   720
         Width           =   2295
      End
      Begin VB.TextBox TxtAG 
         Height          =   270
         Index           =   3
         Left            =   1560
         TabIndex        =   9
         Top             =   1440
         Width           =   2295
      End
      Begin VB.TextBox TxtAG 
         Height          =   270
         Index           =   2
         Left            =   1560
         TabIndex        =   8
         Top             =   1080
         Width           =   2295
      End
      Begin VB.TextBox TxtAG 
         Height          =   270
         Index           =   0
         Left            =   1560
         TabIndex        =   7
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label4 
         Caption         =   "PLC的运行状态:"
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   1440
         Width           =   1575
      End
      Begin VB.Label Label3 
         Caption         =   "PLC的订货号:"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   1080
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "硬件版本:"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "软件版本:"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   360
         Width           =   1095
      End
   End
   Begin VB.CommandButton CmdCancel 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2400
      TabIndex        =   1
      Top             =   2280
      Width           =   1335
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "OK"
      Height          =   375
      Left            =   480
      TabIndex        =   0
      Top             =   2280
      Width           =   1455
   End
End
Attribute VB_Name = "INFO_FRM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub CmdCancel_Click()
Me.Visible = False
End Sub

Private Sub CmdOK_Click()
Static AGINFO As infotyp
Static value As Byte

res = new_ss(VerbIdx + 1)

If (res = 0) Then
    res = ag_info(AGINFO)
    TxtAG(0).Text = AGINFO.plcsw
    TxtAG(1).Text = AGINFO.pgsw
    TxtAG(2).Text = AGINFO.mlfb
End If

If (res = 0) Then
    res = ag_zustand(value)
    If (value = 0) Then
        TxtAG(3).Text = "RUN"
    Else
        TxtAG(3).Text = "STOP"
    End If
End If
   

If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub

⌨️ 快捷键说明

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