📄 global.h
字号:
// a 正向有功电量增加oooooo
#define RFLAG_KWH_F_ADD Dianliang1.bit.b0
// a 反向有功电量增加oooooo
#define RFLAG_KWH_R_ADD Dianliang1.bit.b1
// a 正向无功电量增加oooooo
#define RFLAG_KVARH_F_ADD Dianliang1.bit.b2
// a 反向无功电量增加oooooo
#define RFLAG_KVARH_R_ADD Dianliang1.bit.b3
// a 1象限无功电量增加ooooo
#define RFLAG_KVARH_1_ADD Dianliang1.bit.b4
// a 2象限无功电量增加ooooo
#define RFLAG_KVARH_2_ADD Dianliang1.bit.b5
// a 3象限无功电量增加ooooo
#define RFLAG_KVARH_3_ADD Dianliang1.bit.b6
// a 4象限无功电量增加ooooo
#define RFLAG_KVARH_4_ADD Dianliang1.bit.b7
// a 正向无功电量减少
#define RFLAG_KVARH_F_SUB Dianliang2.bit.b0
// a 反向无功电量减少ooooo
#define RFLAG_KVARH_R_SUB Dianliang2.bit.b1
unsigned char bcopy_kwh[40][6];
unsigned char ccopy_kwh[40][6];
unsigned char ajiaoyuan_kwh[40];
// a--6 b--6 c--6
unsigned char anquan_use[18];
// mode use rtc time*/
unsigned char lost_v_rtc_minute;
unsigned char lost_v_rtc_second;
//pan duan 判断符合条件失压持续时间PPP10
unsigned char lost_v_continue_time;
// zhen 当前是否失压指示jjjjj
// 0 正常,1--A相,2--B相,3--C相,4--AB相,5--AC相,6--BC相DDDDD
#define lost_v_no 0
#define lost_v_a 1
#define lost_v_b 2
#define lost_v_c 3
#define lost_v_ab 4
#define lost_v_ac 5
#define lost_v_bc 6
unsigned char lost_v_quadrant;
unsigned char lost_v_quadrant_use;
// xian 象别转换常量bye.0---->a ,byte.1------>b,byte.2------>c jjjjjj
const unsigned char table_guadrant_value_translate[]={00,0x01,0x02,0x04,0x03,0x05,0x06};
/* ****************失流记录模块*********************** */
/* 包括相应的报警指示功能 */
// const must chang
// mode use rtc time*/
unsigned char lost_i_rtc_minute;
unsigned char lost_i_rtc_second;
//pan duan 判断符合条件失流持续时间PPP10
unsigned char cut_v_continue_time;
// zhen 当前是否失流指示jjjjj
// 0 正常,1--A相,2--B相,3--C相,4--AB相,5--AC相,6--BC相DDDDD
/*#define lost_i_no 0
#define lost_i_a 1
#define lost_i_b 2
#define lost_i_c 3
#define lost_i_ab 4
#define lost_i_ac 5
#define lost_i_bc 6
unsigned char lost_i_quadrant;
unsigned char lost_i_quadrant_use;
*/
#define cut_v_no 0
#define cut_v_a 1
#define cut_v_b 2
#define cut_v_c 3
#define cut_v_ab 4
#define cut_v_ac 5
#define cut_v_bc 6
unsigned char cut_v_quadrant;
unsigned char cut_v_quadrant_use;
//ddd电压状态AAAA
unsigned char current_v_a_status;
unsigned char current_v_a_status_use;
unsigned char current_v_b_status;
unsigned char current_v_b_status_use;
unsigned char current_v_c_status;
unsigned char current_v_c_status_use;
#define v_good 0 // zhen chang
#define v_nogood 1 // bu he ge
#define v_exceed_down 2 // qiang ya
#define v_exceed_up 3 // guo ya
// ddd三相总的电压状态(A,B,C任一不合格)AAA
unsigned char current_v_status;
//CI 模块时钟SSSSS
unsigned char moniter_use_second;
unsigned char moniter_use_minute;
unsigned char moniter_use_month;
//CI 持续时间SSSSS
unsigned char continue_time_v_a_moniter_use;
unsigned char continue_time_v_b_moniter_use;
unsigned char continue_time_v_c_moniter_use;
//AA 电压不合格事件存储地址DDDD
// 2ci biao
//ddd电流状态AAAA
unsigned char current_i_a_status;
unsigned char current_i_a_status_use;
unsigned char current_i_b_status;
unsigned char current_i_b_status_use;
unsigned char current_i_c_status;
unsigned char current_i_c_status_use;
#define i_good 0 // zhen chang
#define i_exceed 1 // guo liu
// ddd三相总的电流状态(A,B,C任一不合格)AAA
unsigned char current_i_status;
//CI 持续时间SSSSS
unsigned char continue_time_i_a_moniter_use;
unsigned char continue_time_i_b_moniter_use;
unsigned char continue_time_i_c_moniter_use;
//AA 电流不合格事件存储地址DDDD
// 2 ci biao
// const must chang
// 总过载
// mode use rtc time*/
#define guozai 1
#define noguozai 0
unsigned char over_kwh_status;
// zhong jian status
unsigned char over_kwh_status_use;
unsigned char over_kwh_rtc_minute;
unsigned char over_kwh_rtc_second;
//pan duan 判断符合条件过载持续时间PPP10
unsigned char over_kwh_continue_time;
// 分相a过载
// mode use rtc time*/
//unsigned char over_kwh_a_rtc_second;
unsigned char over_kwh_status_a;
unsigned char over_kwh_status_a_use;
//pan duan 判断符合条件过载持续时间PPP10
unsigned char over_kwh_a_continue_time;
// lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
// 分相b过载
// mode use rtc time*/
//unsigned char over_kwh_b_rtc_second;
unsigned char over_kwh_status_b;
unsigned char over_kwh_status_b_use;
//pan duan 判断符合条件过载持续时间PPP10
unsigned char over_kwh_b_continue_time;
// lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
// 分相c过载
// mode use rtc time*/
//unsigned char over_kwh_c_rtc_second;
unsigned char over_kwh_status_c;
unsigned char over_kwh_status_c_use;
//pan duan 判断符合条件过载持续时间(>10 )PPP10
unsigned char over_kwh_c_continue_time;
/* ****************停电上电模块*********************** */
/* 红外停电抄表激活每天允许三次,每次4分钟,十天后关掉红外激活功能 */
unsigned int remote_jiehuo_10day;//(minute) 10*24*60
unsigned char tingchao_enabled;
unsigned int remote_display_7day;//m 7*24*60
/* *****************全失压模块****************************/
// quan shi ya 10 day
unsigned int quanshiya_10day; // minute
// quan shi ya 全失压AAAA
unsigned char RSTATUS_QUANSHIYA;
#define no_quanshiya 0
#define quanshiya 1
//unsigned char RSTATUS_QUANSHIYA_USE;
unsigned int RTIME_QUANSHIYA_PANDUAN_USE;
unsigned int RTIME_QUANSHIYA_DIANCI_USE;
unsigned char RQINGQIU_PANDUAN_QUANSHIYA;
#define do_panduanquanshiya 1
#define nodo_panduanquanshiya 0
unsigned char tingchaojiehuo_use_num_second;
//unsigned char num_quanshiya;// ting dian qi jian zon ci shu<=10
//unsigned char quanshiya_date[120];// date
/* ****************中断模块*********************** */
/* 电脉冲中断、公用定时器中断、2个串口中断、等等 */
/* 0.5秒定时中断,软RTC维护
/* ****************逆相序事件记录模块*********************** */
// dan 当前相序号AAAA
unsigned char current_order_quadrant;
unsigned char current_order_quadrant_use;
//unsigned char current_order_quadrant_envent_use;
#define f_order 0 // zhen xian
#define r_order 1 // fan xian
unsigned char time_order_quadrant_continue_use;
// use time
unsigned char order_quadrant_kw_second_use;
unsigned char order_quadrant_kw_minute_use;
/* ****************功率反向事件记录模块*********************** */
//dan 当前功率方向AAAA
unsigned char current_order_kw;
unsigned char current_order_kw_use;
//unsigned char current_order_kw_envent_use;
unsigned char current_order_a_kw;
unsigned char current_order_a_kw_use;
//unsigned char current_order_a_kw_envent_use;
unsigned char current_order_b_kw;
unsigned char current_order_b_kw_use;
//unsigned char current_order_b_kw_envent_use;
unsigned char current_order_c_kw;
unsigned char current_order_c_kw_use;
//unsigned char current_order_c_kw_envent_use;
unsigned char time_order_kw_continue_use;
unsigned char time_order_a_kw_continue_use;
unsigned char time_order_b_kw_continue_use;
unsigned char time_order_c_kw_continue_use;
unsigned char display_enable[100];
unsigned char timenotchanged;
unsigned char quanshiya_tingchao_cishu;
// qidong gonglv if Ib <5 and Imax <20A ==0p1% else =0p2%
// qu qidong gonglv 0p9 ,to run
// if 1p5(6) 220v---->1p5 * 220=330
// 330*3=990
// 990/100=9
unsigned long type_minvalue_kw_cal_door;
unsigned char kw_fz_numsecond;
unsigned long kw_fz_perminute;
unsigned char kw_rz_numsecond;
unsigned long kw_rz_perminute;
unsigned char kw_cuofeng_numsecond;
unsigned long kw_cuofeng_perminute;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -