CN100471006C - Electric energy management terminal using controller LAN to implement internal communication and control method thereof - Google Patents

Electric energy management terminal using controller LAN to implement internal communication and control method thereof Download PDF

Info

Publication number
CN100471006C
CN100471006C CN 200510024633 CN200510024633A CN100471006C CN 100471006 C CN100471006 C CN 100471006C CN 200510024633 CN200510024633 CN 200510024633 CN 200510024633 A CN200510024633 A CN 200510024633A CN 100471006 C CN100471006 C CN 100471006C
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
internal
energy
method
management
control
Prior art date
Application number
CN 200510024633
Other languages
Chinese (zh)
Other versions
CN1838505A (en )
Inventor
于颖杰
刘宇怀
王伟艺
鲁春生
Original Assignee
上海协同科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

本发明涉及一种用控制器局域网进行内部通信的电能量管理终端及控制方法,该终端包括通过CAN接口并联在控制器局域网上的主控模块、抄表模块、脉冲模块、遥信模块、显示模块、与主控模块连接的通信模块、与各模块连接的电源模块。 The present invention relates to a control method for electric energy management terminal and internal communication with the controller area network, the terminal comprising an interface control module via CAN parallel on the controller area network, meter reading module, a pulse module, remote module, a display module communication module, connected to the main control module, each module connected to the power module. 控制方法包括:步骤1,主控模块通过通信模块与调度中心双向传送数据;步骤2,主控模块调用数据、发布数据,控制并接在CAN总线上的各功能模块;步骤3,抄表模块、脉冲模块、遥信模块、显示模块接收主控模块命令进行相应的功能运行,如抄表、读取数据,再通过CAN总线发送到主控模块。 The control method comprising: step 1, the main control module and the control center through the communication module bi-directional transmission of data; Step 2, the main control module invokes the data, distribution data, and then controls the function modules on the CAN bus; step 3, meter reading module pulse module, remote module, the display module control module receives commands corresponding functional operation, such as meter reading, the read data, and then transmitted to the master module via the CAN bus. 本发明使模块间高速,可靠的进行数据通信,能有效提高电网中电能量的管理效率。 The present invention enables high-speed inter-module, reliable data communication, can effectively improve the management efficiency of electric energy in the power grid.

Description

用控制器局域网进行内部通信的电能量管理终端及控制方法技术领域本发明涉及一种用于电力行业的电能量管理终端,尤其涉及一种用控制器局域网进行内部通信的电能量管理终端及控制方法。 And the management terminal electrically TECHNICAL FIELD The energy used for internal communication controller area network of the present invention relates to an energy management terminal for electrical power industry, in particular, it relates to a control and electrical energy management terminal in communication with the internal controller area network method. 背景技术目前电力行业的电能量管理终端的结构模式主要有单微处理器模式、多微处理器及并行总线模式、多微处理器及I2C总线模式、485总线模式。 Background Art Electric power sector structure of the energy management mode terminal mainly single microprocessor mode, multi-mode microprocessor and a parallel bus, and I2C bus multiprocessor mode, 485 bus mode. 请参见图l所示,第一种是单微处理器结构的电能量管理终端,该终端包括:处理器MCU、抄表模块2、脉冲模块3、遥信模块4、显示模块5、通信模块6和电源模块7;由单微处理器MCU构成的主控模块通过导线分别与抄表模块2、脉冲模块3、遥信模块4、显示模块5、通信模块6双向连接;微处理器MCU通过通信模块6与调度中心Wl双向传送数据;抄表模块2通过导线与用户电能表W2双向连接;脉冲模块3与外部开关量设备W3双向连接; 遥信模块4与外部设备开关量W4双向连接;显示模块5分别与设置在终端面板上的键盘51、状态指示灯52、显示器53连接;电源模块7通过导线分别与各模块连接,提供电源。 Referring to FIG. L as shown, the first energy management terminal unit is microprocessor architecture, the terminal comprising: a processor MCU, meter reading module 2, module 3 pulse, remote module 4, a display module 5, a communication module 6 and 7 the power supply module; MCU control module configured by a single microprocessor by wire meter reading module 2, respectively, burst module 3, remote module 4, a display module 5, a bidirectional communication module 6 is connected; by microprocessor MCU communication module 6 and the control center Wl bidirectional transmission of data; meter reading module is connected via a wire to the second bidirectional power meter W2 of the user; 3 pulse module external digital device connected to the bi-W3; two-way remote communication module 4 W4 connected to an external digital device; the display module 5 are provided on the terminal keyboard panel 51, status indicators 52, a display 53 is connected; a power supply module 7 respectively connected by a wire to each module, to provide power. 单微处理器结构的电能量管理终端,由于主控模块采用单微处理器,对电力系统电能量管理的处理能力有限,无法应对日益增加的管理功能,同时也不利于电磁兼容性的提高;由于外围模块的通信和控制都是通过单微处理器的1/0 口进行,在外围模块中没有微处理器,该类型的终端没有可扩展性,现在已基本不采用该类技术。 Energy management terminal single microprocessor structure, the main control module uses a single microprocessor, limited the power system of electrical energy management processing power, we can not cope with the increasing management capabilities, while not conducive to improve the electromagnetic compatibility; Since the peripheral communications and control module is a single port through the 1/0 microprocessor, the microprocessor is not in the peripheral module, the terminal type is not scalable, now substantially free use of such technology. 请参见图2所示,第二种是多微处理器及并行总线结构的电能量管理终端, 该终端包括:主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5、 通信模块6和电源模块7、总线仲裁电路ZX1;主控模块l、抄表模块2、脉冲遥信模块3、遥控模块4、显示模块5与总线仲裁电路ZX1并行连接;主控模 Referring to FIG. 2, a second energy management terminal multiprocessor and a parallel bus architecture, the terminal comprising: a main control module L, meter reading module 2, module 3 pulse, remote module 4, a display module 5, the communication module 6 and the power module 7, the ZX1 bus arbitration circuit; L main control module, meter module 2, module 3 pulses remote communication, remote control module 4, a display module 5 connected in parallel with the ZX1 bus arbitration circuit; master mode

块1与通信模块6双向连接;主控模块1通过通信模块6与调度中心Wl双向传送数据;抄表模块2、脉冲模块3、遥信模块4分别与用户电能表W2、外部开关量设备W3、外部设备开关量W4双向连接;显示模块5分别与设置在终端面板上的键盘51、状态显示灯52、显示器53双向连接;电源模块7与各模块连接,提供电源。 Block 16 is connected to the bidirectional communication module; main control module 1 and control center Wl bidirectional transmission of data through the communication module 6; meter module 2, module 3 pulse, remote module 4 meter W2 of the user, respectively, the external switch device W3 , an external device connected to a bidirectional switch W4; display module 5 are provided on the terminal keyboard panel 51, status indicator 52, a display 53 connected to bidirectional; power module 7 is connected to each module, to provide power. 多微处理器及并行总线结构的电能量管理终端,若釆用多微处理器及并行总线进行通信, 一方面不可能在系统内扩较多的微处理器,同时线缆的数量也较多,至少十几芯,不能实现分体式扩充,且总线不能超出终端外壳;若要实现多主通信,则涉及到总线仲裁,需额外的硬件及复杂的电路来实现;这种并行总线的网络结构繁锁,电路复杂,易受干扰。 Energy management terminal multiprocessor and a parallel bus architecture, if Bian communication, on the one hand impossible to expand more in the system with the microprocessor and multiprocessor parallel bus, while the number of cables is greater at least a dozen of the core, the expansion split can not be achieved, and the bus can not exceed the terminal housing; to achieve multi-master communication, it relates to bus arbitration, and the additional hardware required to implement a complex circuit; a parallel bus structure of this network cumbersome, circuit complexity, susceptible to interference. 请参见图3所示,第三种是多微处理器及12C总线结构的电能量管理终端, 该终端包括:主控模块l、抄表模块2、脉冲遥信模块3、遥控模块4、显示模块5、通信模块6和电源模块7、 I2C总线ZX2;该I2C总线ZX2由I2C接口与电缆组成;主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5 中分别连接I2C接口,主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5通过I2C接口并接在I2C总线ZX2的电缆上;主控模块1与通信模块6双向连接;主控模块1通过通信模块6与调度中心W1双向传送数据;抄表模块2、脉冲模块3、遥信模块4分别与用户电能表W2、外部开关量设备W3、 外部设备开关量W4双向连接;显示模块5分别与设置在终端面板上的键盘51、 状态指示灯52、显示器53双向连接;电源模块7与各模块连接,提供电源。 Referring to FIG. 3, is the third energy management and terminal 12C bus multiprocessor configuration, the terminal comprising: a main control module L, meter reading module 2, module 3 pulses remote communication, remote control module 4, a display 5 module, communication module 6 and a power module. 7, ZX2 I2C bus; ZX2 the I2C bus by the I2C interface cable composition; L control module, meter module 2, module 3 pulse, remote module 4, a display module 5, respectively, I2C interface is connected, the main control module L, meter reading module 2, module 3 pulses, 4 remote communication module, display module and the interface 5 connected to the I2C bus I2C ZX2 through cable; master module 1 is connected with a bidirectional communication module 6; the main control module 1 and control center W1 bidirectional transmission of data through the communication module 6; meter module 2, module 3 pulse, remote module 4 meter W2 of the user, respectively, W3 of the external switch device, the external device connected to a bidirectional switch W4; the display module 5 are provided on the terminal keyboard panel 51, status indicators 52, a display 53 connected to bidirectional; power module 7 is connected to each module, to provide power. 多微处理器及并行总线结构的电能量管理终端,若采用多微处理器及I2C 总线进行通信,虽然是两线制通信,且速率有所提高,而且支持多主通信,但该总线采用电阻上拉方式产生高电平,驱动能力差,无法总线隔离;抗干扰能力差,通信距离短,只能象并行总线一样实现终端机壳内部的通信;由于总'线采用的不是差分通信方式,对地线的要求很高,所以实际上是三线制通信,这三根导线中的任一根均不能断开或受到较强的干扰,使系统运行可靠性差。 Energy management terminal multiprocessor and a parallel bus architecture, the use of multiple microprocessors and communicate with the I2C bus, although the two-wire communications, and improved speed, and supports multi-host communications, but a resistance to the bus pull mode produces a high driving ability, not bus isolation; anti-interference ability, short-distance communication, can communicate the interior of the housing as the terminal as a parallel bus; because communication is not always a difference 'line used, high requirements on the ground, so this is actually three-wire communication, any one of these three wires are not broken or by a strong interference, poor reliability of the system operation. 请参见图4所示,第四种是485总线结构的电能量管理终端,该终端包括: 主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5、通信模块6、 电源模块7及485总线ZX3;该485总线ZX3由485接口ZX31与电缆ZX32 Referring to FIG. 4, a fourth terminal 485 of electrical energy management structures, the terminal comprising: a main control module L, meter reading module 2, module 3 pulse, remote module 4, a display module 5, the communication module 6 power module 485 and bus ZX3 7; 485 ZX3 which the cable 485 ZX31 ZX32

组成;主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5分别连接485接口ZX31,主控模块1、抄表模块2、脉冲模块3、遥信模块4、显示模块5通过485接口ZX31并接在485总线ZX3的电缆ZX32上;主控模块1 与通信模块6双向连接;主控模块1通过通信模块6与调度中心Wl双向传送数据;抄表模块2、脉冲模块3、遥信模块4通过导线分别与用户电能表W2、 外部开关量设备W3、外部设备开关量W4连接;显示模块5分别与设置在终端面板上的键盘51、状态指示灯52、显示器53连接;电源模块7通过导线与各模块连接,提供电源。 Composition; L main control module, meter module 2, module 3 pulse, remote modules 4, 5 are connected to the display module 485 ZX31, a main control module, meter module 2, module 3 pulse, remote module 4, a display 5 via the interface module 485 and connected to the ZX31 485 ZX3 cable ZX32; main control module 1 is connected with a bidirectional communication module 6; master module 1 through the communication module 6 transmits data and control center Wl bidirectional; meter module 2, the pulse 3 module, remote module 4 are respectively connected to the power meter W2 of the user, W3 of the external switch device, the external device via a wire W4 switch; and a display module 5 are provided on the terminal keyboard panel 51, status indicators 52, a display 53 connection; power module 7 is connected via a line to each module, to provide power. 485总线结构的电能量管理终端接收到调度中心Wl的命令后,首先由主控模块1 (在485总线网络内称为主节点,485总线内所有的通信都由主节点发起、终止)分析命令的合法性、命令类型等步骤后,协调485总线网络内模块的工作,执行调度中心Wl下发的命令。 After the energy management bus configuration of the terminal 485 receives a command to the dispatch center Wl, first (referred to as a master node in the bus network 485, all communications initiated by the master node 485, terminated) by the master module 1 analyzes the command after the legitimacy step command type, etc., within the network coordination module 485 performs control center Wl issued the command. 抄表模块2对外使用模块内部扩展的485通信口(与模块之间的485总线不相连),对终端外部的电能表W2进行抄表(读取电表的数据),等待主控模块l通过485总线读取数据。 (Not connected between the bus 485 and the module) using the internal meter reading module 2 External expansion module 485 communication port, the external terminal W2 meter reading meter (meter reading data), waiting by the main control module 485 l read data bus. 脉冲模块3通过485总线接收到主控模块1的命令后,对外通过Dl控制/数据线对外部开关量设备读取数据,等待主控模块1读取。 After 3 via pulsing module 485 receives a command to the main control module 1, the external control by the Dl / data line the read data external digital devices, read control module 1 waits. 遥信模块4通过485总线获得主控模块l发布的命令后,通过D2控制线对外部设备开关量读取数据,等待主控模块1通过485总线读取。 After the remote communication module 4 l Get command issued by the main control module 485, the external apparatus to read data D2 via switch control lines, wait for the main control module 485 via a read bus. 显示模块5通过485总线获得主控模块1发布的命令,进行相应的显示、读取键盘51的输入命令和当前终端的状态信息, 显示模块5通过D3控制/数据线与键盘51或状态指示灯52、显示器53传送数据,显示模块5的数据由主控模块1通过485总线读取。 The display module 5 is obtained by the command control module 1 485 is released, the corresponding display command to read the keyboard input terminal 51 and the current status information, the display control module 5 via D3 / data line 51 or the keyboard status lights 52, the display 53 transmits data, the display module 485 of the data bus 5 is read by the main control module 1 through. 485接口模块的电源由模块内部电源模块供给。 Power supply interface module 485 by the module internal power supply module. 485总线的实时性差,并且不支持多主通信。 Poor real-time bus 485, and does not support multi-master communication. 平时各个模块的控制线都置于接收状态,接收主节点发送的数据。 Usually control lines respective modules are placed in the reception state, data received from the master node. 主节点发送的第一个数据是模块的地址数据,如果地址相符进行随后的数据通信。 The first data from the master node is the address of the module data, if the matching address for subsequent data communication. 由于485接口采用的MAX485芯片内部没有寄存器,也没有仲裁机构,所以485接口存在以下缺陷:虽然是两线制通信,但由于通信速率较低,无法提供数据传送率高的模块间通信;RS4S5 通信方式不支持多主通信(相邻两个模块之间的通信只能通过主节点转发,占用总线的时间较长,这在数据流量高的网络中,工作效率低。并且不支持总线仲 Since the chip MAX485 uses no registers, no arbitration mechanism, the following defects 485 485: Although the two-wire communications, but the communication rate is low, can not provide the data transfer rate of a communication module; RS4S5 communication as not to support multi-master communication between two modules (only through the adjacent communication node to forward the master, it takes a long time to the bus, in which high data traffic on the network, the working efficiency is low. sec and does not support bus

裁;不支持总线检错;发送节点不知道通信的正确性;如果有一个节点出.故障会使整个系统瘫痪(这在通信中是最可怕的);不支持总线网络内模块的优先级。 CD; bus error detection is not supported; transmitting node does not know the accuracy of the communication; If there is a node failure will paralyze the whole system (which is the most terrible in communication); no support within a bus priority network modules. 由于在485通信网络内只能有一个主节点,而且485通信只能由主节点来发起和终止,从节点则没有这个权利,所以抄表模块的每次采集数据,只能在接收到命令后才会启动数据采集程序,这样可能会把设备运行过程中的历史数据丢失,影响数据的完整性。 Since in the communication network 485 can have only one master node 485 and the communication can only be initiated and terminated by the master node, no node from the right, so that each data collection meter reading module, receiving a command only will start the data collection program, which could process historical data will be lost equipment running, it affects the integrity of the data. 发明内容本发明的目的在于提供一种用控制器局域网进行内部通信的电能量管理终端及控制方法,它能使每个设有微处理器的模块都能完成相对独立的功能, 通过控制器局域网总线相连,实现模块间的高速,多主,实时,抗干扰,高可靠的数据通信,并能有效提高电网中电能量的管理效率。 Object of the present invention is to provide an electrical energy management terminal and controlling method for internal communication with a controller area network, which enables the microprocessor of each module can be completed with relatively independent functions, through a controller area network a bus connected between the high-speed modules, multi-master, in real time, interference, high reliable data communication, and can effectively improve the management efficiency of electric energy in the power grid. 本发明的技术方案是这样实现的: 一种用控制器局域网进行内部通信的电能量管理终端,包括主控模块、若干个功能模块及与各模块连接的局域网,其特点是,所述的局域网是控制器局域网,该控制器局域网由若干个CAN接口并接在电缆上组成;在该控制器局域网中至少包括一对CAN接口,其中一CAN接口与主控模块连接,另一CAN接口与所述若干个功能模块中任一功能模块连接,通过控制器局域网主控模块与功能模块之间双向传送数据和控制命令。 Aspect of the present invention is implemented as follows: for performing energy management internal communication terminal with a controller area network, comprising a main module, several modules and each module is connected to the LAN, characterized in that said local area network a controller area network, a controller area network which consists of several CAN interfaces and connected to the cable composition; CAN interface comprising at least one pair in the local area network controller, wherein a master module is connected with the CAN interface, the other with the CAN interface said plurality of function modules connected to any one of the functional module, by two-way transmission of data between a controller area network module and the main control functional module and the control command. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的功能模块包括抄表模块、脉冲模块、遥信模块、显示模块、通信模块;所述的抄表模块、脉冲模块、遥信模块、显示模块分别与各CAN接口连接,通过各CAN 接口并接在控制器局域网的电缆上;所述的通信模块与主控模块连接,主控模块通过通信模块与调度中心通信,双向发送数据;抄表模块通过电缆线与电网中各电能表双向连接,读取外部各电能表的电能量数据;脉冲模块通过导线与外部开关量设备连接;遥信模块通过导线与外部设备开关量连接;显示模块分别与设置在终端面板上的键盘、状态指示灯、显示器连接;电源模块与各模块连接,提供电源。 With the above-described energy management controller area network for internal communication terminal, wherein the functional module comprises a meter module, a pulse module, remote module, display module, a communication module; the meter reading module, a pulse module, remote communication module, display module interfaces are connected to each CAN, CAN interface and through the cable connected to the controller area network; said main control module and a communication module connected to the main control module via the communication module and dispatch center communication, bidirectional transmission data; meter reading module with cables each power meter bidirectional connection, reads data from an external electrical energy of each energy meter; pulse module is connected by wires to the external digital equipment; switch device and the external lead wire through the remote communication modules connection; display module and the keyboard are disposed on the terminal panel, status indicator, connected to a display; each module is connected with the power module supplies power. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的主控模块包括:微处理器MCU1、外部数据存储器、外部程序存储器、串行口、 看门狗电路、外围电路;微处理器MCU1通过数据总线和控制信号线分别与CAN控制器、外部数据存储器、外部程序存储器、串行口、看门狗电路、外围电路双向连接;该主控模块与由CAN控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN 收发器的差分信号端并接在控制器局域网的电缆上;串行口与通信模块连接。 With the above-described energy management controller area network for internal communication terminal, wherein said control module comprises: a microprocessor the MCU1, the external data memory, external program memory, a serial port, watchdog circuit, a peripheral circuit; MCU1 microprocessor through a data bus and control signal lines respectively CAN controller, an external data memory, external program memory, a serial port, watchdog circuit, a peripheral circuit connected to a bidirectional; the master module by the CAN controller and CAN CAN interface connection between the transceiver composition, CAN controller and a CAN transceiver is connected via a signal transmission line and the reception signal line; differential signal terminal CAN transceiver and the cable connected to the controller area network; a serial port communication module connection. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的抄表模块包括微处理器MCU2、信号输入调理电路、串行口22、串行口23、看门狗电路、外围电路;微处理器MCU2通过数据总线和控制信号线分别与CAN 控制器、串行口22、串行口23、看门狗电路、外围电路双向连接;该抄表模块与由CAN控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN 收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 With the above-described energy management controller area network for internal communication terminal, wherein said metering module includes a microprocessor the MCU2, input signal conditioning circuits, serial port 22, serial port 23, a watchdog circuit, a peripheral circuit; a microprocessor and MCU2 CAN controller, serial port 22, serial port 23, a watchdog circuit, a peripheral circuit are respectively connected via a bidirectional data bus and control signal lines; the meter reading module and a CAN controller and CAN CAN transceiver interface component, and a receiving signal line are connected by signal lines between the transmitting CAN controller and a CAN transceiver; differential signal terminal CAN transceiver and a controller connected to the LAN cable. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的脉冲模块和遥信模块包括微处理器MCU3、模块专用电路、看门狗电路、外围电路;微处理器MCU3通过数据总线和控制信号线分别与CAN控制器、模块专用电路、看门狗电路及外围电路双向连接;该脉冲模块和遥信模块与由CAN 控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 The above electrical terminals inside the energy management controller in communication with a local area network, wherein said pulse module and a remote communication module comprises a microprocessor MCU3, modules dedicated circuit, watchdog circuit, a peripheral circuit; a microprocessor via data MCU3 bus and control signal lines respectively CAN controller, modules dedicated circuit, watchdog circuit and a peripheral circuit connected to a bidirectional; pulse module and the remote communication modules connected to the CAN interface CAN controller and a CAN transceiver composition, CAN controller It is connected by a signal line receiving and transmitting signals between the line and the CAN transceiver; differential signal terminal CAN transceiver and a controller connected to the LAN cable. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的控制器局域网的电缆上可扩展并接若干个CAN接口,该若干个CAN接口分别连接各功能模块。 LAN controller with the above-described energy management internal communication terminal, wherein the plurality of expandable and connected to the cable interface CAN Controller Area Network, CAN interface of the plurality of functional modules are connected. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的CAN接口由微处理器与CAN收发器组成;微处理器与CAN收发器之间通过接收信号线和发送信号线连接,并双向传送数据;微处理器通过数据总线和控制信号线分别与各功能模块连接,并双向传送数据和控制信号;CAN收发器的差分信号端并接在控制器局域网的电缆上,通过控制器局域网双向传输差分信号。 The above electrical terminals inside the energy management controller in communication with a local area network, wherein said microprocessor and a CAN interface CAN transceiver composition; are connected by a signal transmission line and a reception signal line between the microprocessor and the CAN transceiver and bi-directional transmission of data; a microprocessor connected to various functional modules through a data bus and control signal lines, respectively, and bidirectional transmission of data and control signals; differential signal terminal CAN transceiver and a controller connected to the LAN cable, by controlling LAN is bi-directional transmission of differential signals. 上述的用控制器局域网进行内部通信的电能量管理终端,其中,所述的显示模块由微处理器MCU5、外部键盘电路、外部LED指示灯、显示器、看门狗电路、外围电路及供给该模块电源的内部电源电路组成;微处理器MCU5通过数据总线和控制信号线与CAN控制器连接;微处理器MCU5通过数据总线D2、 列扫描控制线C2与外部键盘电路连接;微处理器MCU5通过数据总线D4和控制线C4与外部LED指示灯;微处理器MCU5通过数据总线D5、控制总线C5与显示器连接;微处理器MCU5通过控制线C3和复位线R与看门狗电路54连接;微处理器MCU5通过数据总线Dl和控制总线Cl与外围电路连接; 该显示模块与由CAN控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 With the above-described energy management controller area network for internal communication terminal, wherein the display module by the microprocessor the MCU 5, external keyboard circuit, external LED indicators, displays, watchdog circuit, the peripheral circuit and the supply module an internal power supply circuit composition; MCU5 microprocessor connected to the controller via the CAN data bus and control signal lines; MCU5 the microprocessor through a data bus D2, column scanning control line C2 is connected to an external keyboard circuit; a microprocessor via data MCU5 and bus control lines C4 and D4 external LED indicators; MCU5 microprocessor through a data bus D5, C5 connected to the display control bus; MCU5 microprocessor is connected via a control line and the reset line R C3 and watchdog circuit 54; microprocessing Dl is MCU5 via a data bus and a control bus connected to the peripheral circuit Cl; display module interfacing with the CAN controller and a CAN transceiver CAN composition, between CAN controller and a CAN transceiver by receiving the transmission signal line and a signal line connection; differential signal terminal CAN transceiver and a controller connected to the LAN cable. 一种用于控制器局域网通信的电能量管理终端的控制方法,包括以下步骤,其特点是:步骤1,主控模块通过通信模块与调度中心双向传送数据和命令;步骤2,主控模块调用数据、发布数据,通过CAN总线协调并接在CAN 总线上的各功能模块的工作;步骤3,各功能模块接收主控模块命令进行包括采集外部各电表的电能量信息、读取电能量数据、读取开关量的变位时间的功能运行,通过CAN总线与主控模块通信,并显示在电能量管理终端的显示器上。 A method of controlling the energy management controller area network communication terminal, comprising the steps of, characterized by: Step 1, the main control module and the control center through the communication module bidirectional transfer of data and commands; Step 2, the main control module invokes data, publishing data, and coordinating the work via CAN bus connected to the CAN bus of the functional modules; step 3, the functional module receives the command control module includes collecting electrical energy information of each external meter reading data of electric energy, read switch displacement amount of time to run the function, CAN module in communication with the master via a bus, and displayed on the display of the management terminal of electrical energy. 上述的用于控制器局域网进行通信的电能量管理终端的控制方法,其中, 在所述的步骤3中还包括以下步骤:步骤3.1,抄表模块接收主控模块命令,采集到外部各种电能量信息后, 通过CAN总线发送到主控模块;步骤3.2,脉冲模块接收主控模块命令,读取外部设备的开关量数据和电能表的电能量脉冲输出数据后,通过CAN总线发送到主控模块;步骤3.3,遥信模块通过CAN总线接收主控模块命令,读取开关量的变位时间,通过CAN总线发送到主控模块;步骤3.4,显示模块通过CAN总线接收主控模块命令,控制状态指示灯的 The above-described method for controlling a controller area network energy management communication terminal, wherein, in the step 3 further comprises the following steps: Step 3.1, meter reading module receives a command control module, to collect various external electrical after the energy information is transmitted to the master module via CAN bus; step 3.2, the module receiving the pulse command control module, the electrical energy pulse outputs the data reading device of the external switch and the energy meter data transmitted through the CAN bus to the master module; step 3.3, remote module receives the command through the CAN bus master module, the displacement amount of the read switch time, sending to the master module via CAN bus; step 3.4, the display module through the CAN bus master module receiving the command, control status lights

显示状态,与键盘交换信息;并将数据显示在显示器上。 Display state, the exchange of information with the keyboard; the data displayed on the display. 本发明用控制器局域网进行内部通信的电能量管理终端,由于采用了上述的技术方案,使之与现有技术相比,具有以下的优点和积极效果-1. 本发明由于在主控模块和各功能模块中均设有微处理器,采用了多微处理器MCU的智能模块技术,每个设有微处理器的模块都能完成相对独立的功能,通过控制器局域网总线相连,从而实现模块间的高速,多主,实时,抗干扰,高可靠的数据通信,并能有效提高电网中电能量的管理效率。 The present invention is an electrical energy management internal communication terminal with a controller area network, the use of the above technical solution, so that compared with the prior art, has the following advantages and positive effects -1. In the present invention, since the master control module and the function modules are each provided with a microprocessor with intelligent multiprocessor MCU module technology, each module is provided with a microprocessor can be completed relatively independent functions, connected through a controller area network bus, thereby realizing module between the high-speed, multi-master, real-time, anti-interference, high reliability of data communication, and can effectively improve the management efficiency of electric energy grid. 2. 本发明由于采用控制器局域网(简称CAN总线技术)使各模块之间的通信高速。 2. Since the present invention uses a controller area network (CAN bus technology referred to) so that high-speed communication between the modules. 本发明远距离数据传输速率:当传输速率为1Mbit/S,其传输距离可达40m;当传输距离为10Km时,传输速率仍可高达5Kbit/S,可获得极高的总线利用率。 Remote data transmission rate according to the present invention: When the transmission rate of 1Mbit / S, the transmission distance of up to 40m; when the transmission distance is 10Km, the transmission rate is still as high 5Kbit / S, availability of high bus utilization. 3. 本发明由于以报文方式通信,其报文的接收判断、帧的组织、收发及校验等工作均由CAN控制器和收发器自动完成,不需微处理器介入,大大提高了数据的处理速率。 3. In the present invention, since the packet communication mode, which determines the received packets, organized frame, a transceiver and verification work done automatically by the CAN controller and transceiver, without microprocessor intervention, greatly improving the data the processing rate. 4. 本发明由于每个模块均可主动发起通信,任意两个模块之间可以直接通信,具有多主功能,也就是说任一模块都可在某一时间段内成为主节点。 4. The present invention, since each module may initiate direct communication between the communication can be any two modules, with multi-master capabilities, that is to say a module can be any of the master node in a certain time period. 5. 本发明由于以总线仲裁:而且由于帧结构的巧妙设计,总线仲裁是根据优先级(ID号越小优先级越高)自动进行的,不需占用额外的总线仲裁时间, 不会发生总线竞争。 5. In the present invention, since the bus arbitration: clever design and because of the frame structure, bus arbitration is performed automatically according to priority (ID number are higher priority), without taking up extra bus arbitration time, the bus does not occur competition. 6. 本发明实时运行中,因单帧报文极短(实际报文的长度为8个字节), 便于处理,因此其实时性很高;因其无竞争,不需重发,可节省大量总线冲突后的重发时间。 6. The real-time operation of the present invention, because a single frame packet is very short (the actual packet length of 8 bytes), ease of handling, when in fact so high; contention-free because, without retransmission, savings retransmission time after a large number of bus collision. 7. 本发明由于采用CAN总线,电路连线简洁,仅需两根线即可通信,甚至在模块共地的情况下,仅存一根线时还能通信。 7. The present invention adopts CAN bus connection circuit simplicity, only two lines can communicate, even in the case where the module common ground, while still remaining a communication line. 8. 本发明由于采用抗干扰性最好的差分工作方式,因此可以达到很强的抗干扰性。 8. The present invention adopts the best immunity differential operation, thus achieving the high degree of immunity. 9. 本发明由于采用CAN总线,具有高可靠性,采用了大量的错误检测及处理措施,如在一个节点检测到不可恢复性错误时,其控制器可使该节点自动退出总线活动(这点很重要),不影响其它节点的正常通信;使用总线隔离技术可提高可靠性。 9. The present invention adopts CAN bus, high reliability, using a large number of error detection and treatment measures, such as when a node detects an unrecoverable error, which the controller may automatically exits node bus activity (this it is important), does not affect the normal communication with other nodes; using a bus isolation reliability can be improved. 10. 本发明由于采用多个微处理器MCU进行控制管理,当电能量管理的功能不断扩充,使终端产品具有模块组合的灵活性,包括模块种类搭配的灵活性及模块安装方式的灵活性,如将脉冲遥信模块通过CAN总线拉到终端外部的某个地方(若采用最高速率在40m以内),可实现分布式终端。 10. Since the present invention uses a plurality of microprocessors MCU control and management, energy management when expanding the function of the end product flexibility combined module, comprising a module flexibility with the type and flexibility of the installation module, as will be drawn pulse somewhere remote communication modules via the cAN bus an external terminal (the use of a maximum rate less than 40m), the terminal can be implemented distributed. 11. 本发明由于抄表模块通过CAN总线与主控板连接,CAN总线是一个多主通信系统,抄表模块能够在采集到数据后主动把数据发送到主控模块,让主控模块来保存抄表模块的数据,而抄表模块不停的采集数据,保证数据的完整性。 11. The meter of the present invention since the modules are connected via a CAN bus with the main control board, a multi-master CAN bus communication system, meter reading module can actively send data to the main control module after the data is collected, so that control module to store meter reading data modules, keep the meter reading module data collection, to ensure data integrity. 附图说明通过以下对本发明用控制器局域网进行内部通信的电能量管理终端的一实施例结合其附图的描述,可以进一步理解本发明的目的、具体结构特征和优点。 BRIEF DESCRIPTION OF THE DRAWINGS in connection with the following description of an embodiment of the present invention energy management internal communication terminal by using a controller area network may be further appreciated that the object of the present invention, the specific structural features and advantages. 其中,附图为-图1是现有技术单微处理器结构的电能量管理终端的电路框图。 Wherein the reference is - FIG 1 is a circuit block diagram showing an electrical energy management terminal prior art single microprocessor architecture. 图2是现有技术多微处理器及并行总线结构的电能量管理终端的电路框图。 FIG 2 is a circuit diagram of a prior art multiprocessor energy management and terminal configuration of a parallel bus. 图3是现有技术多微处理器及I2C总线结构的电能量管理终端的电路框图。 FIG 3 is a circuit block diagram of the electrical terminal prior art energy management and I2C bus multiprocessor configuration. 图4是现有技术485总线结构的电能量管理终端的电路框图。 FIG 4 is a circuit block diagram showing an electrical energy management terminal 485 of the prior art structure. 图5是本发明用控制器局域网进行内部通信的电能量管理终端的电路框图。 FIG 5 is a block circuit diagram of the present invention energy management of the internal communication terminal by the controller area network. 图6是本发明用控制器局域网进行内部通信的电能量管理终端的主控模块电路原理图。 FIG 6 is a control module of the present invention is an electrical circuit diagram of the energy management of the internal communication terminal by the controller area network. 图7是本发明用控制器局域网进行内部通信的电能量管理终端的主控模块流程图。 FIG. 7 is an electrical energy management control module of the internal communication terminal according to the present invention is carried out with a flow chart of a controller area network. 图8是本发明用控制器局域网进行内部通信的电能量管理终端的抄表模板电路原理图。 FIG 8 is a template of the present invention metering circuit diagram of the energy management internal communication terminal by the controller area network. 图9是本发明用控制器局域网进行内部通信的电能量管理终端的脉冲、遥信模块电路原理图。 FIG 9 is a pulse of electrical energy according to the present invention the internal communication terminal managed by a controller area network, remote module circuit diagram.

图10是本发明用控制器局域网进行内部通信的电能量管理终端的显示禾莫块电路原理图。 FIG 10 is a graph showing the present invention Wo energy management of the internal communication terminal with a controller area network mo block circuit diagram. 图ll是本发明用控制器局域网进行内部通信的电能量管理终端的CAN标准幀的格式表。 Fig ll is a format table of the present invention energy management standard CAN internal communication terminal by the frame controller area network. 图12是本发明用控制器局域网进行内部通信的电能量管理终端的CAN扩展幀的格式表。 FIG 12 is a format table of the present invention CAN extended frame energy management of the internal communication terminal by the controller area network. 图13是本发明用控制器局域网进行内部通信的电能量管理终端的CAN接口流程图。 FIG 13 is a flowchart of the present invention energy management CAN interface terminal in communication with the interior of the controller area network. 图14是本发明用控制器局域网进行内部通信的电能量管理终端的CAN控制器初始化流程图。 FIG 14 is a flowchart of the present invention is to initialize CAN controller for energy management of the terminal with the internal communication controller area network. 图15是本发明用控制器局域网进行内部通信的电能量管理终端的CAN控制器发送报文流程图。 FIG 15 is an energy management according to the present invention an electrical terminal with the internal communication controller area network CAN controller transmits a message flowchart. 图16是本发明用控制器局域网进行内部通信的电能量管理终端的CAN控制器报文接收流程图。 FIG 16 is an energy management according to the present invention an electrical terminal with the internal communication controller area network CAN message reception controller flowchart. 图17是本发明用控制器局域网进行内部通信的电能量管理终端的控制方法流程图。 FIG 17 is a flowchart of a control method of energy management of the internal communication terminal according to the present invention is a controller area network. 具体实施方式本发明用控制器局域网进行内部通信的电能量管理终端(简称EM3)是一个用于变电站的抄表终端,负责电力系统内用户侧的数据采集及控制任务。 DETAILED DESCRIPTION The present invention energy management terminal (referred to EM3) is a meter for internal communication terminal by the substation controller area network, for data acquisition and control tasks within the power system on the user side. 该终端包括主控模块、若干个功能模块及与各模块连接的局域网;所述局域网是控制器局域网(Controller Area Network简称CAN总线)。 The terminal including a local control module, several modules and each module is connected; said LAN is a local area network controller (Controller Area Network CAN bus for short). 该控制器局域网8 由若干个CAN接口SI并接在CAN电缆线82上组成。 The Controller Area Network CAN interface 8 by a plurality of SI and connected to the cable 82 CAN composition. 控制器局域网的电缆上可扩展并接若干个CAN接口,该若干个CAN接口分别连接各功能模块。 A plurality of expandable and connected to the cable interfaces CAN Controller Area Network, CAN interface of the plurality of functional modules are connected. 在本发明用控制器局域网进行内部通信的电能量管理终端的控制器局域网中至少包括一对CAN接口,其中一CAN接口82与主控模块1连接,另一CAN接口82与所述若干个功能模块中任一功能模块连接,主控模块1通过控制器局域网与功能模块之间双向传送数据和命令。 In the energy management controller area network terminal of the present invention for internal communication with the controller area network comprises at least one of the CAN interfaces, a CAN interface 82 is connected with the control module 1, further CAN interface 82 with the plurality of function module is connected to any one of functional modules, between the main control module 1 through the LAN controller and the functional modules bidirectional transfer data and commands. 请参见图5所示,在本实施例中,本发明用控制器局域网进行内部通信的电能量管理终端包括主控模块l,抄表模块2、脉冲模块3、遥信模块4、显示模块5、通信模块6、电源模块7及CAN接口8;主控模块l、抄表模块2、脉冲模块3、遥信模块4、显示模块5分别与各CAN接口81连接,通过各CAN 接口81并接在控制器局域网8的CAN电缆线82上;通信模块6与主控模块1 连接,主控模块1通过通信模块6与调度中心W1通信,双向发送数据;抄表模块2通过电缆线与电网中外部各电能表W2双向连接,采集各电能表的数据; 脉冲模块3通过导线与外部开关量设备W3双向连接,读取外部开关量数据; 遥信模块4通过导线与外部设备W4连接,读取开关量的变位时间;显示模块5分别与设置在终端面板上的键盘51、状态指示灯52、显示器53连接,显示数据和状态信号。 Referring to FIG, in the present embodiment, the present invention is carried out with energy management controller area network 5 includes a main control module L terminal, internal communication meter module 2, module 3 pulse, remote module 4, a display module 5 , the communication module 6, and power supply module 7 CAN interface 8; L control module, meter module 2, module 3 pulse, remote module 4, a display module 5 are connected to each of the CAN interfaces 81, 81 through the CAN interface and then in controller area network CAN cable line 828; a communication module 6 is connected with the master module 1, the main control module 16 communicates with the dispatch center W1, the bidirectional data transmission via the communication module; meter reading module and the power cable 2 by each meter W2 external bidirectional connection, the data collection for each meter; pulse module 3 through a wire W3 external digital device connected to a bidirectional read external digital data; remote communication module 4 is connected through a wire W4 of the external device, read displacement time switch; and a display module 5 are provided on the terminal keyboard panel 51, status indicators 52, 53 connected to a display, the display data and status signals. 本发明电能量管理终端采用无线方式,通信模块6是一个带内置MODEM的无线数据通信装置,通信模块6也可采用其他的通信方式,使得电能量管理终端与变电站现有的通信接口相匹配,可灵活应用。 Terminal of the present invention energy management in a wireless manner, the wireless communication module 6 is a data communication apparatus with built-in MODEM, communication module 6 can be other means of communication, so that the energy management terminal communication interface with existing substation match, It can be applied flexibly. 电源模块7 的输入端与外部交流电源连接,其输出端与各模块连接,提供直流工作电源。 Input terminal of the power module 7 is connected to an external AC power source, an output terminal of each module connected to provide DC power supply. 在本发明的终端中主控模块1负责终端所起的作用是控制及协调;抄表模块2负责各种电能量信息的采集;通信模块6负责与调度中心Wl进行通信, 接收调度中心Wl的命令及向调度中心Wl发送所采集的数据;电源模块7给各模块提供电源。 In the present invention, the terminal control module 1 responsible for the role of the terminal is controlled and coordinated; 2 meter reading module is responsible for collecting various electrical energy information; communication module 6 responsible for communication with the control center Wl, Wl of receiving dispatch center transmitting the collected data and commands to Wl of the control center; power supply module provides power to each module 7. 这些模块在主控模块的协调控制下完成终端的所有功能。 These modules do all the coordination function of the terminal under the control of the control module. 在本发明的终端中各个模块是相对独立的(模块间没有实际的相互控制线),且能分别完成各自规定的模块功能;终端中模块的数量和功能可以根据电能量管理需要,可灵活配置;CAN总线可不局限于终端内部,可以升级成为一个开放性的局域网,从而实现模块的分布式应用;采用控制器局域网络即CAN总线与各个模块之间的连接,电路结构简单,模块间只需两根线(在某种情况下,甚至只需一根线),即可实现CAN通信,对通信线的要求相对较低。 In the terminal of the present invention are relatively independent of each module (each no actual inter-module control line), respectively, to complete the module and can each predetermined function; number and function of the terminal modules may require electrical energy management can be flexibly configured ; cAN bus may not be limited to the internal terminal may be upgraded to an open LAN module to achieve the distributed application; i.e. using simple connection controller area network, cAN bus circuit structure between the respective modules, inter-module only two lines (in some cases, even just a line), the cAN communication can be realized relatively low demands on the communication line. 在本发明的终端中,主控模块1通过CAN总线与其它功能模块通信,将其它功能模块采集的数据集中处理、存贮。 In the terminal of the present invention, the master module 1 CAN bus communication with other functional blocks by the data of the other functional modules focus acquisition, storage. 功能模块有多种选择,所有功能模块均为智能模块,具有独立的微处理器结构,能单独完成某一类的数据采集、 处理。 A wide selection of functional modules, all functional modules are intelligent modules has an independent microprocessor architecture, a separate class to complete the data acquisition process. 与现有技术终端相比,该终端较突出的特点是:能提高通信效率,减少通信错误,提高抗干扰、可靠性;根据变电站不同要求可灵活配置模块数量, 采用模块化设计,结构简单,配置灵活,既节省了成本,也给工程维护工作带 Compared with the prior art terminal which is more prominent features are: to enhance the communication efficiency, reduce communication errors, improving immunity, reliability; depending on the requirements of the substation number of modules can be flexibly configured, modular design, simple structure, configuration flexibility, reduces costs, but also to work with engineering and maintenance

来了方便;还可以实现模块的分布式应用。 Come easy; you can also implement distributed application modules. 还有一种CAN接口(未提供电路图)由微处理器与CAN收发器组成;微处理器与CAN收发器之间通过接收信号线和发送信号线连接,并双向传送数据;微处理器通过数据总线和控制信号线分别与各功能模块连接,并双向传送数据和控制信号;CAN收发器的差分信号端并接在控制器局域网的电缆上,通过控制器局域网双向传输差分信号。 There is also a CAN interface (not provided a circuit diagram) by the microprocessor with the composition of the CAN transceiver; between the microprocessor and the CAN transceiver is connected via a signal transmission line and the reception signal lines, and bi-directional transmission of data; a microprocessor via a data bus and a control signal line are connected to each function module, and bidirectional transmission of data and control signals; differential signal terminal and CAN transceiver controller connected to the LAN cable, the LAN controller through bidirectional differential signaling. 请参见图6所示,主控模块l包括:微处理器MCU1、由CAN控制器811 与CAN收发器812组成的CAN接口81、外部数据存储器11、外部程序存储器12、串行口13、看门狗电路14、外围电路15;微处理器MCU1通过数据总线和控制信号线分别与CAN控制器811、外部数据存储器11、外部程序存储器12、串行口13、看门狗电路14、外围电路15双向连接;CAN控制器811 与CAN收发器812之间通过接收信号线和发送信号线连接;CAN收发器812 的差分信号端并接在控制器局域网的电缆82上;串行口13与通信模块6连接。 Referring to FIG. 6, l control module comprises: a microprocessor the MCU1, CAN interface 81 by the CAN transceiver 811 and CAN controller 812 composed of the external data memory 11, the external program memory 12, serial port 13, see the watchdog circuit 14, the peripheral circuit 15; MCU1 microprocessor through a data bus and control signal lines respectively CAN controller 811, the external data memory 11, the external program memory 12, serial port 13, a watchdog circuit 14, a peripheral circuit bi-directional connection 15; the CAN controller 811 receives CAN transceiver connected by a signal line and between the transmission signal line 812; differential signal terminal CAN transceiver 812 and a controller connected to the LAN cable 82; 13 and the serial communication port module 6 is connected. 主控模块1中采用的微处理器MCU1的型号为80C196,主控模块内部各个模块的控制总线和数据总线都是由微处理器MCU1提供,内部电源电路16 供给各模块电源。 The microprocessor in control module MCU1 model used is a 80C196, the main control module controls the internal modules of each bus and data bus are provided by a microprocessor MCU1, the internal power supply circuit 16 is supplied to each power module. 外部数据存储器11是保存终端中间运算结果、通信数据、接收命令,外部数据存储器通过8位数据总线D2和控制总线C2 (包括片选CS、读允许RE、 写允许WE、地址锁存ALE)与微处理器MCU1的连接。 External data memory 11 is stored intermediate calculation result of the terminal, the communication data, receiving a command, 8-bit external data memory data bus and a control bus D2 C2 (including the CS chip select, read enable REs, write enable WE, address latch ALE) and a microprocessor connected to the MCU1. 由于微处理器MCU1 (80C196)内部没有程序存储器程序,所以程序存储器需要外扩,外部程序存储器12通过8位数据/地址总线D4和控制总线C4(包括片选CS、读允许RE、写允许WE)与微处理器MCU1的接口连接,接收来自于微处理器MCU1的控制或向微处理器MCU1提供数据。 Since the microprocessor MCU1 (80C196) no internal program memory a program, the program needs to extended memory, the program memory 12 by the external 8-bit data / address bus and a control bus D4 C4 (including the CS chip select, read enable REs, a write enable WE ) MCU1 interfaces connected to the microprocessor, the microprocessor receives from the control MCU1 or provide data to the microprocessor MCU1. 串行口13与通信模块6连接,可以接收调度中心发来的各种动作命令, 也可以主动上传数据,串行口13的输入端和输出端分别与微处理器MCU1的扩展的串行口TD和RD连接,微处理器MCU1的TD端口通过串行口13向通信模块6发送数据,微处理器MCU1的通过RD端口串行口13接收通信模块6 的数据。 Serial port 13 is connected to communication module 6 and to be sent to the dispatch center receives various operation commands can also initiate uploading data, the serial input and output port 13 are extended to the serial port of the microprocessor MCU1 TD and RD are connected, the microprocessor sends the MCU1 TD port 13 to the serial port data communication module 6, the microprocessor data port RD MCU1 by the communication module 13 receives the serial port 6. 为了确保程序正常运行,而增加了看门狗电路14,看门狗电路14的输入 To ensure the normal operation of the program, the watchdog circuit 14 is increased, the input of the watchdog circuit 14

和输出端分别通过控制线C3和复位线R与微处理器MCU1的输出和输出端连接,控制线C3是微处理器MCU1的一根I/O线控制线,控制线C3在程序运行过程中定期产生脉冲,清除看门狗电路14的计数器,使看门狗电路14没有复位信号R输出;如果程序由于意外的情况进入一个死循环,在规定的时间内, 控制线C3没有产生脉冲,看门狗电路14将输出复位信号R,微处理器MCU1 复位使得程序能够重新执行。 And an output terminal and an output terminal, respectively, through the output control line C3, and reset R MCU1 is connected to the microprocessor, a microprocessor control line C3 MCU1 of an I / O control lines, control lines in the course of running C3 periodically generating a pulse, counter 14 clears the watchdog circuit, watchdog circuit 14 does not output a reset signal R; if the program due to an unexpected situation enters an endless loop, within a predetermined time, the control line C3 is not generated pulses, see the watchdog circuit 14 outputs a reset signal R, so that the microprocessor program to reset MCU1 re-executed. 内部电源电路16给整个模块提供模块所需要的电源。 An internal power supply circuit 16 supplies power to the entire modules needed modules. 主控模块1内的外围电路15通过8位数据总线Dl和控制总线Cl与微处理器MCU1连接,微处理器MCU1通过8位数据总线Dl和控制总线Cl对围电路进行控制,外围电路15的数据总线是双向的,可以接收微处理器MCU1 发布的数据或向微处理器MCU1提供状态,控制总线是单向的,外围电路15 的工作性质取决于控制总线的状态。 A peripheral circuit within a control module connected to the microprocessor 15 by eight MCU1 data bus and a control bus Dl Cl, MCU1 microprocessor to peripheral circuits controlled by the 8-bit data bus and a control bus Dl Cl, the peripheral circuit 15 the data bus is bidirectional, data may be received or released MCU1 microprocessor provides status to the microprocessor MCU1, unidirectional control bus, the nature of the peripheral circuit 15 depends on the state of the control bus. 主控模块1中的CAN接口81由CAN控制器811 (型号是SJA1000)和CAN收发器812 (型号是P82C250)组成,电路的总体结构较为简单,能构成了一个功能十分完善的通信接口。 1 CAN interface control module 81 by the CAN controller 811 (model is SJA1000) and CAN transceiver 812 (model is P82C250) composition, the overall circuit structure is simple, and can constitute a communication interface function is complete. 如果为了安全,想使用隔离总线,只需添加适当的隔离电路即可。 If for security, isolation want to use the bus, simply add the appropriate isolation circuits can be. CAN控制器811是通过8位数据/地址总线AD、片选线CS、地址锁存线ALE、读允许线RE、写允许线WE和中断允许线INT与微处理器MCU1连接, CAN控制器811通过数据/地址总线AD可以接收微处理器MCU1命令或数据, CAN控制器811也可以向微处理器MCU1发送数据;微处理器MCU1通过CS 线输出给CAN控制器811的片选信号;微处理器MCUl通过ALE线输出给CAN控制器811的地址锁存信号;微处理器MCUl通过RE线输出给CAN控制器811的读允许信号;微处理器MCUl通过WE线输出给CAN控制器811 的写允许信号;当CAN控制器811发送或接收了一帧报文后,CAN控制器811 会产生一个中断信号INT给微处理器MCU1,微处理器MCUl执行中断处理程序;微处理器MCUl通过MC线输出给CAN控制器811的写模式显示信号。 CAN controller 811 is 8-bit data / address bus AD, chip select line CS, address latch line ALE, read enable line RE, a write enable line WE to allow and interrupt line INT is connected to the microprocessor MCU1, CAN controller 811 may be received via data / address bus AD MCU1 microprocessor commands or data, cAN controller 811 may also transmit data to the microprocessor MCU1; MCU1 microprocessor chip select signal is output to the cAN controller 811 through the CS line; microprocessing MCUl to an address latch signal ALE CAN controller 811 via the output line; MCUl microprocessor CAN controller 811 to the read enable signal RE via the output line; MCUl microprocessor via output line WE to the write controller 811 to CAN enable signal; or when transmitting a packet received cAN controller 811, cAN controller 811 generates an interrupt signal INT to the microprocessor MCU1, microprocessor MCUl interrupt processing; MCUl microprocessor MC via line CAN controller 811 outputs to the write mode display signal. TD信号是CAN控制器811输出发送数据到CAN收发器812的发送信号, RD是从CAN收发器812输出到的CAN控制器811的接收信号。 TD signal is a CAN controller 811 outputs the transmission data to the transmission signal the CAN transceiver 812, RD, the reception signal is output to the CAN controller 811 from the CAN transceiver 812. CAN总线双向传输的差分信号为"CANH"和"CANL",具有很高的抗 CAN bus is bi-directional transmission of differential signals "CANH" and "CANL", having a high resistance to

干扰性。 Interference. 当微处理器MCU1写入一帧信息后,再写入发送允许命令后,CAN 控制器811立即发送该帧信息;当CAN控制器811产生一个接收中断后,微处理器MCU1读取CAN控制器811接收缓冲器的内容。 When the microprocessor writes a MCU1 information, and then transmits the write enable command, the controller 811 transmits the CAN frame information immediately; when the CAN controller 811 generates a receive interrupt, the microprocessor reads the CAN controller MCU1 811 receives the contents of the buffer. 请参见图7所示,开机后主控模块1工作程序流程如下:第一步,硬件初始化,对微处理器MCU1的外围智能芯片和微处理器MCU1 的输入输出口进行初始化,对CAN接口的硬件初始化和寄存器初始化。 Referring to FIG. 7, the main control module 1 after power work program flow as follows: First, the hardware initialization, input and output ports of the microprocessor chip and intelligent peripheral MCU1 MCU1 microprocessor is initialized, the CAN interface register initialization and hardware initialization. 第二步,参数校验正确,计算参数区的累加和是否与内存中保留的累加和一致,如果校验结果不正确,则参数和数据初始化为默认值,再进入第三步; 如果校验结果正确,则直接进入第三步。 A second step of checking the correct parameter, the parameter calculating accumulated and accumulating region and consistent, if the check result is incorrect, the parameters and data are initialized to default values ​​whether to retain the memory, then to the third step; check if the result is correct, then go directly to the third step. 第三步,对保存中间结果的数据存储器、微处理器MCU1的寄存器、部分外围设备的寄存器初始化。 The third step is the initialization of the register data store intermediate results saved, the microprocessor registers MCU1, portion of the peripheral devices. 第四步,开放微处理器MCU1的总中断和部分片内或片外中断源的中断允许位。 A fourth step, the inner portion and the master interrupt chip or external interrupt source open MCU1 enable bit microprocessor. 第五步:进入主循环,执行主程序共计分为7个任务;Loopl:读时钟及执行每秒任务,读时钟,产生秒分时日月等标志;并执行每秒的运算及处理任务;Loop2:串行口通信报文处理任务,接收到有效报文后,将UART0中接收到的数据按照规约进行处理,并执行相应任务;Lo叩3:程序运行监视任务,当定时器中断出错时,程序自动启动看门狗;Loop4:参数设置后处理任务,有参数处理任务时,根据需要重新计算参数校验和;Lo叩5:执行每分、每时、每天、每月任务,执行每分、每时、每天、每月的运算及处理任务;Loop6:产生事件上报标志任务,当程序运行出现异常时,置事件上报标志;Loop7:有CAN通讯标志时,执行CAN通讯任务。 Step 5: Enter the main loop, the main program is divided into a total of seven tasks; Loopl: a read clock and second tasks, a read clock generating second time-division flag moon and the like; and performing calculations per second and processing tasks; loop2: serial communication message processing task, after receiving a valid message, the UART0 received data in accordance with protocol processing, and performs a corresponding task; the Lo knock 3: monitoring tasks running, when the timer interrupt error , automatically starts the watchdog; LOOP4: after the parameter setting processing task, when the task processing parameters, the checksum is recalculated as required and parameters; the Lo knock 5: execution per minute, every hour, day, month task, each performing minute, every hour, every day, every month of operation and processing tasks; Loop6: generating an event report flag task, when the program is running is abnormal, set event reporting signs; loop7: when CAN communication flag, perform CAN communication tasks. 请参见图8所示,抄表模块2是该终端对外采集数据和调理采集信号的一个模块,该模块在终端中的位置是十分重要的。 Referring to FIG. 8, the meter module 2 is the external terminal data acquisition and conditioning a signal acquisition module, the position of the module in the terminal is very important. 抄表模块2由微处理器MCU2、 信号输入和调理电路21、串行口22、串行口23、看门狗电路24、外围电路25、 The MCU2 meter reading module 2 by the microprocessor, and an input signal conditioning circuit 21, serial port 22, serial port 23, a watchdog circuit 24, a peripheral circuit 25,

内部电源电路26及CAN接口电路81组成。 An internal power supply circuit 26 and the CAN interface circuit 81 composed. 抄表模块2中采用的微处理器MCU2的型号为80C196,抄表模块2内部各个模块的控制总线和数据总线都是由微处理器MCU2提供,内部电源电路26供给各模块电源。 2 MCU2 microprocessor models used in meter reading module 80C196, 2 internal meter reading module each module control bus and data bus are provided by a microprocessor MCU2, each module supplying power to the internal power supply circuit 26. 微处理器MCU2通过数据总线和控制信号线分别与CAN 控制器811、串行口22、串行口23、看门狗电路24、外围电路24双向连接; CAN控制器811与CAN收发器812之间通过接收信号线RD和发送信号线TD 连接;CAN收发器812的差分信号CANH、 CANL端并接在控制器局域网的电缆上。 MCU2 microprocessor 811 and CAN controller, serial port 22, serial port 23, a watchdog circuit 24, a peripheral circuit 24 are connected via a bidirectional data bus and control signal lines; CAN controller 811 and CAN transceiver 812 of connection line between the reception signal and the transmission signal line RD TD; CAN transceiver CANH 812 is a differential signal, CANL terminal and the controller connected to the LAN cable. 为了提高终端的可靠性,信号输入和调理电路21将终端采样的模拟信号输入,经过放大器放大后,采用隔离电路把高压采样回路与低压回路进行隔离, 模拟信号经过A/D转换电路后转换成数字信号,供微处理器MCU2采样读取。 To improve the reliability of the terminal, analog signal input conditioning circuit 21 and the signal input terminal of the sample, after the amplifier using a high pressure sample loop isolation circuit to isolate the low-pressure circuit, the analog signal after A / D conversion circuit into a digital signal, a microprocessor for reading sampling MCU2. 信号输入和调理电路21通过控制总线C2和8位宽度的信号总线D2与微处理器MCU2的接口连接。 21 interfacing and conditioning the input signal through a control bus circuit C2 and D2 to the microprocessor bus signals MCU2 width of 8 bits. 信号总线D2是双向传输信号,接受或向微处理器MCU2 提供数据,控制总线C2是单向接受微处理器MCU2的控制。 D2 is a two-way signal bus which transmits a signal or to provide data to the microprocessor MCU2, C2 is a unidirectional control bus receives the control microprocessor of MCU2. 串口22和串口23是抄表模块2读取外部电能表W2数据的接口,串口22 通过数据发送线TD1和数据接收线RD1分别与微处理器MCU2的数据发送端和数据接收端连接;串口23通过数据发送线TD2和数据接收线RD2分别与微处理器MCU2的数据发送端和数据接收端。 22 and serial port 23 are external power meter reading module 2 reads the data table W2 interface, serial data transmission line 22 through the reception data line RD1 and TD1 respectively connected to data transmission and data receiving terminal of the microprocessor of MCU2; serial 23 TD2 through the data transmission line and a data receiving line RD2 respectively microprocessor MCU2 data sender and the data receiver. 串口22和串口23模块的电源由模块内部电源电路供给。 Serial port 22 and the power supply circuit module 23 is supplied by the power supply module. 为了确保程序正常运行,而增加了看门狗电路24,看门狗电路24的输入和输出端分别通过控制线C3和复位线R与微处理器MCU2的输出和输出端连接,控制线C3是微处理器MCU2的一根I/O线控制线,控制线C3在程序运行过程中定期产生脉冲,清除看门狗电路24的计数器,使看门狗电路24没有复位信号R输出;如果程序由于意外的情况进入一个死循环,在规定的时间内, 控制线C3没有产生脉冲,看门狗电路24将输出复位信号R,微处理器MCU2 复位使得程序能够重新执行。 To ensure the normal operation of the program, the watchdog circuit 24 is increased, the input and output terminals respectively connected to the watchdog circuit 24 through the control line and the reset line R C3 and the output of MCU2 output of the microprocessor, the control line C3 is MCU2 of a microprocessor I / O lines control lines, the control line C3 is generated in the course of running a regular pulse, clears the counter of the watchdog circuit 24, so that no watchdog circuit 24 outputs a reset signal R; because if the program unexpected circumstances enters an endless loop, within a predetermined time, the control line C3 is not generated pulses, the watchdog circuit 24 outputs a reset signal R, so that the microprocessor program to reset MCU2 re-executed. 内部电源电路26给整个模块提供所需要的电源。 An internal power supply circuit 26 supplies power to the entire module is required. 抄表模块2内的外围电路25通过8位数据总线Dl和控制总线Cl与微处理器MCU2连接,微处理器MCU2通过8位数据总线Dl和控制总线Cl对围电路进行控制,外围电路25通过数据总线Dl可以接收微处理器MCU2发布的 In the peripheral circuit module 25 is connected through a meter 2 8-bit data bus and a control bus Cl and Dl MCU2 microprocessor, the microprocessor controls the peripheral circuit to MCU2 through the 8-bit data bus and a control bus Dl Cl, the peripheral circuit 25 by microprocessor data bus Dl can receive MCU2 released

数据或向微处理器MCU2提供状态数据,外围电路25通过控制总线Cl单向接收微处理器MCU2的控制信号。 Data or the status data provided to the microprocessor MCU2, the peripheral circuit 25 receives a control signal via the microprocessor MCU2 Cl unidirectional control bus. 抄表模块2中的CAN接口81由CAN控制器811 (型号是SJA1000CAN) 和CAN收发器812 (型号是P82C250)组成,CAN控制器811是通过8位数据/地址总线AD、片选线CS、地址锁存线ALE、读允许线RE、写允许线WE 和中断允许线INT与微处理器MCU2连接。 Metering module CAN interface 81 2 811 by the CAN controller (model is SJA1000CAN) and CAN transceiver 812 (model is P82C250) composition, CAN controller 811 is 8-bit data / address bus AD, chip select line CS, address latch line ALE, read enable line RE, a write enable line WE to allow and interrupt line INT connected to the microprocessor MCU2. CAN控制器811通过数据/地址总线AD可以接收微处理器MCU2命令或数据,CAN控制器811也可以向微处理器MCU2发送数据;微处理器MCU2通过CS线输出给CAN控制器811的片选信号;微处理器MCU2通过ALE线输出给CAN控制器811的地址锁存信号;微处理器MCU2通过RE线输出给CAN控制器811的读允许信号;微处理器MCU2通过WE线输出给CAN控制器811的写允许信号;当CAN控制器811发送或接收了一帧报文后,CAN控制器811会产生一个中断信号INT给微处理器MCU2,微处理器MCU2执行中断处理程序;微处理器MCU1通过MC 线输出给CAN控制器811的写模式显示信号。 CAN controller 811 may receive via data / address bus AD MCU2 microprocessor commands or data, CAN controller 811 may also transmit data to the microprocessor MCU2; MCU2 outputted to the microprocessor controller 811 via CAN chip select line CS signal; MCU2 through the microprocessor ALE output line 811 to the CAN controller address latch signal; MCU2 microprocessor CAN controller 811 to the read enable signal RE via the output line; MCU2 is output to the microprocessor through the CAN control lines WE the write enable signal 811; or when transmitting a packet received cAN controller 811, cAN controller 811 generates an interrupt signal INT to the microprocessor MCU2, MCU2 microprocessor interrupt processing; microprocessor MCU1 to the CAN controller 811 outputs a write mode via a display signal line MC. TD信号是CAN控制器811输出发送数据到CAN收发器S12的发送信号, RD是从CAN收发器812输出到的CAN控制器811的接收信号。 TD signal is a CAN controller 811 outputs the transmission data to the transmission signal S12 CAN transceiver, RD, the reception signal is output to the CAN controller 811 from the CAN transceiver 812. CAN总线双向传输的差分信号为"CANH"和"CANL",具有很高的抗干扰性。 Differential signal transmission is bidirectional CAN bus "CANH" and "CANL", has a high noise immunity. 当微处理器MCU2写入一帧信息后,再写入发送允许命令后,CAN 控制器811立即发送该帧信息;当CAN控制器811产生一个接收中断后,微处理器MCU2读取CAN控制器811接收缓冲器的内容。 When the microprocessor writes a MCU2 information, and then transmits the write enable command, the controller 811 transmits the CAN frame information immediately; when the CAN controller 811 generates a receive interrupt, the microprocessor reads the CAN controller MCU2 811 receives the contents of the buffer. 抄表模块2对外部的各种电量信息的采集、放大、隔离、A/D转换,通过CAN总线及时把采集到的数据发送到主控模块1,主控模块1在接收到数据后保存起来,以备调度中心查询数据。 2 meter reading module collection information of various external power, amplification, isolation, A / D conversion, promptly send the collected data to the main control module 1 through the CAN bus, the main control module 1 after the saved data is received to prepare the data query dispatch center. 抄表模块2的电源是由内部电源电路26 通过POWER线提供。 2 power meter reading module is provided by an internal power supply circuit 26 via lines POWER. 根据"CAN总线的通信协议"CAN总线是一个多主通信系统,在CAN总线内没有一个固定的主节点,任何一个模块都可以作为主节点,所以抄表模块2能够在采集到数据后主动把数据发送到主控模块1,让主控模块来保存抄表模块的数据,而抄表模块不停的采集数据,保证数据的完整性。 The "CAN bus communication protocol" CAN bus is a multi-master communication system, without a fixed master node in a CAN bus, it may be any of a module as a master node, so the meter reading module 2 can be active in the data collected send data to the main control module 1, so that the main control module to store data meter reading modules, and meter reading module stop collecting data, ensure data integrity. . 请参见图9所示,脉冲、遥信模块3包括微处理器MCU3、由CAN控制 Referring to FIG., The pulse, remote module 3 includes a microprocessor the MCU3, controlled by the CAN 9

811器与CAN收发器812组成的CAN接口81、模块专用电路31、看门狗电路32、外围电路33、内部电源电路34;微处理器MCU3通过数据总线和控制信号线分别与CAN控制器811、模块专用电路31、看门狗电路32及外围电路33 双向连接。 CAN transceiver 811 and 812 is composed of a CAN interface 81, a dedicated circuit module 31, the watchdog circuit 32, a peripheral circuit 33, an internal power supply circuit 34; MCU3 microprocessor through a data bus and control signal lines, respectively, and CAN controller 811 , dedicated circuit module 31, the watchdog circuit 32 and external circuit 33 is bidirectionally connected. CAN控制器811与CAN收发器812之间通过接收信号线RD和发送信号线TD连接;CAN收发器的差分信号CANH端、CANL端并接在控制器局域网的电缆上。 Between the CAN controller 811 and CAN transceiver 812 is connected via a signal line receiving a transmission signal line RD and the TD; differential signal terminal CAN transceiver CANH, CANL terminal and the controller connected to the LAN cable. 内部电源电路34给整个模块提供所需要的电源。 Internal power supply circuit 34 supplies power to the entire module is required. 该模块的微处理器MCU3采用的芯片型号为89C52。 The microprocessor used in this module MCU3 chip model 89C52. 模块专用电路是为了完成脉冲、遥信模块的特殊功能而设计的,当终端在收到调度中心6的读取遥信命令后,终端通过该模块把外部设备开关量数据传送给主控模块;当终端在收到脉冲命令后,通过该模块把外部设备的脉冲数据传送给主控模块。 Dedicated circuit module in order to complete the pulse, the remote communications module and special function designed to read when the terminal after receiving the remote control center 6 letter command, the terminal apparatus transmits the digital data to the external main control module through the module; when the terminal after receiving the command pulse through the pulse module to transmit data from the external device to the main control module. 模块专用电路31通过8位数据总线D2和控制总线C2与微处理器MCU3连接;通过双向的数据总线D2可以接收微处理器MCU3的数据或向微处理器MCU3传输数据;控制总线包括:片选、读写允许、地址锁存控制线组成,通过单向的控制总线C2接受微处理器MCU3的控制,该模块3内部电源是由内部电源电路34通过POWER线提供。 Dedicated circuit module 31 is connected by an 8-bit data bus and a control bus C2 and D2 microprocessor MCU3; MCU3 microprocessor may receive data or transmit data to the microprocessor MCU3 D2 by a bidirectional data bus; a control bus comprising: a chip select , allowed to read and write, address latch control lines, receives the control MCU3 through the check the microprocessor control bus C2, the internal power module 3 is provided by the internal power supply circuit 34 via lines pOWER. 为了确保程序正常运行,而增加了看门狗电路32,看门狗电路32的输入和输出端分别通过控制线C3和复位线R与微处理器MCU3的输出和输出端连接,控制线C3是微处理器MCU3的一根I/O线控制线,控制线C3在程序运行过程中定期产生脉冲,清除看门狗电路32的计数器,使看门狗电路32没有复位信号R输出;如果程序由于意外的情况进入一个死循环,在规定的时间内, 控制线C3没有产生脉冲,看门狗电路32将输出复位信号R,微处理器MCU3 复位使得程序能够重新执行。 To ensure the normal operation of the program, the watchdog circuit 32 is increased, the input and output terminals respectively connected to the watchdog circuit 32 through the control line and the reset line R C3 and the output of MCU3 output of the microprocessor, the control line C3 is MCU3 of a microprocessor I / O control lines, control lines C3 generates a pulse periodically during program execution, a watchdog circuit 32 to clear the counter, watchdog circuit 32 does not output a reset signal R; because if the program unexpected circumstances enters an endless loop, within a predetermined time, the control line C3 is not generated pulses, the watchdog circuit 32 outputs a reset signal R, so that the microprocessor program to reset MCU3 re-executed. 脉冲、遥信模块3内的外围电路33通过8位数据总线Dl和控制总线Cl 与微处理器MCU3连接,微处理器MCU3通过8位数据总线Dl和控制总线Cl对围电路进行控制,外围电路33的数据总线是双向的,可以接收微处理器MCU3发布的数据或向微处理器MCU3提供状态数据,控制总线是单向的,外围电路33的工作性质取决于控制总线的状态。 Pulse, remote module 33 in the peripheral circuit 3 are connected by an 8-bit data bus and a control bus Cl Dl MCU3 and a microprocessor, the microprocessor controls the peripheral circuit to MCU3 through the 8-bit data bus and a control bus Cl Dl, a peripheral circuit 33 is a bidirectional data bus, the microprocessor may receive data published MCU3 or provide status data to the microprocessor MCU3, a unidirectional control bus, a peripheral circuit 33 depends on the nature of the bus state control. 脉冲、遥信模块3中的CAN接口81由CAN控制器811 (型号是SJA1000CAN)和CAN收发器812 (型号是P82C250)组成,CAN控制器811 Pulse, remote CAN interface module 81 in FIG. 3 by the CAN controller 811 (model is SJA1000CAN) and CAN transceiver 812 (model is P82C250) composition, CAN controller 811

是通过8位数据/地址总线AD、片选线CS、地址锁存线ALE、读允许线RE、 写允许线WE和中断允许线INT与微处理器MCU3连接。 By 8-bit data / address bus AD, chip select line CS, address latch line ALE, read enable line RE, a write enable line WE to allow and interrupt line INT is connected to the microprocessor MCU3. CAN控制器811通过数据/地址总线AD可以接收微处理器MCU3命令或数据,CAN控制器811 也可以向微处理器MCU3发送数据;微处理器MCU3通过CS线输出给CAN 控制器811的片选信号;微处理器MCU3通过ALE线输出给CAN控制器811 的地址锁存信号;微处理器MCU3通过RE线输出给CAN控制器811的读允许信号;微处理器MCU3通过WE线输出给CAN控制器811的写允许信号; 当CAN控制器811发送或接收了一帧报文后,CAN控制器811会产生一个中断信号INT给微处理器MCU3,微处理器MCU3执行中断处理程序;微处理器MCU1通过MC线输出给CAN控制器811的写模式显示信号。 CAN controller 811 may receive a command or data MCU3 microprocessor via data / address bus AD, CAN controller 811 may also transmit data to the microprocessor MCU3; MCU3 microprocessor via the CS line 811 is output to the CAN controller chip select signal; MCU3 through the ALE line microprocessor to the CAN controller 811 outputs an address latch signal; CAN microprocessor MCU3 to the read controller 811 allows the output signal line RE; MCU3 outputted to the microprocessor through the CAN control lines WE the write enable signal 811; or when transmitting a packet received cAN controller 811, cAN controller 811 generates an interrupt signal INT MCU3 to the microprocessor, the microprocessor MCU3 interrupt processing; microprocessor MCU1 to the CAN controller 811 outputs a write mode via a display signal line MC. TD信号是CAN控制器811输出发送数据到CAN收发器812的发送信号, RD是从CAN收发器812输出到的CAN控制器811的接收信号。 TD signal is a CAN controller 811 outputs the transmission data to the transmission signal the CAN transceiver 812, RD, the reception signal is output to the CAN controller 811 from the CAN transceiver 812. CAN总线双向传输的差分信号为"CANH"和"CANL",具有很高的抗干扰性。 Differential signal transmission is bidirectional CAN bus "CANH" and "CANL", has a high noise immunity. 当微处理器MCU3写入一帧信息后,再写入发送允许命令后,CAN 控制器811立即发送该帧信息;当CAN控制器811产生一个接收中断后,微处理器MCU3读取CAN控制器811接收缓冲器的内容。 When the microprocessor writes a MCU3 information, and then transmits the write enable command, the controller 811 transmits the CAN frame information immediately; when the CAN controller 811 generates a receive interrupt, the microprocessor reads the CAN controller MCU3 811 receives the contents of the buffer. 请参见图10所示,显示模块5是终端对外提供一个人机交互的界面,可以通过键盘输入指令或由终端显示各类检测或控制数据。 Referring to FIG. 10, the display module 5 is a terminal outside a human-computer interaction interface, or can detect all types of terminal display control data or commands through the keyboard. 显示模块5由微处理器MCU5、由CAN控制器与CAN收发器组成的CAN 接口、外部键盘电路51、外部LED指示灯52、显示器53、看门狗电路54、外围电路55及供给该模块电源的内部电源电路56组成。 The display module 5 by the microprocessor the MCU 5, and the CAN interface to the CAN controller by the CAN transceiver consisting of an external keyboard circuit 51, an external LED indicator 52, a display 53, a watchdog circuit 54, the peripheral circuit 55 and supplies the power supply module the internal power supply circuit 56 composed. 处理器MCU5采用的型号为89C52,显示模块内部各个模块的控制总线和数据总线都是由微处理器MCU5提供。 MCU5 processor uses model 89C52, each module inside the display module control bus and data bus are provided by the microprocessor MCU5. 外部键盘电路51,是采用现有的小键盘,该小键盘由一组24按键组成, 内部为3X8的扫描控制电路,在三根行扫描线和八根列扫描线的交叉处各放置一个按键,扫描到哪个按键按下后,得到该键的功能。 External keyboard circuit 51, is the use of a conventional keypad, the keypad consists of a set of 24 keys, and it internally 3X8 scan control circuit, at the intersection of three scanning line and eight column scanning lines in each place a key, after scanning to which the key is pressed, the function to obtain the key. 外部键盘电路51通过8位数据总线D2和3位列扫描控制线C2与微处理器MCU5的I/O 口接口连接,微处理器MCU5通过单向的数据总线D2从外部键盘电路51读取数据,微处理器MCU5通过列扫描控制线C2向外部键盘电路51单向输出控制信号。 External keyboard circuit 51 / O interface port, the microprocessor reads data from an external keyboard MCU5 circuit 51 through the 8-bit data bus, and D2 3 ranked scan control line C2 with the microprocessor through the I MCU5 unidirectional data bus D2 microprocessor MCU5 external keyboard circuit 51 a control signal is output to a unidirectional scanning by the column control line C2.

外部LED指示灯52,该指示灯52终端包括有6个状态指示灯,分别代表不同的状态。 External LED indicator 52, the indicator 52 comprises six terminal status indicators, each representing a different state. 该6个状态指示灯52分别通过6位宽度的数据总线D4和控制线C4与微处理器MCU5连接,6个状态指示灯52分别通过数据总线D4和控制总线C4单向接收微处理器MCU5的数据。 The six status indicators 52, respectively, through the data bus 6 and control lines D4 width MCU5 C4 connected to the microprocessor, status lights 6 through 52, respectively, C4 D4 unidirectional receiving microprocessor data bus and the control bus MCU5 data. 显示器53采用现有的液晶显示器,液晶显示器的控制显示电路本身包含在显示器内部,所以该类型的显示器具有结构简单,接口连接方便,显示清晰等优点。 Display 53 using a conventional liquid crystal display device, a liquid crystal display of the display control circuit contained within the display itself, so this type of display has a simple structure, easy connection interfaces, display clear advantages. 显示器53通过8位宽度总线D5和控制总线C5(其中包括读写允许线、 片选线、同步线、中断线)与微处理器MCU5连接。 MCU5 display 53 connected to the microprocessor by the bus width of 8 bits and a control bus D5 C5 (including read and write enable lines, chip select lines, synchronization line, interrupt). 显示器53通过数据总线D5单向接收微处理器MCU5的数据,显示器53通过控制总线C5接收微处理器MCU5的控制。 Display 53 by way of data received the microprocessor data bus MCU5 D5, the display 53 is controlled by a microprocessor control bus MCU5 of C5 received. 为了确保程序正常运行,而增加了看门狗电路54,看门狗电路54的输入和输出端分别通过控制线C3和复位线R与微处理器MCU5的输出和输出端连接,控制线C3是微处理器MCU5的一根I/O线控制线,控制线C3在程序运行过程中定期产生脉冲,清除看门狗电路54的计数器,使看门狗电路54没有复位信号R输出;如果程序由于意外的情况进入一个死循环,在规定的时间内, 控制线C3没有产生脉冲,看门狗电路54将输出复位信号R,微处理器MCU5 复位使得程序能够重新执行。 To ensure the normal operation of the program, the watchdog circuit 54 is increased, the input and output terminals respectively connected to the watchdog circuit 54 is output via an output terminal and a control line C3, and reset R MCU5 the microprocessor, the control line C3 is MCU5 of a microprocessor I / O lines control lines, the control line C3 is generated in the course of running a regular pulse, clears the counter of the watchdog circuit 54, watchdog circuit 54 does not output a reset signal R; because if the program unexpected circumstances enters an endless loop, within a predetermined time, the control line C3 is not generated pulses, the watchdog circuit 54 outputs a reset signal R, so that the microprocessor program to reset MCU5 re-executed. 显示模块5内的外围电路55通过8位数据总线Dl和控制总线Cl与微处理器MCU5连接,微处理器MCU5通过8位数据总线Dl和控制总线Cl对围电路55进行控制,外围电路55的数据总线是双向的,可以接收微处理器MCU5 发布的数据或向微处理器MCU5提供状态数据,外围电路55通过控制总线Cl 单向接受微处理器MCU5的控制信号。 A peripheral circuit within the display module 555 is connected by an 8-bit data bus and a control bus Cl and Dl MCU5 microprocessor, the microprocessor on the peripheral circuit MCU5 55 is controlled by the 8-bit data bus and a control bus Dl Cl, peripheral circuits 55 the data bus is bidirectional, data may be received or released MCU5 microprocessor provides status data to the microprocessor MCU5, the peripheral circuit 55 receives a control signal from the microprocessor through the control bus Cl MCU5 way. 显示模块5中的CAN接口81由CAN控制器8H (型号是SJA1000CAN) 和CAN收发器812 (型号是P82C250)组成,CAN控制器811通过8位数据/ 地址总线AD、片选线CS、地址锁存线ALE、读允许线RE、写允许线WE和中断允许线INT与微处理器MCU5连接。 The display module 5 CAN interface 81 by the CAN controller 8H (model is SJA1000CAN) and CAN transceiver 812 (model is P82C250) composition, CAN controller 811 by 8-bit data / address bus AD, chip select line CS, address latch deposit line ALE, read enable line RE, a write enable line WE to allow and interrupt line INT is connected to the microprocessor MCU5. CAN控制器811通过数据/地址总线AD可以接收微处理器MCU5命令或数据,CAN控制器811也可以向微处理器MCU5发送数据;微处理器MCU5通过CS线输出给CAN控制器811的片选信号;微处理器MCU5通过ALE线输出给CAN控制器811的地址锁存信号; 微处理器MCU5通过RE线输出给CAN控制器811的读允许信号;微处理器MCU5通过WE线输出给CAN控制器811的写允许信号;当CAN控制器811 发送或接收了一帧报文后,CAN控制器811会产生一个中断信号INT给微处理器MCU5,微处理器MCU5执行中断处理程序;微处理器MCU1通过MC 线输出给CAN控制器811的写模式显示信号。 CAN controller 811 may receive via data / address bus AD MCU5 microprocessor commands or data, CAN controller 811 may also transmit data to the microprocessor MCU5; MCU5 microprocessor output to the CAN controller 811 via chip select line CS signal; MCU5 by the microprocessor ALE line to the CAN controller 811 outputs an address latch signal; MCU5 microprocessor CAN controller 811 to the read enable signal RE via the output line; MCU5 outputted to the microprocessor through the CAN control lines WE the write enable signal 811; or when transmitting a packet received cAN controller 811, cAN controller 811 generates an interrupt signal INT to the microprocessor MCU5, MCU5 microprocessor interrupt processing; microprocessor MCU1 to the CAN controller 811 outputs a write mode via a display signal line MC. TD信号是CAN控制器811输出发送数据到CAN收发器812的发送信号, RD是从CAN收发器812输出到的CAN控制器811的接收信号。 TD signal is a CAN controller 811 outputs the transmission data to the transmission signal the CAN transceiver 812, RD, the reception signal is output to the CAN controller 811 from the CAN transceiver 812. CAN总线双向传输的差分信号为"CANH"和"CANL",具有很高的抗干扰性。 Differential signal transmission is bidirectional CAN bus "CANH" and "CANL", has a high noise immunity. 当微处理器MCU5写入一帧信息后,再写入发送允许命令后,CAN 控制器811立即发送该帧信息;当CAN控制器811产生一个接收中断后,微处理器MCU5读取CAN控制器811接收缓冲器的内容。 When the microprocessor writes a MCU5 information, and then transmits the write enable command, the controller 811 transmits the CAN frame information immediately; when the CAN controller 811 generates a receive interrupt, the microprocessor reads the CAN controller MCU5 811 receives the contents of the buffer. 请参见图11所示,根据CAN协议的2.0A版本规定,CAN控制器必须有一个ll位的标准格式标志符。 Referring to Figure 11 shown, in accordance with the provisions of the CAN protocol version 2.0A, CAN controller must have a standard format ll-bit identifier. CAN标准帧信息为ll个字节,包括两部分:信息和数据部分。 Ll CAN standard frame information bytes, comprising two parts: the information and the data portion. 前3个字节为信息部分,字节1为帧信息;字节2、 3为报文识别码,11位有效;第6位(RTR)表示帧的类型,RTR=0表示为数据帧, RTR4表示为远程帧;第7位(FF)表示帧格式;在标准帧中,FF==0; DLC 表示在数据帧时实际的数据长度;字节4〜11为数据帧的实际数据,远程帧时无效。 The first three bytes of the information portion, the byte 1 information frames; Byte 2, 3 is a message identifying code 11 is valid; bit 6 (RTR) indicates the type of frame, RTR = 0 is represented as a data frame, RTR4 expressed as a remote frame; bit 7 (FF) represents the frame format; standard frame, FF == 0; DLC represents the actual data length of a data frame; 4~11 actual data bytes in the data frame, remote frame invalid. 请参见图12所示,在2.0B版本中规定,CAN控制器的标志符长度可以是11位或29位。 Referring to FIG. FIG. 12, in a predetermined version 2.0B, CAN controller identifier length may be 11 or 29 bits. 目前,主要推广的CAN独立控制器均支持CAN2.0B协议,即支持29位标识符的扩展格式报文结构。 At present, mainly to promote the independent CAN controllers support CAN2.0B agreement, which is to support the extended format message structure 29 identifiers. CAN2.0B扩展帧信息为13个字节,包括两部分,信息和数据部分。 CAN2.0B extended frame message is 13 bytes, including two parts, the information and a data portion. 前5 个字节为信息部分。 The first five bytes of the information portion. 字节1为帧信息。 1 is a frame information bytes. 第6位(RTR)表示帧的类型,RTR=0 表示为数据帧,10^=1表示为远程帧。 Bit 6 (RTR) indicates the type of frame, RTR = 0 is represented as a data frame, ^ 10 = 1 indicates as a remote frame. 第7位(FF)表示帧格式,在扩展帧中, FF = 1; DLC表示在数据帧时实际数据长度。 Bit 7 (FF) represents the frame format, in the extended frame, FF = 1; DLC represents the actual data length of data frame. 字节2〜5为报文识别码,其高29位有效。 2 ~ 5 bytes for the packet identifier which 29 active high. 字节6〜13为数据帧的实'际数据,远程帧时无效。 Byte real data frame 6~13 'actual data, a remote frame when ineffective. CAN总线的仲裁机制,当总线上有两个节点同时进行发送时,必须通过"无损的逐位仲裁"方法来使有最高优先权的的报文优先发送。 CAN bus arbitration mechanism, when two nodes transmit simultaneously on the bus, it is necessary to make the highest priority of priorities of packets transmitted through the "non-destructive bitwise arbitration" method. 在CAN总线上发送的每一条报文都具有唯一的一个11位或29位数字的ID。 Each packet transmitted on the CAN bus have a unique 11-digit or 29's ID. CAN总线状态取 CAN bus state conditions

决于二进制数而不是'r ,所以id号越小,则该报文拥有越高的优先权。 Instead of depending on the binary number 'r, so the id number is smaller, the higher priority the packet has. 因此一个为全w标志符的报文具有总线上的最高级优先权。 Thus a full flag w packets having the highest priority on the bus. 可用另外的方法来解释:在消息冲突的位置,第一个节点发送0而另外的节点发送1,那么发送0的节点将取得总线的控制权,并且能够成功的发送出它的信息。 Additional methods can be used to interpret: the position of message collision, the first node transmits and the other node sends a 0 1, then the sending node 0 will obtain control of the bus, and is able to successfully transmit its messages. can总线的传输可使用多种物理介质,例如双绞线、光纤等。 Can bus transmission can use a variety of physical media such as twisted pair, optical fiber. 最常用的就是双绞线。 The most common is twisted. 信号使用差分电压传送,两条信号线被称为"canjt和"can—l", 静态时均是2.5v左右,此时状态表示为逻辑"1",也可以叫做"隐性"。用can—h比can—l高表示逻辑"0",称为"显性",此时,通常电压值为: can—h = 3.5v禾B can—l = 1.5v 。请参见图13所示,can总线的总体流程从使用角度大致可以分为:微处理器上电复位、can控制器的复位处理、can控制器的硬件配置、can寄存器初始化、发送can报文,接收can报文和报文的处理。请参见图14所示是can控制器的初始化流程,can控制器清除复位模式请求标志进入工作模式之前,必须先检査标志是否确实被清除,是否进入了工作模式,才能进行下一步的操作,这通过循环读标志来实现。在硬件复位等待期间不能清除复位模式/请求标志,因为这将迫使复位模式/请求标志变成复位/存在,因此这个循环是不断尝试清除标志和检查是 Voltage differential signal transmission, two signal lines are referred to as "canjt and" can-l ", are still about 2.5V when, at this time is represented as a logic state" 1 ", also called" hidden. "Use can higher than can-l -h said logic "0", referred to as "dominant", this case, typically a voltage value:. can-h = 3.5v Wo B can-l = 1.5v Referring to FIG. 13, the overall process can bus from the perspective of use can be divided into: a microprocessor reset, the reset process can control, can control the hardware configuration, register initialization cAN, cAN transmitting packets, and packets received cAN message processing. See Figure 14 is shown in the initialization process can controller, the controller can clear the request flag before entering the reset mode to work mode, you must first check whether the flag is cleared indeed, whether to enter the working mode before the next step the operation, which is achieved by circulating sign read. can not be cleared in reset mode while waiting for hardware reset / request flag, because it will force a reset mode / request flag becomes reset / presence, so this cycle is constantly trying to clear the check mark and are 成功离开复位模式。请参见图15所示是can控制器发送报文的流程图。can报文的传输由can控制器独立完成,can控制器必须将要发送的报文信息写到发送缓冲器, 然后将命令寄存器里的发送请求标志置位。正在发送报文时发送缓冲器被写锁定,发送完成后可由can控制器中断请求,或主程序通过查询发送成功标志位的方式来知道报文的发送结果。请参见图16所示是can控制器接收报文的流程图。can控制器将收到的报文放在接收缓冲器,can控制器中断禁能(这里用査询的方式),主控制器如常读can控制器的状态寄存器,检查接收缓冲状态标志rbs ,看是否收到一个报文,这些标志的定义位于控制段的寄存器。can控制器从得到第一个报文然后,通过置位命令寄存器的相应位发送一个释放接收缓冲器命令,主控制器在检査更多信息报文前,可以处理每个收到的报文 Successful leaving reset mode. See Figure is a flow diagram .can can control packet transmission is done by sending a packet can control independently, can control the message information to be sent must be written as shown in the transmission buffer 15, then the command register to send a request flag. when the transmit buffer is write locked message is being sent, the controller sends an interrupt request can be completed, the main program or by way of sending a query to know the success flag messages transmission result. see Figure is received packets can control flowchart .can controller received packets in the receive buffer, can control the interrupt disabled (polling is used here) shown in FIG. 16, the main controller can control the usual read status register, checks the reception buffer state flag RBS, to see whether it has received a packet, the definition of these flags register .can controller located segment obtained from the first packet and then, by transmitting the corresponding bit register setting command buffer receiving a release command, the main controller before checking for more information packets, each packet received can be processed in ,但也可以通过再次査询接收缓冲器状态位,立即检查更多报文并将在以后一起处理所有收本发明终端的工作原理是:本发明终端的主控模块1通过CAN总线对终端内所有模块的工作进行控制、协调,保存所有模块运行的中间数据,主控模块1通过COM线与通信模块连接,接收通信模块的数据。通信模块6对调度中心Wl接收命令或发送数据。主控模块1在接收到调度中心的命令后,首先分析命令的合法性、安全性和正确性,终端只有在通过第一步的安全性检测后才能进入到第二步,否则终端回给调度中心一个特定的标志,该标志表示命令是一个不安全命令;第二步,主控模块i分析命令的种类如调用终端数据类命令、发布数据类命令等;第三步,动作执行类命令,主控模块l在接收到执行调度中心Wl发布的命令后协调其他模块进行相应的动作。 Works, but can also query the reception buffer status bit again, and immediately checked more packet processing according to the present invention together with the terminal after all recipients are: terminal control module 1 of the present invention by a terminal within the CAN bus All work modules is control, coordinate, all the intermediate data storage module running, the main control module 1 is connected via line COM and the communication module, the communication module receives a data communication module 6 Wl dispatch center receives a command or sending data. master module 1 after receiving the command dispatch center, the first analysis of the legality of command, security and accuracy, only to enter the terminal through the second step after the first step in safety testing, otherwise the terminal back to a dispatch center specific flag, the flag indicating that the command is a command unsafe; the second step, the main control module analyzes the command type i call terminal data as the class command, the command issuance data type; the third step, the operation commands of execution, the master l coordination modules other modules after receiving the command issued by the control center Wl corresponding action. 请参见图17所示,本发明用于控制器局域网进行通信的电能量管理终端的控制方法:步骤1,主控模块通过通信模块与调度中心双向传送数据和命令; 在所述的步骤1中还包括以下步骤,步骤1.1,终端上电后,主控模块中的数据存储器、处理器寄存器,外围设备的寄存器及CAN接口的寄存器初始化;同时各个子板模块也相应进行初始化;步骤1.2,校验参数的正确性,主控模块中校验计算参数区的累加和是否与内存中保留的累加和一致,结果正确,直接进入下个步骤;如果校验结果不正确,则参数和数据初始化为默认值,再进入下个步骤;步骤1.3,开放主控模块的总中断的中断允许位;步骤1.4,主控模块在接收到调度中心的命令后,进行安全性检测,首先分析命令的合法性、安全性和正确性,当监测通不过,不响应调度中心的命令。 Referring to FIG. 17, the present invention is a LAN controller for controlling energy management method of communication terminal: Step 1, the main control module and the control center through the communication module bidirectional transmission of data and commands; in the step 1 further comprising the step, step 1.1, the terminal is powered on, the cAN interface register has been initialized and registers the data in the memory control module, processor registers, the peripheral device; each sub-board modules simultaneously initialized accordingly; step 1.2, the correction the correctness of the test parameters, the accumulation control module checksum calculation parameters and whether the reserved areas accumulated in the memory and consistent results correctly, directly to the next step; if the check result is incorrect, the parameters and data are initialized the default value, then the next step; step 1.3, the total open master interrupt enable bit module; step 1.4, the master module receiving the command dispatch center, safety tests, analyzes the command legitimacy , safety and accuracy, pass the monitoring when the command does not respond to the control center. 步骤1.5,主控模块读时钟,产生秒分时日月标志,并执行每分、每时、 每天、每月的运算及处理任务;步骤1.6,主控模块接收到CAN总线有效通信报文后,对通信报文中接收到的数据按照一定的规约进行处理,并执行相应任务;步骤1.7主控模块有参数处理任务时,根据需要重新计算参数校验和;当程序运行出现异常时,主控模块置事件上报标志。 Step 1.5, the master read clock module generates second time-moon and flag, and executes every minute, every hour, day, month and arithmetic processing task; Step 1.6, the main control module after receiving a valid communication message CAN bus , the data communication message is received according to a certain protocol processing, and perform a corresponding task; master module in step 1.7 processing task parameters, the checksum is recalculated as required and parameters; abnormal when the program is run, the main control module sets the event report flag. 步骤2,进入主循环程序,主控模块在接收到执行调度中心发布的命令后,分析命令、调用数据类命令、发布数据类命令,通过CAN总线控制并接在CAN 总线上的各功能模块进行相应的动作。 Step 2, the program enters the main loop, the main control module after receiving the command issued by the control center, analyzes the command, call command data type, data class release order, and connected to the CAN bus the functional modules via the CAN bus control corresponding action. 步骤3,各功能模块接收主控模块命令进行相应的功能运行,如采集外部各电表的电量、读取电能量数据、读取开关量的变化时间,通过CAN总线与主控模块通信,并显示电能量管理中的各项数据。 Step 3, the functional module receives a command control module for operating corresponding function, such as acquisition of each external power meter reading of electric energy data, the amount of change in time of the read switch, CAN bus master via the communication module, and a display the electric energy data management. 在所述的步骤3中还包括以下步骤:步骤3.1,抄表模块接收主控模块命令,将采集到外部的电能表各种电能量数据通过CAN总线发送到主控模块;步骤3.2,脉冲模块接收主控模块命令,读取外部设备的开关量数据和电能表的电能量脉冲输出数据后,通过CAN总线发送到主控模块;步骤3.3,遥信模块通过CAN总线接收主控模块命令,读取开关量的变位时间,并进行记录,通过CAN总线发送到主控模块;步骤3.4,显示模块通过CAN总线接收主控模块命令,控制状态指示灯的显示状态,与键盘交换信息;并将处理后的电能量数据显示在显示器上。 In the step 3 further comprises the following steps: Step 3.1, meter reading module receives a command control module, the collected energy meter to an external electrical energy various data transmitted through the CAN bus to the master module; step 3.2, the pulse module receiving a command control module, the electrical energy pulse outputs the data reading device of the external switch and meter data, and transmits to the master module via CAN bus; step 3.3, remote modules via the CAN bus master module receiving commands, read switch displacement takes time, and recorded, transmitted to the master module via CAN bus; step 3.4, the display module through the CAN bus master module receiving the command, the status indicator displays the control state, the exchange of information with the keyboard; and electrical energy processed data displayed on the display. 当电网中某一区域电力故障排除,由调度中心发出合闸信号,终端记录开关合闸的时间。 When a regional power grid troubleshooting, close signal sent by the control center, the terminal records the time of closing the switch. 综上所述,本发明用控制器局域网连接终端设备中各功能模块,它能实现模块间的高速,多主,实时,抗干扰,高可靠的数据通信,并能有效提高电能量管理方法的科学性和正确性。 In summary, the present invention is a terminal device connected to the controller area network various functional modules, between modules capable of high-speed, multi-master, in real time, interference, high reliable data communication, and can effectively improve the energy management approach scientific and correct.

Claims (7)

  1. 1. 一种用控制器局域网进行内部通信的电能量管理终端,包括主控模块、若干个功能模块及与各模块连接的局域网,其特征在于:所述的局域网是控制器局域网,该控制器局域网由若干个CAN接口并接在电缆上组成;在所述的CAN接口中至少包括一对CAN接口,其中一CAN接口与主控模块连接,另一CAN接口与所述若干个功能模块中任一功能模块连接,通过控制器局域网主控模块与功能模块之间双向传送数据,所述的功能模块包括抄表模块、脉冲模块、遥信模块、显示模块、通信模块;所述的显示模块由微处理器MCU5、外部键盘电路、外部LED指示灯、显示器、看门狗电路、外围电路及供给该模块电源的内部电源电路组成;微处理器MCU5通过数据总线和控制信号线与CAN控制器连接;微处理器MCU5通过数据总线D2、列扫描控制线C2与外部键盘电路连接;微处理器MCU5通 1. A method of energy management by a controller area network internal communication terminal, comprising a main module, several modules and each module is connected to the LAN, wherein: said LAN is a LAN controller, the controller and connected to the LAN cable consist of several CAN interfaces; CAN interface comprises at least a pair of said CAN interface, wherein a control module is connected with the CAN interface, the other with the CAN interface to any number of functional modules connecting a functional module, bi-directional transmission of data between a controller area network module and the main control functional module, said functional module comprises a meter module, a pulse module, remote module, display module, a communication module; according to the display module MCU5 microprocessor, circuitry external keyboard, an external LED indicators, displays, watchdog circuit, a peripheral circuit and an internal power supply circuit composition of the power module; MCU5 microprocessor via a data bus and a control signal line and the CAN controller ; MCU5 microprocessor, column scanning control line C2 is connected to an external circuit through the data bus D2 of the keyboard; MCU5 through microprocessor 数据总线D4和控制线C4与外部LED指示灯连接;微处理器MCU5通过数据总线D5、控制总线C5与显示器连接;微处理器MCU5通过控制线C3和复位线R与看门狗电路连接;微处理器MCU5通过数据总线D1和控制总线C1与外围电路连接;所述的显示模块与由CAN控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 A data bus, and control lines D4 C4 is connected to an external LED indicators; MCU5 microprocessor through a data bus D5, C5 connected to the display control bus; MCU5 microprocessor is connected via a control line C3 and the reset line R and the watchdog circuit; Micro MCU5 processor via a data bus and a control bus C1 and D1 peripheral circuit; between the display module connected with the CAN interface CAN controller and a CAN transceiver composition, CAN controller and a CAN transceiver through the receiving signal line and a transmission signal line; differential signal terminal CAN transceiver and a controller connected to the LAN cable.
  2. 2. 根据权利要求1所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的抄表模块、脉冲模块、遥信模块、显示模块分别与各CAN接口连接,通过各CAN接口并接在控制器局域网的电缆上;所述的通信模块与主控模块连接,主控模块通过通信模块与调度中心通信,双向发送数据; 抄表模块通过电缆线与电网中电能表双向连接,读取外部各电能表的电能量数据;脉冲模块通过导线与外部开关量设备连接;遥信模块通过导线与外部设备开关量连接;电源模块与各模块连接,提供电源。 According to claim 1, said controller area network for energy management of the internal communication terminal, wherein: the meter reading module, a pulse module, remote module, the display module interfaces are connected to each CAN, by each CAN interface and the cable connected to the controller area network; said main control module and a communication module connected to the main control module through the communication module communication with the control center, two-way data transmission; meter reading module with cables grid meter bidirectional connection, reads data from an external electrical energy of each energy meter; pulse module is connected by wires to the external digital equipment; remote communication module is connected with an external device via a wire switch; each module is connected with the power module supplies power.
  3. 3. 根据权利要求1所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的主控模块包括:微处理器MCU1、外部数据存储器、 外部程序存储器、串行口、看门狗电路、外围电路;微处理器MCU1通过数据总线和控制信号线分别与CAN控制器、外部数据存储器、外部程序存储器、串行口、看门狗电路、外围电路双向连接;所述的微处理器MCU1与由CAN 控制器与CAN收发器组成的CAN接口连接,CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上;串行口与通信模块连接。 The Controller Area Network with claim 1, for the energy management of the internal communication terminal, wherein: said control module comprising: a microprocessor the MCU1, the external data memory, external program memory, a serial port , watchdog circuit, a peripheral circuit; CAN controller microprocessor MCU1 respectively, external data memory, external program memory, a serial port, watchdog circuit, a peripheral circuit connected via a bidirectional data bus and control signal lines; the a microprocessor connected to the interface CAN MCU1 by a CAN controller and a CAN transceiver composition, between CAN controller and a CAN transceiver line are connected by a reception signal and the transmission signal line; CAN transceiver differential signal terminal connected to the control and LAN cable device; and a communication module connected to the serial port.
  4. 4. 根据权利要求2所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的抄表模块包括微处理器MCU2、信号输入调理电路、 第一串行口(22)、第二串行口(23)、看门狗电路、外围电路;微处理器MCU2通过数据总线和控制信号线分别与CAN控制器、第一串行口(22)、 第二串行口(23)、看门狗电路、外围电路双向连接;所述的抄表模块与由CAN 控制器与CAN收发器组成的CAN接口连接;CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 The Controller Area Network with claim 2, for the energy management of the internal communication terminal, wherein: the meter reading module includes a microprocessor the MCU2, input signal conditioning circuits, a first serial port (22 ), a second serial port (23), watchdog circuit, a peripheral circuit; MCU2 microprocessor through a data bus and control signal lines respectively CAN controller, a first serial port (22), a second serial port (23), watchdog circuit, a peripheral circuit connected to bidirectional; the CAN interface module is connected to the meter by a CAN controller and a CAN transceiver thereof; and between CAN controller and a CAN transceiver transmitted through the reception signal line a signal line; differential signal terminal CAN transceiver and a controller connected to the LAN cable.
  5. 5. 根据权利要求2所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的脉冲模块和遥信模块包括微处理器MCU3、模块专用电路、看门狗电路、外围电路;微处理器MCU3通过数据总线和控制信号线分别与CAN控制器、模块专用电路、看门狗电路及外围电路双向连接;所述的脉冲模块和遥信模块与由CAN控制器与CAN收发器组成的CAN接口连接, CAN控制器与CAN收发器之间通过接收信号线和发送信号线连接;CAN收发器的差分信号端并接在控制器局域网的电缆上。 The controller according to claim 2, said LAN for energy management of the internal communication terminal, wherein: said pulse module and a remote communication module comprises a microprocessor the MCU3, modules dedicated circuit, watchdog circuit, a peripheral circuit; MCU3 microprocessor are connected through a bidirectional data bus and control signal lines CAN controller, modules dedicated circuit, watchdog circuit and the external circuit; said pulse module and a remote communication module by the CAN controller and CAN CAN transceiver interface component, and a receiving signal line are connected by signal lines between the transmitting CAN controller and a CAN transceiver; differential signal terminal CAN transceiver and a controller connected to the LAN cable.
  6. 6、 根据权利要求1所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的控制器局域网的电缆上扩展并接若干个CAN接口, 该若干个CAN接口分别连接各功能模块。 6, a controller area network according to claim 1 for the energy management of the internal communication terminal, comprising: a plurality of extension and connected to said CAN interface cable to the network controller, the plurality of interfaces are connected to CAN each functional module.
  7. 7、 根据权利要求1所述的用控制器局域网进行内部通信的电能量管理终端,其特征在于:所述的CAN接口由微处理器与CAN收发器组成;微处理器与CAN收发器之间通过接收信号线和发送信号线连接,并双向传送数据;微处理器通过数据总线和控制信号线分别与各功能模块连接,并双向传送数据和控制信号;CAN收发器的差分信号端并接在控制器局域网的电缆上,通过控制器局域网双向传输差分信号。 7, a controller area network according to claim 1 for the energy management of the internal communication terminal, wherein: said microprocessor and a CAN interface CAN transceiver composition; between the microprocessor and the CAN transceiver signal line and a signal line by receiving the transmission, and bi-directional transmission of data; the microprocessor through a data bus and control signal lines are connected to each function module, and bidirectional transmission of data and control signals; CAN differential signal terminal connected to the transceiver and LAN cable controller, the controller through a local area network bidirectional differential signaling.
CN 200510024633 2005-03-25 2005-03-25 Electric energy management terminal using controller LAN to implement internal communication and control method thereof CN100471006C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510024633 CN100471006C (en) 2005-03-25 2005-03-25 Electric energy management terminal using controller LAN to implement internal communication and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510024633 CN100471006C (en) 2005-03-25 2005-03-25 Electric energy management terminal using controller LAN to implement internal communication and control method thereof

Publications (2)

Publication Number Publication Date
CN1838505A true CN1838505A (en) 2006-09-27
CN100471006C true CN100471006C (en) 2009-03-18

Family

ID=37015795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510024633 CN100471006C (en) 2005-03-25 2005-03-25 Electric energy management terminal using controller LAN to implement internal communication and control method thereof

Country Status (1)

Country Link
CN (1) CN100471006C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7952289B2 (en) * 2007-12-21 2011-05-31 Nordson Corporation UV lamp system and associated method with improved magnetron control
CN101789628B (en) 2010-01-08 2014-04-16 苏州太谷能源管理股份有限公司 Enterprise electrical energy-saving management system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301099A (en) 2001-02-15 2001-06-27 北京哈德威四方保护与控制设备有限公司 Communication method for internal transmission network of measuring and control equipoment
US20030095367A1 (en) 2001-02-08 2003-05-22 Mircea Mares Electric load management center
US20030200017A1 (en) 2002-04-23 2003-10-23 Capps Rick W. Method and handling apparatus for a vehicular electrical system
CN1479503A (en) 2003-07-25 2004-03-03 清华大学 Local network bus type optical fiber network fiber network failure wave recording and data collecting system with multi-controller
CN1481062A (en) 2003-07-25 2004-03-10 清华大学 Layered distributed monitoring system with chain type static synchronous compensator
CN1564424A (en) 2004-03-22 2005-01-12 张学斌 Watt controlling and metering device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030095367A1 (en) 2001-02-08 2003-05-22 Mircea Mares Electric load management center
CN1301099A (en) 2001-02-15 2001-06-27 北京哈德威四方保护与控制设备有限公司 Communication method for internal transmission network of measuring and control equipoment
US20030200017A1 (en) 2002-04-23 2003-10-23 Capps Rick W. Method and handling apparatus for a vehicular electrical system
CN1479503A (en) 2003-07-25 2004-03-03 清华大学 Local network bus type optical fiber network fiber network failure wave recording and data collecting system with multi-controller
CN1481062A (en) 2003-07-25 2004-03-10 清华大学 Layered distributed monitoring system with chain type static synchronous compensator
CN1564424A (en) 2004-03-22 2005-01-12 张学斌 Watt controlling and metering device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于CAN总线的电力远程监测系统研究. 杨宇祥.湖南大学硕士毕业论文. 2002
基于PC104的电能数据综合采集系统. 高莹,杨和洲.华东电力,第12期. 2003
无线智能表抄表终端. 叶毅,刘宇怀.电子技术,第6期. 2003

Also Published As

Publication number Publication date Type
CN1838505A (en) 2006-09-27 application

Similar Documents

Publication Publication Date Title
EP0196911B1 (en) Local area networks
US5754780A (en) Apparatus and method for performing serial communication between master and slave devices
US4441162A (en) Local network interface with control processor & DMA controller for coupling data processing stations to common serial communications medium
CN1562654A (en) Method for calibrating controller of electric automobile in mixing motive power based on CCP protocol
CN101399654A (en) Serial communication method and apparatus
CN101976074A (en) Industrial control system based on field bus and control network
CN201174706Y (en) Ethernet serial power converter based on FPGA technique
CN1671141A (en) Multi-host communication system
CN101685301A (en) Embedded type state monitoring information adaptor capable of operating under complex working conditions of numerically-controlled machine tool and method thereof
CN101163075A (en) Method of implementing embedded device address installation by RS 485 bus competition
CN101201620A (en) Built-in controller based on 802.11 wireless network protocol
CN101355482A (en) Equipment, method and system for implementing identification of embedded device address sequence
CN101055228A (en) K line based electric-control motor fault diagnosis system
CN101060457A (en) Optical fiber-based high speed serial industrial real-time communication bus system and its control method
CN101656549A (en) Monitoring system and method of power source of parallel-connection type station
CN1888994A (en) Multi-serial bus passive real panel
CN201044455Y (en) TCN motorcycle network control test fixture
CN1877209A (en) Commercial air conditioner management system and control method thereof
CN201583945U (en) Serial communication system for multiple singlechips based on FPGA
CN202150045U (en) Central control system based on Internet of Things
CN101309193A (en) USB-Flexray bus adapter based on micro-processor
EP1014273A2 (en) Method of start/stop synchronous data transmission
CN102857397A (en) Multi-master asynchronous duplex differential bus and communication method
CN201707604U (en) Rapid analog quantity/switching quantity record testing device
CN101119267A (en) CAN bus based signal real-time processing method

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted