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

📄 frmdlother.frm

📁 基于化工行业造气岗位的自动化监控系统
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      TabIndex        =   39
      Top             =   5430
      Width           =   1560
   End
   Begin VB.Label SetedPara 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H00404040&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   330
      Index           =   4
      Left            =   5100
      TabIndex        =   38
      Top             =   5430
      Width           =   2385
   End
   Begin XPCURVELibCtl.OnCurve OnCurve1 
      Height          =   5115
      Index           =   1
      Left            =   7515
      OleObjectBlob   =   "frmDlOther.frx":08CA
      TabIndex        =   48
      Top             =   -15
      Width           =   5400
   End
   Begin VB.Image Image1 
      Height          =   4890
      Left            =   30
      Picture         =   "frmDlOther.frx":098C
      Stretch         =   -1  'True
      Top             =   15
      Width           =   7455
   End
End
Attribute VB_Name = "frmDlOther"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
Dim LastSingleTime As Single
Dim blnmove1 As Boolean

Private Sub cmdAutoAddCoal_Click()
If OptionCurve1(1).GiveValue = 0 Then
  frmBackAdjust.DownLoad OtherOpCur, Stove(OtherOpCur).HS_Control, Stove(OtherOpCur).GL_Count
Else
  frmBackAdjust.DownLoad OtherOpCur, Stove(OtherOpCur).HS_Control, 0
End If
End Sub

Private Sub cmdClearXiahui_Click()
'    Ack = False
'    Unload frmQuestion
'    frmQuestion.lbMsg = "您真的要清除下灰操作吗?"
'    frmQuestion.Show 1
'    If Ack Then
'             Call frmMain.DownAshDownload(0, OtherOpCur * 2 + 1, False)
'             SendMsg (")" & OtherOpCur & ")3)0)")
'             frmMain.cmdXiahui(OtherOpCur).Enabled = True
'             frmMain.cmdXiahui(OtherOpCur).Caption = "下灰"
'             frmMain.cmdXiahui(OtherOpCur).BackColor = &HC0E0FF
'             PostMsg (")" & OtherOpCur & ")3)0)")
'    End If
End Sub


Private Sub cmdFirstStart_Click()
'    If frmMain.ABBTransducer1.FirstStartTransducer(OtherOpCur + StoveStart) Then
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &H8000&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机初始化成功!"
'       frmMessage.Show
'    Else
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &HC0&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机初始化可能失败!"
'       frmMessage.Show
'    End If
End Sub

Private Sub cmdStartABB_Click()

'    If frmMain.ABBTransducer1.StartTransducer(OtherOpCur + StoveStart) Then
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &H8000&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机启动成功!"
'       frmMessage.Show
'    Else
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &HC0&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机启动失败!"
'       frmMessage.Show
'    End If
End Sub

Private Sub cmdStopABB_Click()
'    If frmMain.ABBTransducer1.StopTransducer(OtherOpCur + StoveStart) Then
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &H8000&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机停止成功!"
'       frmMessage.Show
'    Else
'       Unload frmMessage
'       frmMessage.lblMsg.ForeColor = &HC0&
'       frmMessage.lblMsg = OtherOpCur + StoveStart & "#炉条机停止失败!"
'       frmMessage.Show
'    End If
End Sub

Private Sub ctlSwitch1_OFF()
 If Stove(OtherOpCur).runstate = 1 Then
    Ack = False
    Unload frmQuestion
    frmQuestion.lbMsg = "您真的要马上停炉吗?"
    frmQuestion.Show 1
    If Ack Then
        Call frmMain.Start_Stop(OtherOpCur, False, 0)
        ctlSwitch1.State = False
    End If
 End If
End Sub

Private Sub ctlSwitch1_ONN()
On Error Resume Next
    If Stove(OtherOpCur).runstate = 2 Then
       ctlSwitch1.State = False
       Unload frmMessage
       frmMessage.lblMsg.ForeColor = &HC0&
       frmMessage.lblMsg = OtherOpCur + StoveStart & "号寻优微机未启动!"
       frmMessage.Show
       Exit Sub
    Else
        Ack = False
        Unload frmQuestion
        frmQuestion.lbMsg = "您真的要马上开炉吗?"
        frmQuestion.Show 1
        If Ack Then
            Call frmMain.Start_Stop(OtherOpCur, True, 0)
            ctlSwitch1.State = True
        End If
    End If
End Sub


Private Sub OptionCurve1_EndMove(Index As Integer)
    blnmove1 = False
End Sub

Private Sub OptionCurve1_GiveAdjust(Index As Integer)
 frmBackAdjust.DownLoad OtherOpCur, Stove(OtherOpCur).HS_Control, OptionCurve1(1).GiveValue
End Sub

Private Sub OptionCurve1_HomeMove(Index As Integer)
    blnmove1 = True
End Sub
Private Sub OptionCurve1_LeftMove(Index As Integer)
    blnmove1 = False
End Sub

Private Sub OptionCurve1_BackAdjust(Index As Integer)
     frmBackAdjust.DownLoad OtherOpCur, OptionCurve1(1).BackValue, Stove(OtherOpCur).GL_Control
End Sub

Private Sub OptionCurve1_RightMove(Index As Integer)
    Dim dtime As Long
    On Error Resume Next
    blnmove1 = False
    OptionCurve1(1).m_lnkControl.GetCurveTime 0, dtime
    If OptionCurve1(1).m_lnkControl.TimeAxisStartTime >= dtime Then
        blnmove1 = True
    End If
    OptionCurve1(1).m_lnkControl.TimeScroll 1
End Sub

Private Sub Form_Resize()
        Dim j As Long
        Set OptionCurve1(1).m_lnkControl = OnCurve1(1)
        OptionCurve1(1).m_IniFilePath = iniPaths & "stove.ini"
        OptionCurve1(1).blnMove = True
        OptionCurve1(1).Size = 0
        With OnCurve1(1)
            .CurveNum = Curve_Dl.CurveNum                   '曲线控件的曲线数目
            .SetCurveBufPt 8640                   '曲线控件记录点数
            .RMouseNum = 1                        '鼠标右键弹出线的数目
            .SetRMouseLine 1, &HFF&
            .RecPath = datPaths & "\History\QlHistory\" & Format(StoveStart + OtherOpCur, "000")
            .ReadCurveData -1, .RecPath & "\" & Date & ".REC", 1      '读取数据
            .UpdateDraw
            If .CurveNum = 0 Then .CurveNum = 1
            For j = 1 To .CurveNum
                .SetCurveLine j, 0, 1, Curve_Dl.Color(j - 1)
                .SetCurveYSize j, 0, Curve_Dl.HighScale(j - 1)
            Next
            blnmove1 = True
        End With
    
End Sub

Private Function Check() As Boolean
  If Not (IsNumeric(txtAddCoalCount) And IsNumeric(txtAddCoalTime)) Then
       Unload frmMessage
       frmMessage.BackColor = &HC0&
       frmMessage.lblMsg = "加煤次数或加煤时间输入错误!"
       frmMessage.Show
       Check = False
       Exit Function
  End If
          
  If Val(txtAddCoalCount) < 1 Then
   Check = False
   Exit Function
  End If
  If Val(txtAddCoalCount) > 4 Then
        Ack = False
        Unload frmQuestion
        frmQuestion.lbMsg = "加煤次数输入超限,您真的要连续加煤" & txtAddCoalCount & "次吗?"
        frmQuestion.Show 1
        If Not Ack Then
            Check = False
            Exit Function
        End If
  End If
  Check = True
End Function

Private Sub Check_Speed_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
'    If Check_Speed.Value = 1 Then
'       StoveValveInfr(OtherOpCur).SpeedAuto = True
'       cmdStartABB.Enabled = False
'       cmdStopABB.Enabled = False
'       cmdFirstStart.Enabled = False
'    Else
'       StoveValveInfr(OtherOpCur).SpeedAuto = False
'       cmdStartABB.Enabled = True
'       cmdStopABB.Enabled = True
'       cmdFirstStart.Enabled = True
'    End If
'    SendMsg "<" & OtherOpCur & "<" & StoveValveInfr(OtherOpCur).SpeedSetV & "<" & StoveValveInfr(OtherOpCur).SpeedAuto
'    PostMsg "<" & OtherOpCur & "<" & StoveValveInfr(OtherOpCur).SpeedSetV & "<" & StoveValveInfr(OtherOpCur).SpeedAuto
End Sub

Private Sub cmdAddCoal_Click()
    If Not Check Then
      Exit Sub
    End If
    Call frmMain.SpecialOperate(OtherOpCur, 23)
    StoveValveInfr(OtherOpCur).LastRequestId = 1
    StoveValveInfr(OtherOpCur).AddCoalCount = Val(txtAddCoalCount.Text)
    StoveValveInfr(OtherOpCur).LastAltTime = Timer
    StoveValveInfr(OtherOpCur).AddCoalTime = Val(txtAddCoalTime)
    cmdAddCoal.Enabled = False
    cmdAddCoal.BackColor = &HFF00&
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdJNYL_Click()
  If cmdJNYL.BackColor = &H8000000F Then
    Call frmMain.SpecialOperate(OtherOpCur, 27)
    cmdJNYL.BackColor = &HFF00&
  Else
    Call frmMain.SpecialOperate(OtherOpCur, 0)
    cmdJNYL.BackColor = &H8000000F
  End If
End Sub

Private Sub CmdOpenStove_Click()
   Call frmMain.Start_Stop(OtherOpCur, True, 0)
End Sub

Private Sub cmdSCFK_Click()
  If cmdSCFK.BackColor = &H8000000F Then
    Call frmMain.SpecialOperate(OtherOpCur, 26)
    cmdSCFK.BackColor = &HFF00&
  Else
    Call frmMain.SpecialOperate(OtherOpCur, 0)
    cmdSCFK.BackColor = &H8000000F
  End If
End Sub

Private Sub cmdSecurityStop_Click()
'      If cmdSecurityStop.BackColor = &H8000000F Then
'           If Stove(OtherOpCur).CurrentStep = 1 And Stove(OtherOpCur).Counter > 15 Then
'             SecurityStop(OtherOpCur) = 2
'           Else
'             SecurityStop(OtherOpCur) = 1
'           End If
'           cmdSecurityStop.BackColor = &HFF00&
'      Else
'           cmdSecurityStop.BackColor = &H8000000F
'           SecurityStop(OtherOpCur) = 0
'      End If
'      SendMsg (")" & OtherOpCur & ")2)" & SecurityStop(OtherOpCur) & ")0")
'      PostMsg (")" & OtherOpCur & ")2)" & SecurityStop(OtherOpCur) & ")0")
End Sub

Private Sub CmdStartCrazy_Click()
    Ack = False
    Unload frmQuestion
    If Stove(OtherOpCur).RunLazy Then
       frmQuestion.lbMsg = "您真的要停止制惰吗?"
    Else
       frmQuestion.lbMsg = "您真的要启动制惰吗?"
    End If
    frmQuestion.Show 1
    If Not Ack Then
       Exit Sub
    End If
    If Stove(OtherOpCur).RunLazy Then
        Call frmMain.Start_Other(OtherOpCur, 1, 0)
        SendMsg "&" & OtherOpCur & "&" & "False"
        Stove(OtherOpCur).RunLazy = False
        PostMsg "&" & OtherOpCur & "&" & "False"
    Else
        If Stove(OtherOpCur).RHS Then
           Call frmMain.Start_Other(OtherOpCur, 1, 0)
           TimeDelay 1000
        End If
        Call frmMain.Start_Other(OtherOpCur, 41, 0)
        SendMsg "&" & OtherOpCur & "&" & "True"
        Stove(OtherOpCur).RunLazy = True
        PostMsg "&" & OtherOpCur & "&" & "True"
    End If
End Sub

Private Sub CmdStartHS_Click()
    Ack = False
    Unload frmQuestion
    If Stove(OtherOpCur).RHS Then
      frmQuestion.lbMsg = "您真的要停止热回收吗?"
    Else
      frmQuestion.lbMsg = "您真的要" & CmdStartHS.Caption & "吗?"
    End If
    frmQuestion.Show 1
    If Not Ack Then
       Exit Sub
    End If
    If Stove(OtherOpCur).RHS Then
      Call frmMain.Start_Other(OtherOpCur, 1, 1)
      CmdStartHS.BackColor = &H8000000F
    Else
      Call frmMain.Start_Other(OtherOpCur, 17, 1)
      CmdStartHS.BackColor = &HFF00&
    End If
End Sub

Private Sub Command_Speed_Click()
'    On Error GoTo Errhandle
'    UpDown_Speed.Value = Val(Text_Speed.Text)
'    StoveValveInfr(OtherOpCur).SpeedSetV = Val(Text_Speed.Text)
'    SendMsg "<" & OtherOpCur & "<" & StoveValveInfr(OtherOpCur).SpeedSetV & "<" & StoveValveInfr(OtherOpCur).SpeedAuto
'    Unload frmMessage
'    If frmMain.SetABBTransducer(OtherOpCur + StoveStart, Val(Text_Speed.Text)) Then
'       frmMessage.lblMsg.ForeColor = &H8000&
'       frmMessage.lblMsg = "调节成功!  "
'    Else
'       frmMessage.lblMsg.ForeColor = &HC0&
'       frmMessage.lblMsg = "调节失败!"
'    End If
'    frmMessage.Show
'    WritePrivateProfileString "Stove" & OtherOpCur + 1, "Speed", Text_Speed.Text, iniPaths + "system.ini"
'    PostMsg "<" & OtherOpCur & "<" & StoveValveInfr(OtherOpCur).SpeedSetV & "<" & StoveValveInfr(OtherOpCur).SpeedAuto
'    Exit Sub

⌨️ 快捷键说明

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