双螺杆挤压机使用说明 - 图文 联系客服

发布时间 : 星期一 文章双螺杆挤压机使用说明 - 图文更新完毕开始阅读1bbd3c0b03d8ce2f00662338

3.P I D参数设置

4报警参数设置

13

5电机操作控制

6风机开启温度设定

14

五、软件设计 1. 程序流程图:

2.软件中用到变量:

Dim current_total_updata As Integer '定义主电流

Dim current_mainmotor_updata As Integer ' 定义主电机电流上限 Dim current_feedmotor_updata As Integer ' 定义喂料电机电流上限 Dim current_cutmotor_updata As Integer ' 定义切粒电机电流上限 Dim current_pumpmotor_updata As Integer ' 定义泵电机电流上限 Dim preasure_updata As Integer ' 定义容压上限 Dim preasure_downdata As Integer ' 定义容压下限 Dim TEm_Updata As Integer ' 定义容温上限 Dim Tem_downdata As Integer ' 定义容温下限 Dim DataH8 As Integer ' 定义高八位存放位置 Dim DataL4 As Integer ' 定义低四位存放位置 Dim data As Integer ' 定义总数据存放位置

Dim Tem_address(0 To 15) As Integer ' 定义存放采样值地址 Dim Tem_set_num(0 To 15) As Integer ' 定义设定温度 Dim Alarm_adress As Integer ' 定义报警地址 Dim KPI As Integer ' 定义pid参数KPI Dim KII As Integer ' 定pid参数kii

Dim KDI As Integer ' 定义pid参数KDI Dim PPI As Integer ' 定义pid 参数PPI Dim PII As Integer ' 定义pid参数PII Dim PDI As Integer ' 定义pid参数PDI

Dim EI As Integer ' 定义pid参数EI

Dim Wind_Adress(1 To 2) As Integer ' 定义风机地址

15

Dim Motor_Direction_adress As Integer ' 电机转动方向控制地址 Dim Motor_speedadress As Integer ' 数模口地址 Public Mainmotor_Speed As Integer ' 主电机转速 Public Mainmotor_Direction As String ' 主电机转向 Dim FeedMotor_Speed As Integer ' 喂料电机转速 Dim FeedMotor_Direction As String ' 喂料电机转向 Dim CutMotor_Speed As Integer ' 切粒电机转速 Dim CutMotor_Direction As String ' 切粒电机转向 Dim PumpMOtor_Speed As Integer ' 泵电机转速 Dim PumpMotor_Direction As String ' 泵电机转向 Dim Get_Tem(0 To 15) As Integer ' 定义设定温度 3.系统启动

Private Sub mnurun_Click()

Timer2.Enabled = True '计时开始并循环启动 End Sub

4.报警参数采集及控制模块

(1)电流报警 主电流为例

current_total_updata = &H120& '定义主电流采集地址

current_data = &H120 '虚拟电流

Call GetPortval(current_total_updata, current_data, 1) '调用子程序并查询主电流 show_current_total_updata.Text = current_total_updata '输出主电流 Dim alarm_data As Integer Dim alarm_updata As Integer

Dim alarm_wide As Integer

alarm_data = current_total_updata '输出助电流报警

alarm_updata = Set_Alarm.current_total_updata.Text '读取报警上限 alarm_wide = Set_Alarm.current_total_wide.Text '读取报警宽度

Dim alarm As Boolean

If show_current_total_alarm.Text = \总电流过高\判断当前报警状态 alarm = True '报

ElseIf show_current_total_alarm.Text = \总电流正常\ alarm = False '不报 End If

Call single_alarm(alarm, alarm_data, alarm_updata, alarm_wide) '调用报警程序 If alarm = True Then '若该报警

show_current_total_alarm.Text = \总电流过高\ Picture_current_total_updata.BackColor = &HFF& sound = True ElseIf alarm = False Then

show_current_total_alarm.Text = \总电流正常\

Picture_current_total_updata.BackColor = &HFF00& End If (2)电流报警子程序

16