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

📄 zkhm.frm

📁 用于控制氧乐果生产的程序
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      X2              =   888
      Y1              =   1932
      Y2              =   1932
   End
   Begin VB.Line Line1V 
      Index           =   0
      X1              =   760
      X2              =   900
      Y1              =   120
      Y2              =   120
   End
   Begin VB.Line Line1H 
      Index           =   0
      X1              =   900
      X2              =   900
      Y1              =   1440
      Y2              =   1590
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Kg"
      Height          =   180
      Index           =   8
      Left            =   7008
      TabIndex        =   31
      Top             =   3744
      Width           =   192
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Kg"
      Height          =   180
      Index           =   7
      Left            =   6960
      TabIndex        =   30
      Top             =   2040
      Width           =   192
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Kg"
      Height          =   180
      Index           =   6
      Left            =   6960
      TabIndex        =   29
      Top             =   200
      Width           =   192
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "Label4"
      Height          =   180
      Index           =   0
      Left            =   4272
      TabIndex        =   28
      Top             =   5520
      Width           =   576
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Label3"
      Height          =   180
      Index           =   0
      Left            =   3432
      TabIndex        =   27
      Top             =   5520
      Width           =   576
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "工作状态"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   2
      Left            =   5208
      TabIndex        =   23
      Top             =   4037
      Width           =   720
   End
   Begin VB.Label Label8 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "反应时间"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   2
      Left            =   5208
      TabIndex        =   22
      Top             =   4318
      Width           =   732
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "投料总量"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   1
      Left            =   5208
      TabIndex        =   21
      Top             =   3756
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "工作状态"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   1
      Left            =   5208
      TabIndex        =   17
      Top             =   2276
      Width           =   720
   End
   Begin VB.Label Label8 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "反应时间"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   1
      Left            =   5208
      TabIndex        =   16
      Top             =   2548
      Width           =   732
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "投料总量"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   0
      Left            =   5208
      TabIndex        =   15
      Top             =   2004
      Width           =   720
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Label9"
      Height          =   180
      Index           =   0
      Left            =   2700
      TabIndex        =   11
      Top             =   5520
      Width           =   576
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "投料总量"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   3
      Left            =   5208
      TabIndex        =   10
      Top             =   180
      Width           =   720
   End
   Begin VB.Label Label8 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "反应时间"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   0
      Left            =   5208
      TabIndex        =   9
      Top             =   726
      Width           =   732
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackColor       =   &H0000C000&
      BackStyle       =   0  'Transparent
      Caption         =   "工作状态"
      ForeColor       =   &H80000008&
      Height          =   180
      Index           =   0
      Left            =   5208
      TabIndex        =   8
      Top             =   453
      Width           =   720
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "一 号 反 应 釜"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   13.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   1380
      Index           =   4
      Left            =   264
      TabIndex        =   7
      Top             =   132
      Width           =   300
      WordWrap        =   -1  'True
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1728
      Index           =   2
      Left            =   -24
      Top             =   3684
      Width           =   7368
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "三 号 反 应 釜"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   13.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   1380
      Index           =   2
      Left            =   288
      TabIndex        =   5
      Top             =   3840
      Width           =   300
      WordWrap        =   -1  'True
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1800
      Index           =   1
      Left            =   -24
      Top             =   1860
      Width           =   7368
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "二 号 反 应 釜"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   13.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   1380
      Index           =   1
      Left            =   276
      TabIndex        =   3
      Top             =   2052
      Width           =   300
      WordWrap        =   -1  'True
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1800
      Index           =   0
      Left            =   -24
      Top             =   36
      Width           =   7368
   End
End
Attribute VB_Name = "zkhmfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private i, j As Integer
Private time1(3), time2 As Date
Private mvarfyfWenDu(3) As Single '本地复本
Private mvartlfaKaiDu(3) As Single   '本地复本
Private mvaryjaLiuLiang(3) As Single   '本地复本
Private mvarjlgYeWei(3) As Single   '本地复本
Private mvarlqysWenDu(3) As Single   '本地复本
Private mvarindex As Integer
Private TimeLength(3) As Long
Private msngKaiDu(3) As Single
Private Sub Command2_Click(Index As Integer)
On Error Resume Next
'******************************
'以下用于仿真 , 实际运行时请注释掉
'Select Case Index
'    Case 0
'        Interval(0) = 0
'        Interval(1) = 0
'    Case 1
'        Interval(3) = 0
'        Interval(4) = 0
'    Case 2
'        Interval(6) = 0
'        Interval(7) = 0
'End Select
'以上用于仿真,实际运行时请注释掉
'******************************

Picture1(Index).Cls
TimeLength(Index + 1) = 0
Dim strControlType As String
'********************
'选择自动动控制方式
'********************
If (gblnIsAuto(Index + 1)) Then
    Text1(Index).BackColor = &H80000000
    With mainfrm
    Select Case Index + 1
        Case 1
            .fyf1_Control.Control
          Case 2
            .fyf2_Control.Control
          Case 3
            .fyf3_Control.Control
    End Select
    End With
    gIsTouLiao(Index + 1) = True
    strControlType = "自动开始"
    mainfrm.tmrControl(Index).Enabled = True
'********************
'选择手动控制方式
'********************
Else
    Text1(Index).BackColor = RGB(50, 200, 150)
    With mainfrm
    gintkdSheDing(Index + 1) = CInt(Text1(Index).Text)
    Select Case Index + 1
        Case 1
            Call A_out(.fyf1_Control.tlfBaseAddress, .fyf1_Control.tlfChannel, gintkdSheDing(1), 0)
        Case 2
            Call A_out(.fyf2_Control.tlfBaseAddress, .fyf2_Control.tlfChannel, gintkdSheDing(2), 0)
        Case 3
            Call A_out(.fyf3_Control.tlfBaseAddress, .fyf3_Control.tlfChannel, gintkdSheDing(3), 0)
    End Select
    End With
    If CSng(Text1(Index).Text) <> 0 Then gIsTouLiao(Index + 1) = True
    msngKaiDu(Index + 1) = CSng(Text1(Index).Text)
    strControlType = "手动开始"
    mainfrm.tmrControl(Index).Enabled = False
End If
'*******************************
'为module_control类的实例赋属性值
'*******************************
With mainfrm
Select Case Index + 1
    Case 1
        .fyf1_Control.WorkState = True
        .fyf1_Control.Counter = 0
    Case 2
        .fyf2_Control.WorkState = True
        .fyf2_Control.Counter = 0
    Case 3
        .fyf3_Control.WorkState = True
        .fyf3_Control.Counter = 0
End Select
End With
Call WriteBlackBox
Command2(Index).Enabled = False
'**********************************
'改变建立批次菜单中子菜单Enabled属性
'**********************************
With mainfrm
Select Case Index + 1
    Case 1
        .mnuCreat1.Enabled = False
        .m_fyf1Add.Enabled = True
    Case 2
        .mnuCreat2.Enabled = False
        .m_fyf2Add.Enabled = True
    Case 3
        .mnuCreat3.Enabled = False
        .m_fyf3Add.Enabled = True
End Select
End With

TimeLength(Index + 1) = 0
'******************************
'为时间轴刻度重新赋值
'******************************
time1(Index + 1) = Time()
For i = 1 To 4
    Select Case Index + 1
        Case 1
        With Label9(i)
            .Caption = Format(time1(1), "hh:mm")
        End With
        Case 2
        With Label3(i)
            .Caption = Format(time1(2), "hh:mm")
        End With
        Case 3

⌨️ 快捷键说明

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