⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chipmac.h

📁 电能表源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/*************************************************************************************

	文件类型:底层驱动函数文件
	文件作用:宏定义,用户自己编写
	修改权限:用户自己编写
	文件相关:
	
	创 建 人:GeminiKQ
	创建日期:2006.12.19
	当前版本:Ver0.1
	
	版本信息:Ver0.1					GeminiKQ

**************************************************************************************/
#ifndef	_ChipMac_H_
#define	_ChipMac_H_



//#define DEBUG        //仿真模式

extern void          _nop_     (void);
#define  nop()       _nop_()
 

#define true   1
#define false  0

//********************************************************************888
// 数据ID号定义
//
//*********************************************************************
#define  ID_POSENGSUM          0x0100                      //当前有功总电量
#define  ID_LASTONEPOSENGSUM   0x0110                      //上月有功总电量
#define  ID_LASTTWOPOSENGSUM   0x0120                      //上2月有功总电量
#define  ID_LASTTHRPOSENGSUM   0x0130                      //上3月有功总电量
#define  ID_LASTFORPOSENGSUM   0x0140                      //上4月有功总电量
#define  ID_LASTFIVPOSENGSUM   0x0150                      //上5月有功总电量
#define  ID_LASTSIXPOSENGSUM   0x0160                      //上6月有功总电量
#define  ID_LASTSEVPOSENGSUM   0x0170                      //上7月有功总电量
#define  ID_LASTEGTPOSENGSUM   0x0180                      //上8月有功总电量 
#define  ID_LASTNINPOSENGSUM   0x0190                      //上9月有功总电量
#define  ID_LASTTENPOSENGSUM   0x01a0                      //上10月有功总电量
#define  ID_LASTELVPOSENGSUM   0x01b3                      //上11月有功总电量
#define  ID_LASTTWLPOSENGSUM   0x01c6                      //上12月有功总电量 


#define  ID_XULENGPOSSUM         0x4100                     // 当月最大有功总需量及时间
#define  ID_LSATONEXULENGPOSSUM  0x4110                     // 上月最大有功总需量及时间
#define  ID_LSATTWOXULENGPOSSUM  0x4120                     // 上2月最大有功总需量及时间
#define  ID_LSATTHRXULENGPOSSUM  0x4130                     // 上3月最大有功总需量及时间
#define  ID_LSATFORXULENGPOSSUM  0x4140                     // 上4月最大有功总需量及时间
#define  ID_LSATFIVXULENGPOSSUM  0x4150                     // 上5月最大有功总需量及时间
#define  ID_LSATSIXXULENGPOSSUM  0x4160                     // 上6月最大有功总需量及时间
#define  ID_LSATSEVXULENGPOSSUM  0x4170                     // 上7月最大有功总需量及时间
#define  ID_LSATEGTXULENGPOSSUM  0x4180                     // 上8月最大有功总需量及时间
#define  ID_LSATNINXULENGPOSSUM  0x4190                     // 上9月最大有功总需量及时间 
#define  ID_LSATTENXULENGPOSSUM  0x41a0                     // 上10月最大有功总需量及时间
#define  ID_LSATELVXULENGPOSSUM  0x41b0                     // 上11月最大有功总需量及时间
#define  ID_LSATTWLXULENGPOSSUM  0x41c0                      // 上12月最大有功总需量及时间

#define  ID_PROTIMES             0xc000	                     // 编程总次数
#define  ID_LASTONEPRORECD       0xc100                      // 最近1次编程记录 
#define  ID_LASTTWOEPRORECD      0xc101                      // 最近2次编程记录 
#define  ID_LASTTHRPRORECD       0xc102                      // 最近3次编程记录 
#define  ID_LASTFORPRORECD       0xc103                      // 最近4次编程记录  
#define  ID_LASTFIVPRORECD       0xc104                      // 最近5次编程记录 
#define  ID_CUTPOWTIMES          0xc010                      // 停电总次数
#define  ID_CUTPOWTIME           0xC110                      // 最近一次停电时间
#define  ID_REVECURRNTTIMES      0xc020                      // 电流反向总次数
#define  ID_LASTONERECURRECD     0xc120                      // 最近1次电流反向事件记录
#define  ID_LASTTWORECURRECD     0xc121                      // 最近2次电流反向事件记录
#define  ID_LASTTHRRECURRECD     0xc122                      // 最近3次电流反向事件记录
#define  ID_LASTFORRECURRECD     0xc123                      // 最近4次电流反向事件记录 
#define  ID_LASTFIVRECURRECD     0xc124                      // 最近5次电流反向事件记录
#define  ID_LASTSIXRECURRECD     0xc125                      // 最近6次电流反向事件记录
#define  ID_LASTSEVRECURRECD     0xc126                      // 最近7次电流反向事件记录
#define  ID_LASTEGTRECURRECD     0xc127                      // 最近8次电流反向事件记录
#define  ID_LASTNINRECURRECD     0xc128                      // 最近9次电流反向事件记录
#define  ID_LASTTENRECURRECD     0xc129                      // 最近10次电流反向事件记录             
#define  ID_IMBLCURRNTTIMES      0xc030                      // 电流不平衡总次数
#define  ID_LASTONEIMBLCURRECD   0xc130                      // 最近1次电流不平衡记录
#define  ID_LASTTWOIMBLCURRECD   0xc131                      // 最近2次电流不平衡记录
#define  ID_LASTTHRIMBLCURRECD   0xc132                      // 最近3次电流不平衡记录
#define  ID_LASTFORIMBLCURRECD   0xc133                      // 最近4次电流不平衡记录 
#define  ID_LASTFIVIMBLCURRECD   0xc134                      // 最近5次电流不平衡记录
#define  ID_LASTSIXIMBLCURRECD   0xc135                      // 最近6次电流不平衡记录
#define  ID_LASTSEVIMBLCURRECD   0xc136                      // 最近7次电流不平衡记录
#define  ID_LASTEGTIMBLCURRECD   0xc137                      // 最近8次电流不平衡记录
#define  ID_LASTNINIMBLCURRECD   0xc138                      // 最近9次电流不平衡记录
#define  ID_LASTTENIMBLCURRECD   0xc139                      // 最近10次电流不平衡记录
#define  ID_CUTVOLTTIMES         0xc040                      // 断相总次数
#define  ID_LASTONECUTPOWRECD    0xc140                     // 最近1次断相事件记录
#define  ID_LASTTWOCUTPOWRECD    0xc141                     // 最近2次断相事件记录
#define  ID_LASTTHRCUTPOWRECD    0xc142                     // 最近3次断相事件记录
#define  ID_LASTFORCUTPOWRECD    0xc143                     // 最近4次断相事件记录
#define  ID_LASTFIVCUTPOWRECD    0xc144                     // 最近5次断相事件记录
#define  ID_LASTSIXCUTPOWRECD    0xc145                     // 最近6次断相事件记录
#define  ID_LASTSEVCUTPOWRECD    0xc146                     // 最近7次断相事件记录
#define  ID_LASTEGTCUTPOWRECD    0xc147                     // 最近8次断相事件记录
#define  ID_LASTNINCUTPOWRECD    0xc148                     // 最近9次断相事件记录
#define  ID_LASTTENCUTPOWRECD    0xc149                     // 最近10次断相事件记录
#define  ID_STEALENGID           0xc150                     // 最近一次窃电代码
#define  ID_STEALTIMES           0xc0f0                     // 窃电总次数
#define  ID_RMSCURNTA            0xc200                     // A相电流有效值
#define  ID_RMSCURNTB            0xc210                     // B相电流有效值
#define  ID_RMSVOLT              0xc230                     // 电压有效值
#define  ID_POWER                0xc240                     // 有功功率
#define  ID_FRQ                  0xc250                     // 频率
#define  ID_COSENG               0xc260                     // 功率因数
#define  ID_LASTONECOSENG        0xc261                     // 上1个月平均功率因数
#define  ID_LASTTWOCOSENG        0xc262                     // 上2个月平均功率因数
#define  ID_LASTTHRCOSENG        0xc263                     // 上3个月平均功率因数
#define  ID_LASTFORCOSENG        0xc264                     // 上4个月平均功率因数
#define  ID_LASTFIVCOSENG        0xc265                     // 上5个月平均功率因数
#define  ID_LASTSIXCOSENG        0xc266                     // 上6个月平均功率因数
#define  ID_LASTSEVCOSENG        0xc267                     // 上7个月平均功率因数 
#define  ID_LASTEGTCOSENG        0xc268                     // 上8个月平均功率因数
#define  ID_LASTNINCOSENG        0xc269                     // 上9个月平均功率因数 
#define  ID_LASTTENCOSENG        0xc26a                     // 上10个月平均功率因数
#define  ID_LASTELVCOSENG        0xc26b                     // 上11个月平均功率因数
#define  ID_LASTTWLCOSENG        0xc26c                     // 上12个月平均功率因数
#define  ID_XULPOSENGCURT        0xc270                     // 当前正向有功需量
#define  ID_XULNATENGCURT        0xc271                     // 当前反向有功需量


#define  ID_CHANGSHU             0x8000                 // 脉冲常数
#define  ID_PRIOXUL              0x8010                 // 需量周期
#define  ID_DATAREADMETER        0x8030                 // 抄表日
#define  ID_PRIOCOSENG           0x8050                 // 平均功率因数计算周期
#define  ID_DATAMETER            0x8120                 // 日期
#define  ID_COMADDR              0x8200                 // 表地址
#define  ID_PASSWORD             0x8220                 // 密码
#define  ID_BANTRATA             0x8250                 // 波特率
#define  ID_GATLOSTCUR           0x8300                 // 失流门限
#define  ID_GATCUTPOW            0x8310                 // 断相门限
#define  ID_TIMERETUN            0x8400                 // 轮显时间
#define  ID_DISPCODE             0x8410                 // 显示内容开关


#define  EEP_Save_engdot              10                     // 停电保电量小数
#define  EEP_Save_cf                  12                     // 停电保存CF尾数

#define  EEP_laststrengtime           505                     // 上次电量转存时间
#define  EEP_lastflzengtime           508                     // 上次电量冻结时间

#define  EEP_point_zhun               115                     // 转存指针地址

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -