📄 lcd.c
字号:
break;
case 4:HzDisp1216(cc*3,44,hz_pen,0);
HzDisp1216(cc*3,83,hz_deng,0);
break;
case 5:HzDisp1216(cc*3,44,hz_zhu,0);
HzDisp1216(cc*3,83,hz_dian,0);
break;
case 6:HzDisp1216(cc*3,44,hz_bei,0);
HzDisp1216(cc*3,83,hz_dian,0);
break;
case 7:HzDisp1216(cc*3,44,hz_chong,0);
HzDisp1216(cc*3,83,hz_dian,0);
break;
case 8:HzDisp1216(cc*3,44,hz_gang,0);
HzDisp1216(cc*3,83,hz_ping,0);
break;
case 9:HzDisp1216(cc*3,44,hz_tong1,0);
HzDisp1216(cc*3,83,hz_xun,0);
break;
case 0x0a:HzDisp1216(cc*3,44,hz_lian,0);
HzDisp1216(cc*3,57,hz_dong,0);
HzDisp1216(cc*3,70,hz_xian,0);
HzDisp1216(cc*3,83,hz_lu1,0);
break;
case 0x0b:HzDisp1216(cc*3,44,hz_ya,0);
HzDisp1216(cc*3,57,hz_li,0);
HzDisp1216(cc*3,70,hz_kai,0);
HzDisp1216(cc*3,83,hz_guan,0);
break;
case 0x0c:HzDisp1216(cc*3,44,hz_ting,0);
HzDisp1216(cc*3,64,hz_zhi1,0);
HzDisp1216(cc*3,83,hz_jian3,0);
break;
case 0x0d:HzDisp1216(cc*3,44,hz_qi,0);
HzDisp1216(cc*3,64,hz_dong,0);
HzDisp1216(cc*3,83,hz_jian3,0);
break;
default: break;
}
//显示报警的类型
switch(hh)
{
case 2:HzDisp1216(cc*3,99,hz_gu,0);
HzDisp1216(cc*3,115,hz_zhang,0);
break;
case 5:HzDisp1216(cc*3,99,hz_ting,0);
HzDisp1216(cc*3,115,hz_zhi1,0);
break;
case 1:HzDisp1216(cc*3,99,hz_huo,0);
HzDisp1216(cc*3,115,hz_jing,0);
break;
case 4:HzDisp1216(cc*3,99,hz_fan,0);
HzDisp1216(cc*3,115,hz_kui,0);
break;
case 3:
case 6:
case 7:HzDisp1216(cc*3,99,hz_qi,0);
HzDisp1216(cc*3,115,hz_dong,0);
break;
case 9:HzDisp1216(cc*3,99,hz_kai,0);
HzDisp1216(cc*3,115,hz_lu1,0);
break;
case 8:HzDisp1216(cc*3,99,hz_duan,0);
HzDisp1216(cc*3,115,hz_lu1,0);
break;
default:break;
}
//显示时间中间的斜线和冒号
a = dd>>4;
b = dd&0x0f;
Asc_Disp68((cc+1)*3-1,60,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,66,(asc_num+6*b),0);
Asc_Disp68((cc+1)*3-1,72,(asc_xiexian),0);
a = ee>>4;
b = ee&0x0f;
Asc_Disp68((cc+1)*3-1,78,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,84,(asc_num+6*b),0);
if(hh==0x06)
{
a=delay_SDstart_time[aa-1]/10;
b=delay_SDstart_time[aa-1]%10;
Asc_Disp68((cc+1)*3-1,102,(asc_s),0);
Asc_Disp68((cc+1)*3-1,114,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,120,(asc_num+6*b),0);
}
else
{
if(hh==0x07)
{
a=delay_ZDstart_time[aa-1]/10;
b=delay_ZDstart_time[aa-1]%10;
Asc_Disp68((cc+1)*3-1,102,(asc_s),0);
Asc_Disp68((cc+1)*3-1,114,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,120,(asc_num+6*b),0);
}
else
{
a = ff>>4;
b = ff&0x0f;
Asc_Disp68((cc+1)*3-1,96,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,102,(asc_num+6*b),0);
Asc_Disp68((cc+1)*3-1,108,(asc_maohao),0);
a = gg>>4;
b = gg&0x0f;
Asc_Disp68((cc+1)*3-1,114,(asc_num+6*a),0);
Asc_Disp68((cc+1)*3-1,120,(asc_num+6*b),0);
}
}
}
//*************************************************************************
//**函 数 名:DISP_Information
//**输 入:
//**输 出:无
//**功能描述:
//** 1.显示信息
//*************************************************************************
void DISP_Information()
{
uchar xdata i;
uchar xdata a,b,c;
uchar xdata temp_timey;
uchar xdata temp_timer;
uchar xdata temp_times;
uchar xdata temp_timef;
//临时显示计数的数量
uchar xdata disp_number;
uchar xdata temp_qunumber;
uchar xdata temp_devicetype;
uchar xdata temp_alarmtype;
uchar xdata temp_end_count;
Clr_Scr(0);
for(i=0;i<3;i++) HzDisp1216(i*2,0,hz_space,1);
for(i=0;i<3;i++) HzDisp1216(i*2,4,hz_space,1);
switch(machine_status)
{
//故障
case 0x30:disp_number = (disp_fault_number - 1);
//显示反白--故障数
HzDisp1216(0,2,hz_gu, 1);
HzDisp1216(2,2,hz_zhang,1);
HzDisp1216(4,2,hz_shu, 1);
//计算故障数量
a = fault_number/100;
b = (fault_number-a*100)/10;
c = fault_number%10;
//显示故障数量
Asc_Disp68(7,0, (asc_num+6*a),0);
Asc_Disp68(7,6, (asc_num+6*b),0);
Asc_Disp68(7,12,(asc_num+6*c),0);
//循环显示报警信息
for(i=0;i<2;i++)
{
//取显示信息在缓冲区的位置
temp_end_count=disp_number*8;
//取显示信息的区号,设备类型报警类型
temp_end_count++;
temp_qunumber = fault_infor[temp_end_count];
temp_end_count++;
temp_devicetype = fault_infor[temp_end_count];
temp_end_count++;
temp_alarmtype = fault_infor[temp_end_count];
temp_end_count++;
//显示报警时间
temp_timey = fault_infor[temp_end_count]; //读取报警报警的月
temp_end_count++;
temp_timer = fault_infor[temp_end_count]; //读取报警报警的日
temp_end_count++;
temp_times = fault_infor[temp_end_count]; //读取报警报警的小时
temp_end_count++;
temp_timef = fault_infor[temp_end_count]; //读取报警报警的分钟
temp_end_count++;
//在某个位置显示区号设备名称和报警时间
Disp_Qu_Device(temp_qunumber,temp_devicetype,i,temp_timey,temp_timer,temp_times,temp_timef,temp_alarmtype);
if(disp_number == 0)break;
else
//计算下一条信息显示的位置
disp_number--;
}
break;
//停止
case 0x40:disp_number = (disp_stop_number - 1);
//显示反白停止数
HzDisp1216(0,2,hz_ting,1);
HzDisp1216(2,2,hz_zhi1,1);
HzDisp1216(4,2,hz_shu, 1);
//计算停止数量
a = stop_number/100;
b = (stop_number-a*100)/10;
c = stop_number%10;
//显示停止数量
Asc_Disp68(7,0,(asc_num+6*a),0);
Asc_Disp68(7,6,(asc_num+6*b),0);
Asc_Disp68(7,12,(asc_num+6*c),0);
//循环显示报警信息
for(i = 0;i < 2;i++)
{
//取显示信息在缓冲区的位置
temp_end_count=disp_number*8;
//取显示信息的区号,设备类型报警类型
temp_end_count++;
temp_qunumber = stop_infor[temp_end_count];
temp_end_count++;
temp_devicetype = stop_infor[temp_end_count];
temp_end_count++;
temp_alarmtype = stop_infor[temp_end_count];
temp_end_count++;
//显示报警时间
temp_timey = stop_infor[temp_end_count]; //读取报警报警的月
temp_end_count++;
temp_timer = stop_infor[temp_end_count]; //读取报警报警的日
temp_end_count++;
temp_times = stop_infor[temp_end_count]; //读取报警报警的小时
temp_end_count++;
temp_timef = stop_infor[temp_end_count]; //读取报警报警的分钟
temp_end_count++;
//在某个位置显示区号设备名称和报警时间
Disp_Qu_Device(temp_qunumber,temp_devicetype,i,temp_timey,temp_timer,temp_times,temp_timef,temp_alarmtype);
if(disp_number == 0)break;
else
//计算下一条信息显示的位置
disp_number--;
}
break;
//火警
case 0x50:disp_number = (disp_alarm_number - 1);
//显示反白火警数
HzDisp1216(0,2,hz_huo, 1);
HzDisp1216(2,2,hz_jing,1);
HzDisp1216(4,2,hz_shu, 1);
//计算火警数量
a = alarm_number/100;
b = (alarm_number-a*100)/10;
c = alarm_number%10;
//显示火警数量
Asc_Disp68(7,0,(asc_num+6*a),0);
Asc_Disp68(7,6,(asc_num+6*b),0);
Asc_Disp68(7,12,(asc_num+6*c),0);
//循环显示报警信息
for(i=0;i<2;i++)
{
//取显示信息在缓冲区的位置
temp_end_count=disp_number*8;
//取显示信息的区号,设备类型报警类型
temp_end_count++;
temp_qunumber = alarm_infor[temp_end_count];
temp_end_count++;
temp_devicetype = alarm_infor[temp_end_count];
temp_end_count++;
temp_alarmtype = alarm_infor[temp_end_count];
temp_end_count++;
//显示报警时间
temp_timey = alarm_infor[temp_end_count]; //读取报警报警的月
temp_end_count++;
temp_timer = alarm_infor[temp_end_count]; //读取报警报警的日
temp_end_count++;
temp_times = alarm_infor[temp_end_count]; //读取报警报警的小时
temp_end_count++;
temp_timef = alarm_infor[temp_end_count]; //读取报警报警的分钟
temp_end_count++;
//在某个位置显示区号设备名称和报警时间
Disp_Qu_Device(temp_qunumber,temp_devicetype,i,temp_timey,temp_timer,temp_times,temp_timef,temp_alarmtype);
if(disp_number == 0)break;
else
//计算下一条信息显示的位置
disp_number--;
}
break;
//反馈
case 0x60:disp_number = (disp_feedback_number - 1);
//显示反白反馈数
HzDisp1216(0,2,hz_fan,1);
HzDisp1216(2,2,hz_kui,1);
HzDisp1216(4,2,hz_shu,1);
//计算反馈数量
a = feedback_number/100;
b = (feedback_number-a*100)/10;
c = feedback_number%10;
//显示反馈数量
Asc_Disp68(7,0,(asc_num+6*a),0);
Asc_Disp68(7,6,(asc_num+6*b),0);
Asc_Disp68(7,12,(asc_num+6*c),0);
//循环显示报警信息
for(i = 0;i < 2;i++)
{
//取显示信息在缓冲区的位置
temp_end_count = disp_number*8;
//取显示信息的区号,设备类型报警类型
temp_end_count++;
temp_qunumber = feedback_infor[temp_end_count];
temp_end_count++;
temp_devicetype = feedback_infor[temp_end_count];
temp_end_count++;
temp_alarmtype = feedback_infor[temp_end_count];
temp_end_count++;
//显示报警时间
temp_timey = feedback_infor[temp_end_count]; //读取报警报警的月
temp_end_count++;
temp_timer = feedback_infor[temp_end_count]; //读取报警报警的日
temp_end_count++;
temp_times = feedback_infor[temp_end_count]; //读取报警报警的小时
temp_end_count++;
temp_timef = feedback_infor[temp_end_count]; //读取报警报警的分钟
temp_end_count++;
//在某个位置显示区号设备名称和报警时间
Disp_Qu_Device(temp_qunumber,temp_devicetype,i,temp_timey,temp_timer,temp_times,temp_timef,temp_alarmtype);
if(disp_number == 0)break;
else
//计算下一条信息显示的位置
disp_number--;
}
break;
//总启动
case 0x70:disp_number=(disp_start_number-1);
//显示反白启动数
HzDisp1216(0,2,hz_qi,1);
HzDisp1216(2,2,hz_dong,1);
HzDisp1216(4,2,hz_shu,1);
//计算启动数量
a=start_number/100;
b=(start_number-a*100)/10;
c=start_number%10;
//显示启动数量
Asc_Disp68(7,0,(asc_num+6*a),0);
Asc_Disp68(7,6,(asc_num+6*b),0);
Asc_Disp68(7,12,(asc_num+6*c),0);
//循环显示启动信息
for(i=0;i<2;i++)
{
//取显示信息在缓冲区的位置
temp_end_count=disp_number*8;
//取显示信息的区号,设备类型报警类型
temp_end_count++;
temp_qunumber=start_infor[temp_end_count];
temp_end_count++;
temp_devicetype=start_infor[temp_end_count];
temp_end_count++;
temp_alarmtype=start_infor[temp_end_count];
temp_end_count++;
//显示启动时间
temp_timey= start_infor[temp_end_count]; //读取报警报警的月
temp_end_count++;
temp_timer = start_infor[temp_end_count]; //读取报警报警的日
temp_end_count++;
temp_times = start_infor[temp_end_count]; //读取报警报警的小时
temp_end_count++;
temp_timef = start_infor[temp_end_count]; //读取报警报警的分钟
temp_end_count++;
//在某个位置显示区号设备名称和报警时间
Disp_Qu_Device(temp_qunumber,temp_devicetype,i,temp_timey,temp_timer,temp_times,temp_timef,temp_alarmtype);
if(disp_number==0)break;
else
//计算下一条信息显示的位置
disp_number--;
}
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -