📄 frmbackadjust.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmBackAdjust
BorderStyle = 1 'Fixed Single
Caption = "A系统回收给料调节"
ClientHeight = 1620
ClientLeft = 45
ClientTop = 330
ClientWidth = 5220
Icon = "frmBackAdjust.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1620
ScaleWidth = 5220
StartUpPosition = 1 '所有者中心
Begin VB.Timer Timer1
Interval = 2000
Left = 3420
Top = 450
End
Begin MSComCtl2.UpDown updGive
Height = 375
Index = 0
Left = 1200
TabIndex = 9
Top = 720
Width = 240
_ExtentX = 423
_ExtentY = 661
_Version = 393216
OrigLeft = 1200
OrigTop = 720
OrigRight = 1440
OrigBottom = 1095
Max = 100
Enabled = -1 'True
End
Begin VB.CommandButton cmdEdit
Caption = "参数修改&E"
Height = 375
Left = 840
TabIndex = 5
Top = 1200
Width = 1095
End
Begin VB.CommandButton cmdView
Caption = "参数浏览&V"
Height = 375
Left = 2400
TabIndex = 4
Top = 1200
Width = 1095
End
Begin VB.CommandButton cmdHide
Caption = "隐藏&I"
Height = 375
Left = 4080
TabIndex = 3
Top = 1200
Width = 1095
End
Begin MSComCtl2.UpDown updAdjust
Height = 375
Index = 0
Left = 1200
TabIndex = 1
Top = 240
Width = 240
_ExtentX = 423
_ExtentY = 661
_Version = 393216
OrigLeft = 1200
OrigTop = 240
OrigRight = 1440
OrigBottom = 615
Max = 100
Enabled = -1 'True
End
Begin VB.Label lblGive
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Index = 0
Left = 600
TabIndex = 8
Top = 720
Width = 840
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "给料"
ForeColor = &H00800000&
Height = 195
Index = 1
Left = 120
TabIndex = 7
Top = 720
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "回收"
ForeColor = &H00800000&
Height = 195
Index = 0
Left = 120
TabIndex = 6
Top = 360
Width = 360
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "1#炉"
ForeColor = &H00800000&
Height = 255
Index = 0
Left = 600
TabIndex = 2
Top = 0
Width = 735
End
Begin VB.Label lblBack
Alignment = 2 'Center
BackColor = &H80000009&
BorderStyle = 1 'Fixed Single
Caption = "0"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Index = 0
Left = 600
TabIndex = 0
Top = 240
Width = 840
End
End
Attribute VB_Name = "frmBackAdjust"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************湖南仪峰公司新模块化DCS组件*************************
'作者: 彭逢望,隆朋飞
'编写日期: 2004-6-15
'最后修改: 2004-9-25
'修改人: 彭逢望
'*****************************************************************
Private Sub cmdEdit_Click()
frmParaEdit.Show
End Sub
Private Sub cmdHide_Click()
Unload Me
End Sub
Private Sub cmdView_Click()
frmParaView.Show
End Sub
Private Sub Form_Load()
Dim RetVal As Long, SWgivedown As Boolean
RetVal = SetParent(Me.hWnd, frmMain.hWnd)
Dim i As Long
Label1(0).Caption = StoveStart & "#炉"
Me.Caption = "系统回收给料调节"
SWgivedown = ReadInIFiles("Stove" & 1, "GiveDown", "false", iniPaths + "Stove.ini")
updGive(0).Enabled = SWgivedown
For i = 1 To StoveNumber - 1
Load Label1(i)
Label1(i).Caption = i + StoveStart & "#炉"
Label1(i).Left = 855 * i + 600
Load lblBack(i)
lblBack(i).Left = 855 * i + 600
lblBack(i).Caption = Stove(i - 1).HS_Control
Load updAdjust(i)
updAdjust(i).Left = 615 + 855 * i + 600
lblBack(i).Visible = True
updAdjust(i).Visible = True
Label1(i).Visible = True
Load lblGive(i)
lblGive(i).Left = 855 * i + 600
lblGive(i).Caption = Stove(i - 1).GL_Control
Load updGive(i)
updGive(i).Left = 615 + 855 * i + 600
updGive(i).Visible = True
lblGive(i).Visible = True
SWgivedown = ReadInIFiles("Stove" & i + 1, "GiveDown", "false", iniPaths + "Stove.ini")
updGive(i).Enabled = SWgivedown
Next
For i = 0 To StoveNumber - 1
lblBack(i).Caption = Stove(i).HS_Control
lblGive(i).Caption = Stove(i).GL_Control
Next
Me.Width = Label1(StoveNumber - 1).Left + 1000
cmdHide.Left = Me.Width - 1200
cmdView.Left = Me.Width - 2400
cmdEdit.Left = Me.Width - 3600
End Sub
Private Sub Timer1_Timer()
For i = 0 To StoveNumber - 1
lblBack(i).Caption = Stove(i).HS_Control
lblGive(i).Caption = Stove(i).GL_Control
Next
End Sub
Private Sub updAdjust_DownClick(Index As Integer)
If Val(lblBack(Index).Caption) > 0 Then
lblBack(Index).Caption = Val(lblBack(Index).Caption) - 1
DownLoad Index, CLng(lblBack(Index).Caption), Stove(Index).GL_Control
End If
End Sub
Private Sub updAdjust_UpClick(Index As Integer)
If Val(lblBack(Index).Caption) < 25 Then
lblBack(Index).Caption = Val(lblBack(Index).Caption) + 1
DownLoad Index, CLng(lblBack(Index).Caption), Stove(Index).GL_Control
End If
End Sub
Private Sub updGive_DownClick(Index As Integer)
If Val(lblGive(Index).Caption) > 0 Then
lblGive(Index).Caption = Val(lblGive(Index).Caption) - 1
DownLoad Index, Stove(Index).HS_Control, CLng(lblGive(Index).Caption)
End If
End Sub
Private Sub updGive_UpClick(Index As Integer)
If Val(lblGive(Index).Caption) < 100 Then
lblGive(Index).Caption = Val(lblGive(Index).Caption) + 1
DownLoad Index, Stove(Index).HS_Control, CLng(lblGive(Index).Caption)
End If
End Sub
Public Function DownLoad(ByVal ID As Long, Optional ByVal vBack As Long, Optional ByVal vGive As Long)
Dim bytData(12) As Byte
Dim CheckSum As Long
Dim i As Long
On Error Resume Next
bytData(0) = 255
With Stove(ID)
bytData(1) = CheckRange(.Queue_Control, 5, 0)
CheckSum = CheckSum + bytData(1)
bytData(2) = 1
CheckSum = CheckSum + bytData(2)
bytData(3) = CheckRange(.XJN_Control, 4, 0)
CheckSum = CheckSum + bytData(3)
bytData(4) = CheckRange(.CF_Control, 55, 30)
CheckSum = CheckSum + bytData(4)
bytData(5) = CheckRange(vBack, 40, 0)
CheckSum = CheckSum + bytData(5)
bytData(6) = CheckRange(.SC_Control, 50, 23)
CheckSum = CheckSum + bytData(6)
bytData(7) = CheckRange(vGive, 100, 0)
CheckSum = CheckSum + bytData(7)
bytData(8) = CheckRange(.CycleTime, 2, 0) + CheckRange(.GL_Count, 3, 0) * 16
CheckSum = CheckSum + bytData(8)
bytData(9) = .XXWD_Control / 3
CheckSum = CheckSum + bytData(9)
bytData(10) = .SXWD_Control / 3
CheckSum = CheckSum + bytData(10)
bytData(11) = CheckRange(.SJN_Control, 4, 0) + CheckRange(.XJN_Control, 4, 0) * 16
CheckSum = CheckSum + bytData(11)
End With
bytData(12) = CheckSum Mod 256
stoveMsg Trim(Stove(ID).ip), bytData
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -