|
@@ -198,26 +198,35 @@ int selfcheck(uint8_t type)
|
|
|
HMI_WRITE("sysSet.va0.txt=\"当前电压:%s-温度:%d\"",device_status.voltage,heat_temp_off);
|
|
HMI_WRITE("sysSet.va0.txt=\"当前电压:%s-温度:%d\"",device_status.voltage,heat_temp_off);
|
|
|
//开启加热
|
|
//开启加热
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|
|
|
- ctr_Heat(ON);
|
|
|
|
|
- //持续1分钟
|
|
|
|
|
- for(int i = 60;i>0;i--)
|
|
|
|
|
- {
|
|
|
|
|
- HMI_WRITE("sysSet.va0.txt=\"加热测试中...%d\"",i);
|
|
|
|
|
- rt_thread_delay(1000);
|
|
|
|
|
- }
|
|
|
|
|
- LOG_I("当前温度:%d电压:%s",device_status.heatvalue,device_status.voltage);
|
|
|
|
|
- //比较当前电压、温度探头温度和开启前
|
|
|
|
|
- if((device_status.heattem - heat_temp_off)>=2 || (atof(device_status.voltage) - voltage_off)>=1.5)
|
|
|
|
|
|
|
+ //温度大于50摄氏度小于150摄氏度证明加热已经工作了
|
|
|
|
|
+ if(voltage_off>50.0&&voltage_off<150.0)
|
|
|
{
|
|
{
|
|
|
HMI_WRITE("selfcheck.t2.bco=2024");
|
|
HMI_WRITE("selfcheck.t2.bco=2024");
|
|
|
device_status.C01 &= ~(1<<1);
|
|
device_status.C01 &= ~(1<<1);
|
|
|
HMI_WRITE("sysSet.va0.txt=\"加热正常\"");
|
|
HMI_WRITE("sysSet.va0.txt=\"加热正常\"");
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- HMI_WRITE("selfcheck.t2.bco=63488");
|
|
|
|
|
- device_status.C01 |= (1<<1);
|
|
|
|
|
- HMI_WRITE("sysSet.va0.txt=\"加热故障\"");
|
|
|
|
|
|
|
+ else {
|
|
|
|
|
+ ctr_Heat(ON);
|
|
|
|
|
+ //持续1分钟
|
|
|
|
|
+ for(int i = 60;i>0;i--)
|
|
|
|
|
+ {
|
|
|
|
|
+ HMI_WRITE("sysSet.va0.txt=\"加热测试中...%d\"",i);
|
|
|
|
|
+ rt_thread_delay(1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ LOG_I("当前温度:%d电压:%s",device_status.heatvalue,device_status.voltage);
|
|
|
|
|
+ //比较当前电压、温度探头温度和开启前
|
|
|
|
|
+ if((device_status.heattem - heat_temp_off)>=2 || (atof(device_status.voltage) - voltage_off)>=1.5)
|
|
|
|
|
+ {
|
|
|
|
|
+ HMI_WRITE("selfcheck.t2.bco=2024");
|
|
|
|
|
+ device_status.C01 &= ~(1<<1);
|
|
|
|
|
+ HMI_WRITE("sysSet.va0.txt=\"加热正常\"");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ HMI_WRITE("selfcheck.t2.bco=63488");
|
|
|
|
|
+ device_status.C01 |= (1<<1);
|
|
|
|
|
+ HMI_WRITE("sysSet.va0.txt=\"加热故障\"");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
ctr_Heat(OFF);
|
|
ctr_Heat(OFF);
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|