📄 frmsigstove1.frm
字号:
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 5
Left = 3840
TabIndex = 154
Top = 4560
Width = 1335
End
Begin VB.Label StoveStep
BackColor = &H00000000&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 6
Left = 5160
TabIndex = 153
Top = 4560
Width = 1935
End
Begin VB.Label StoveStep
BackColor = &H00004080&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 3
Left = 3240
TabIndex = 140
Top = 4560
Width = 375
End
Begin VB.Image Image2
Height = 4170
Left = 0
Picture = "frmSigStove1.frx":00B9
Stretch = -1 'True
Top = 0
Width = 7095
End
End
Attribute VB_Name = "frmSigStove1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim blOpMove As Boolean
Dim LastSingleTime As Single
Dim strView As String '状态条显示的内容
Dim strData As String '数据显示内容
Dim iStepContralTime(0 To 9) As Integer
Private Sub CmdSet_Click(Index As Integer)
Dim i As Long, j As Long
Dim Check_ValueTable As String
Select Case Index
Case 0
Unload Me
Case 1
Case 2
lngPopedom = 3
frmPassword.Show 1
If mPassword Then
mPassword = False
Frame1(0).Visible = True
Frame1(0).ZOrder 0
Else
Exit Sub
End If
Case 3
Check_ValueTable = ""
For j = 0 To Check_Value.UBound
Check_ValueTable = Check_ValueTable & CStr(Check_Value(j).Value)
Check_Value(j).Enabled = False
Next
WritePrivateProfileString "SigStove", "SET", Check_ValueTable, iniPaths + "stove.ini"
Case 4
Frame1(0).Visible = False
Case 5
Unload Me
End Select
End Sub
Private Sub cmdSpeed_Click()
Dim Add, Chn As Integer, tempVal As Single
cmdSpeed.Enabled = False
Add = MotherBoard(Signal(130 + Stove_Index).Board).Port_Dip
Chn = Signal(130 + Stove_Index).Channel
tempVal = Val(Text1(4).Text) / 1600 * 16 + 4
If isRead Then
strOUTCommand = Format(Add, "00") & Format(Chn, "0") & Format(tempVal, "00.000")
Else
SynchroMsg "T" & Format(Add, "00") & Format(Chn, "0") & Format(tempVal, "00.000")
End If
' strTRANCommand = Format(Stove_Index + 1, "00") & Format(Text1(4).Text, "0000")
WritePrivateProfileString "TRAN", "SetSpeed" & Stove_Index + 1, CStr(Text1(4).Text), iniPaths + "system.ini"
Stove(Stove_Index).SetSpeed = Val(Text1(4).Text)
SynchroMsg ")" & Stove_Index + 1 & ")" & Trim(Text1(4).Text) & ")" & strOUTCommand
TimeDelay 1000
cmdSpeed.Enabled = True
End Sub
Private Sub StopTransducer_Click()
StopTransducer.Enabled = False
strTRANCommand = Format(Stove_Index + 1, "00") & Format(0, "0000")
SynchroMsg ")" & Stove_Index + 1 & ")" & "0" & ")" & strTRANCommand
TimeDelay 1000
StopTransducer.Enabled = True
End Sub
Private Sub CmdStartCrazy_Click()
Ack = False
Unload frmQuestion
If Stove(Stove_Index).RunLazy Then
frmQuestion.lbMsg = "您真的要停止制惰吗?"
Else
frmQuestion.lbMsg = "您真的要启动制惰吗?"
End If
frmQuestion.Show 1
If Not Ack Then
Exit Sub
End If
If Stove(Stove_Index).RunLazy Then
Call frmMain.Start_Other(Stove_Index, 1, 1)
SynchroMsg "&" & Stove_Index & "&" & "False"
Stove(Stove_Index).RunLazy = False
Else
If Stove(Stove_Index).RHS Then
Call frmMain.Start_Other(Stove_Index, 1, 1)
TimeDelay 1000
End If
Call frmMain.Start_Other(Stove_Index, 41, 1)
SynchroMsg "&" & Stove_Index & "&" & "True"
Stove(Stove_Index).RunLazy = True
End If
End Sub
Private Sub CmdStartHS_Click()
Ack = False
Unload frmQuestion
If Stove(Stove_Index).RHS Then
frmQuestion.lbMsg = "您真的要停止热回收吗?"
Else
frmQuestion.lbMsg = "您真的要" & CmdStartHS.Caption & "吗?"
End If
frmQuestion.Show 1
If Not Ack Then
Exit Sub
End If
If Stove(Stove_Index).RHS Then
Call frmMain.Start_Other(Stove_Index, 1, 1)
CmdStartHS.BackColor = &H8000000F
Else
Call frmMain.Start_Other(Stove_Index, 17, 1)
CmdStartHS.BackColor = &HFF00&
End If
End Sub
Private Sub Form_Load()
Dim hwndSigfrm As Long
Dim i As Integer, Tempstr As String, SWGV As Boolean
hwndSigfrm = SetParent(Me.hWnd, frmMain.hWnd)
Me.Caption = Me.Caption & Stove_Index + StoveStart & "#炉特殊操作"
Text1(4).Text = Stove(Stove_Index).SetSpeed
'获得每个步序的总秒数
iStepContralTime(0) = 14
iStepContralTime(1) = 5
iStepContralTime(2) = Stove(Stove_Index).CF_Control
iStepContralTime(3) = Stove(Stove_Index).HS_Control
iStepContralTime(4) = Stove(Stove_Index).SJN_Control * 3 + 4
iStepContralTime(5) = Stove(Stove_Index).SC_Control
iStepContralTime(6) = Stove(Stove_Index).XC_Control
Tempstr = ReadInIFiles("SigStove", "SET", "000000000000000000000", iniPaths + "stove.ini")
For i = 0 To Check_Value.UBound
Check_Value(i).Value = Val(Mid$(Tempstr, i + 1, 1))
Next
OptionCurve1(0).Visible = True
OptionCurve1(0).BackEnabled = True
SWGV = ReadInIFiles("Stove" & Stove_Index, "GiveDown", "False", iniPaths + "Stove.ini")
If SWGV Then
OptionCurve1(0).Size = 2
Else
OptionCurve1(0).Size = 3
End If
OptionCurve1(0).Help = Trim(ReadInIFiles("DataS", "CurveHelp", "| | | | |", iniPaths + "Stove.ini"))
OptionCurve1(0).blnData = False
OptionCurve1(0).State = StoveStart + Stove_Index & "#:"
Set OptionCurve1(0).m_lnkControl = OnCurve1(0)
OptionCurve1(0).m_IniFilePath = iniPaths & "stove.ini"
OptionCurve1(0).blnMove = True
With OnCurve1(0)
.CurveNum = Curve_Dl.CurveNum
.SetCurveBufPt 8640
.RMouseNum = 1
.SetRMouseLine 1, &HFF&
.RecPath = datPaths & "\History\QlHistory\" & Format(Stove_Index + 1, "000")
.ReadCurveData -1, .RecPath & "\" & Format(Date, "yyyy-mm-dd") & ".REC", 1
.UpdateDraw
If .CurveNum = 0 Then .CurveNum = 1
For i = 1 To .CurveNum
.SetCurveLine i, 0, 1, Curve_Dl.Color(i - 1)
.SetCurveYSize i, 0, Curve_Dl.HighScale(i - 1)
Next
End With
UserData1(0).Number = Val(ReadInIFiles("DataS", "UserDataNumber", "2", iniPaths + "Stove.ini"))
UserData1(0).Help = Trim(ReadInIFiles("DataS", "DataHelp", "||||", iniPaths + "Stove.ini"))
blOpMove = True
TimeStep.Enabled = True
Timer1.Enabled = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = False
TimeStep.Enabled = False
OptionCurve1(0).OptionClose
Set frmSigStove = Nothing
End Sub
Private Sub OnCurve1_ClickIn(Index As Integer, ByVal X As Long, ByVal Y As Long, ByVal btime As String)
Dim mName() As String
Dim mUnit() As String
Dim mColor() As Long
Dim mMag() As Long
Dim i As Long, j As Long
i = Curve_Dl.CurveNum - 1
ReDim mName(0 To i) As String
ReDim mUnit(0 To i) As String
ReDim mColor(0 To i) As Long
ReDim mMag(0 To i) As Long
DoEvents
For j = 0 To i
mName(j) = Curve_Dl.CurveName(j)
mUnit(j) = Curve_Dl.CurveUnit(j)
mColor(j) = Curve_Dl.Color(j)
mMag(j) = Curve_Dl.Mag(j)
Next
OptionCurve1(0).OptionClick btime, Stove_Index + StoveStart & "#" & Curve_Dl.Name, mName(), mUnit(), mColor(), mMag()
End Sub
Private Sub OptionCurve1_Attrib(Index As Integer)
Dim mName() As String
Dim mUnit() As String
Dim mColor() As Long
Dim mMag() As Long
Dim i As Long, j As Long
On Error Resume Next
i = Curve_Dl.CurveNum - 1
ReDim mName(0 To i) As String
ReDim mUnit(0 To i) As String
ReDim mColor(0 To i) As Long
ReDim mMag(0 To i) As Long
For j = 0 To i
mName(j) = Curve_Dl.CurveName(j)
mUnit(j) = Curve_Dl.CurveUnit(j)
mColor(j) = Curve_Dl.Color(j)
mMag(j) = Curve_Dl.Mag(j)
Next
OptionCurve1(Index).OptionClick "", Stove_Index + StoveStart & "#" & Curve_Dl.Name, mName(), mUnit(), mColor(), mMag()
End Sub
Private Sub OptionCurve1_BackAdjust(Index As Integer)
frmBackAdjust.DownLoad Stove_Index, OptionCurve1(0).BackValue, Stove(Stove_Index).GL_Control
End Sub
Private Sub OptionCurve1_EndMove(Index As Integer)
blOpMove = False
End Sub
Private Sub OptionCurve1_HomeMove(Index As Integer)
blOpMove = True
End Sub
Private Sub OptionCurve1_LeftMove(Index As Integer)
blOpMove = False
End Sub
Private Sub OptionCurve1_RightMove(Index As Integer)
Dim dtime As Long
blOpMove = False
OptionCurve1(0).m_lnkControl.GetCurveTime 0, dtime
If OptionCurve1(0).m_lnkControl.TimeAxisStartTime >= dtime Then
blOpMove = True
End If
OptionCurve1(0).m_lnkControl.TimeScroll 1
End Sub
Private Sub Switch1_OFF()
If Stove(Stove_Index).runstate = 1 Then
If Stove(Stove_Index).CurrentStep = 1 And (Stove(Stove_Index).Counter > 10 And Stove(Stove_Index).Counter < 20) Then
Call frmMain.Start_Stop(Stove_Index, False, 2)
safety_Stop(Stove_Index) = False
Else
safety_Stop(Stove_Index) = True
End If
End If
End Sub
Private Sub Switch1_ONN()
On Error Resume Next
If Stove(Stove_Index).runstate <> 0 Then
Switch1(Stove_Index).State = False
Unload frmMessage
frmMessage.lblMsg = Stove_Index + StoveStart & "号寻优微机未启动!"
frmMessage.Show
Exit Sub
Else
Call frmMain.Start_Stop(Stove_Index, True, 2)
End If
End Sub
Private Sub Timer1_Timer()
Dim dtime As String
Dim i As Integer
dtime = Format(Date, "yy-mm-dd") & "#" & Format(Time, "hh:mm:ss")
OptionCurve1(0).State = frmMain.OptionCurve(Stove_Index).State
OptionCurve1(0).BackValue = frmMain.OptionCurve(Stove_Index).BackValue
OptionCurve1(0).GiveValue = frmMain.OptionCurve(Stove_Index).GiveValue
With OnCurve1(0)
.InputC3Data dtime, Stove(Stove_Index).SXWD, Stove(Stove_Index).XXWD, Stove(Stove_Index).ZHWD '打印单炉曲线
.InputData 4, Stove(Stove_Index).YHWD
.InputData 5, Stove(Stove_Index).JTWD
.InputData 6, Stove(Stove_Index).Speed
.InputData 7, Stove(Stove_Index).ZQYL
.InputData 8, Stove(Stove_Index).ZQLL
If blOpMove Then
.SetShowTimeStart dtime
End If
End With
' LED2.Value = Signal(100 + Stove_Index).CalValue
If Stove(Stove_Index).runstate = 1 Then
ShapeStoveState.FillColor = &HFF00&
If safety_Stop(Stove_Index) = True Then
Switch1.State = False
Switch1.Enableden = False
Else
Switch1.State = True
Switch1.Enableden = True
End If
If Stove(Stove_Index).RunLazy Then
CmdStartCrazy.BackColor = &HFF00&
CmdStartCrazy.Caption = "停止制惰"
CmdStartCrazy.Enabled = True
CmdStartHS.BackColor = &H8000000F
CmdStartHS.Caption = "启动热回收"
CmdStartHS.Enabled = False
Else
CmdStartCrazy.Enabled = True
CmdStartCrazy.BackColor = &H8000000F
CmdStartCrazy.Caption = "启动制惰"
CmdStartHS.Enabled = True
If Stove(Stove_Index).RHS = True Then
CmdStartHS.BackColor = &HFF00&
CmdStartHS.Caption = "停止热回收"
Else
CmdStartHS.BackColor = &H8000000F
CmdStartHS.Caption = "启动热回收"
End If
End If
Else
Switch1.State = False
ShapeStoveState.FillColor = &HFF&
CmdStartCrazy.Enabled = False
CmdStartHS.Enabled = False
If Stove(Stove_Index).RunLazy Then
CmdStartCrazy.BackColor = &HFF00&
CmdStartCrazy.Caption = "停止制惰"
Else
CmdStartCrazy.BackColor = &H8000000F
CmdStartCrazy.Caption = "启动制惰"
End If
End If
With OptionCurve1(0)
.Data0 = strView
.Data1 = Stove(Stove_Index).Counter
.Data2 = Stove(Stove_Index).Cycle
.Data3 = Stove(Stove_Index).SXWD
.Data4 = Stove(Stove_Index).XXWD
.Data5 = Stove(Stove_Index).Speed
.Data6 = Stove(Stove_Index).ZHWD
.Data7 = Stove(Stove_Ind
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -