[go: up one dir, main page]

CN1280754C - Embedded networked remote input and output system - Google Patents

Embedded networked remote input and output system Download PDF

Info

Publication number
CN1280754C
CN1280754C CN03135038.0A CN03135038A CN1280754C CN 1280754 C CN1280754 C CN 1280754C CN 03135038 A CN03135038 A CN 03135038A CN 1280754 C CN1280754 C CN 1280754C
Authority
CN
China
Prior art keywords
module
data
netweb
program
chip microcomputer
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN03135038.0A
Other languages
Chinese (zh)
Other versions
CN1604066A (en
Inventor
于海斌
王宏
张彦武
林跃
杨铁
王兴旭
石刚
李正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Institute of Automation of CAS
Original Assignee
Shenyang Institute of Automation of CAS
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
Application filed by Shenyang Institute of Automation of CAS filed Critical Shenyang Institute of Automation of CAS
Priority to CN03135038.0A priority Critical patent/CN1280754C/en
Publication of CN1604066A publication Critical patent/CN1604066A/en
Application granted granted Critical
Publication of CN1280754C publication Critical patent/CN1280754C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Selective Calling Equipment (AREA)

Abstract

本发明公开一种嵌入式网络化远程输入输出系统,它是一个具有以太网接口的分布式输入输出系统,主要应用于工业自动化控制领域,由NETWEB模块、I/O模块及控制程序模块组成,NETWEB模块负责网络传输、网络监控,及通过RS-485接口对现场数据进行采集、处理,控制I/O模块;I/O模块完成现场信号的采集和对现场的设备进行控制;控制程序模块存储于NETWEB模块中的程序存储器里。用户可以根据需求构成一个从几点到几百点的可大可小的远程监测/监控系统。该系统是一个分布式I/O系统,依靠WEB浏览器便可以实现监测、控制功能,其实时性能、网络性能、可靠性能是其他系统难以比拟的。

Figure 03135038

The present invention discloses an embedded network remote input and output system, which is a distributed input and output system with an Ethernet interface, mainly used in the field of industrial automation control, and is composed of a NETWEB module, an I/O module and a control program module. The NETWEB module is responsible for network transmission, network monitoring, and collecting and processing field data through an RS-485 interface, and controlling the I/O module; the I/O module completes the collection of field signals and controls the field equipment; the control program module is stored in the program memory in the NETWEB module. Users can form a remote monitoring/monitoring system that can be large or small from a few points to hundreds of points according to their needs. The system is a distributed I/O system, which can realize monitoring and control functions by relying on a WEB browser, and its real-time performance, network performance, and reliability performance are difficult to match by other systems.

Figure 03135038

Description

The embedded type networking RIOS
Technical field
The present invention relates to automation field, specifically a kind of embedded type networking RIOS.This system connects with the computer realization on the network of strange land is long-range by the means of 32 chip microcontroller Internet network communication; Be connected with on-the-spot I/O module by the RS-485 interface, finish monitoring, monitoring, diagnosis and the maintenance of equipment, and, finally realize the maintenance and the fault eliminating of equipment by computer networking technology.
Background technology
Along with Internet use universal day by day, the degree of information sharing improves constantly.It is the center that traditional Internet uses with PC, and current Internet uses and will turn to the embedded device is the center.For the low profile edge equipment that with the scm application system is the center, what use is made of easily the Internet resource with the information sharing of embedded device to Internet, become the emphasis of current electronic product exploitation.The popular Internet of showing of IA (Internet Appliance) notion uses and has entered the embedded Internet epoch.According to digerait's prediction, in the future on Internet in the information transmitted, will there be 70% information to come from the low profile edge system.
Wherein, utilize the technological difficulties of chip microcontroller embedded Internet scheme to be: 1, how to utilize the singlechip Limited resources that information is carried out ICP/IP protocol and handle, make it to become the IP packet that can on Internet, transmit.2, in single-chip microcomputer, move real-time kernel.From solving this technical matters, following several scheme is arranged at present:
1.Gateway+ private: adopt dedicated network (as RS-232, RS-485, CAN Bus etc.) a small quantities of single-chip microcomputer is linked together, and then with on this dedicated Internet access to one PC, this PC is the ICP/IP protocol packet as gateway with the information translation on the dedicated network, is dealt into online realization information sharing then.This scheme can connect multiple single-chip microcomputer.Shortcoming: a. need rely on PC and carry out protocol conversion as gateway, under the situation that a plurality of Single Chip Microcomputer (SCM) system are disperseed, and very inconvenience of dedicated network wiring; B. special protocol conversion software need be installed on PC, this software is provided by special third party software merchant usually, and expense is higher.
2.32 position MCU+RTOS: adopt 32 high-grade single-chip microcomputer, on the platform of RTOS (real-time multi-task operating system), carry out software development, in embedded system, realize the protocol processes of TCP/IP.Because adopt high-grade single-chip microcomputer, this scheme can be finished the function of a lot of complexity.But there is following shortcoming in this scheme: needs are bought or are selected for use free RTOS to develop software, and developer's development ability is had relatively high expectations.
3.Scenix MCU+ virtual software bag (network and singlechip computer): 8 single-chip microcomputers that adopt Scenix company to provide can be realized the Internet access function.Because this single-chip microcomputer is the fastest in the world so far single-chip microcomputer (100,000,000 instructions of per second), can realize real-time multi-task operation (timeslice poll).When carrying out data acquisition and control function, MCU, sends on the Internet packing data.This scheme has following advantage: a. and does not rely on PC or high-grade single-chip microcomputer, realizes that really 8 bit single-chip systems directly insert Internet, and total system is self-sufficient fully; B. use peripheral components few, system cost is low; C. be used for the software module that Internet handles because Scenix company provides free, the construction cycle is shortened greatly, cost of development reduces greatly.Shortcoming: peripheral resource is few, is not the real time operating system of formula of taking the lead.
Summary of the invention
For the high cost that overcomes PC, 8 or 16 machine peripheral resources few, difficulty on the operation real-time kernel, the purpose of this invention is to provide a kind ofly do not rely on PC, low, the easy popularization of expense, use flexibly, be easy to safeguard, peripheral resource is abundant, adopts the networked RIOS of the formula real time operating system of taking the lead.
To achieve these goals, concrete technical scheme of the present invention is as follows:
This system is made up of three parts: NETWEB module, I/O module and control program module, wherein:
NETWEB module operation Internet network protocol stack, by RS-845 bus management I/O module, finish distributed I/O control, also by transceive data between Network Transmission part and the Ethernet, realize the Network Transmission of data and field apparatus is carried out remote monitoring, data acquisition by the Internet network;
Control program is stored in the program storage in the NETWEB module;
The I/O module is by RS-485 bus and NETWEB module communication, and each input/output function module is finished collection, the conversion of on-site signal, and the field control object is implemented control.
The NETWEB module comprises:
-the first single-chip microcomputer;
-dynamic data storage device, the control program of first single-chip microcomputer operation in the storage NETWEB module is also stored the field data of described I/O module collection, on-the-spot status information and temporal information;
-non-volatile data memory is mainly deposited the past mask of communication baud rate, IP address, son, gateway, I/O model block configuration information parameter into the NETWEB module settings; When powering on, system reads by first single-chip microcomputer;
-program storage (FLASH), be used for scheduler program, procotol TCP (UDP)/IP, each function control program module and the RS-485 interface communication protocol that the deposit operation system kernel provides, and, link to each other with the I/O module through the RS-485 interface by RS-485 communication module program in first single-chip microcomputer operation control program module;
-clock, for the NETWEB module provides temporal information, after the outage of NETWEB module, independently-powered by battery;
-Physical layer really is connected with first single-chip microcomputer, is used for finishing the ground floor part in the TCP/IP procotol;
-RS-485 bus, connect NETWEB module and each I/O module, the initiation parameter of I/O module and the field data of collection are sent to the dynamic data storage device and the non-volatile data memory of NETWEB module by this bus, by this interface, main main website finishes identification, the data communication operation of I/O module.
The physical interface that the NETWEB module provides network to connect can be following a kind of mode or its array mode: the one, and by surpassing five class unshielded twisted pairs, drive the Ethernet interface of forming by the 10M/100M networked physics layer and be connected on the Ethernet (Internet) through RJ45 interface access network based on ethernet mode; The 2nd, by the phone access way of modulator-demodular unit, and be connected with modulator-demodular unit by RS-232 interface, again through RJ11 interface and telephone line access network based on ethernet, carry out remote transmission data, monitoring, the modulator-demodular unit access function is the optional function of equipment, in go back the working procedure functional module, with Ethernet interface, RS-485 interface and RS-232 interface both-way communication.
Described NETWEB module both can be used as the access device at Ethernet scene, also can be used as the main equipment of RS-485 communication, first single-chip microcomputer is encoded to the data that send by its inner integrated media access controller (MAC), can automatically utilize media access controller to carry out frame check to receiving data simultaneously in receiving data procedures.
The described described I/O module of dynamically being controlled, being managed by NETWEB module maximum can be 32~256, mainly comprises: analog quantity load module, analog output module, switching input module, switching value output module, width modulation output module etc.
Analog quantity load module AI is made up of second singlechip, first A/D converter, multi-way switch converter and first photoisolator, second singlechip is selected the input measured signal by dc-dc converter, signal is through A/D converter, deliver to second singlechip, by RS-485 interface and NETWEB module communication, between first modulus/converter and second singlechip, be provided with first photoisolator again;
Analog output module mainly is made up of the 3rd single-chip microcomputer, the first~two D/A and second photoisolator, the 3rd single-chip microcomputer input signal is from the NETWEB module, its output signal is delivered to the first~two D/A through second photoisolator, and the first~two A/D converter output signal is delivered to peripheral control unit;
Switching input module mainly is made up of the 4th single-chip microcomputer and the 3rd photoisolator, extraneous various switching signals are the photoisolator input signal, the 3rd photoisolator output signal is delivered to the 4th single-chip microcomputer, the 4th single-chip microcomputer will be imported data and send the NETWEB module to through RS-485 interface and NETWEB module communication;
The switching value output module mainly is made up of Darlington driver, the 5th single-chip microcomputer and the 4th photoisolator, the 5th single-chip microcomputer is through RS-485 interface and NETWEB module communication, the input signal that communication information is, to the Darlington driver, the Darlington driver output signal divides eight the tunnel extremely to control on-the-spot through relay to output terminal through the 4th photoisolator.
The I/O module comprises the analog quantity load module, analog output module, the switching value output module, each module in the switching input module all comprises a configuration information storer, link to each other with single-chip microcomputer, the RS-485 interface mode that is connected the employing standard with the NETWEB module, chip for driving difference according to the RS-485 interface of selecting for use, can connect 256 I/O modules at most, the NETWEB module can be discerned the I/O type of module automatically, the I/O inside modules can be carried out the linearization and the range conversion of data according to NETWEB modules configured information, the storage configuration info is finished collection and conversion to on-site signal.
Software function module (control program) comprising:
1, device configuration module
The device configuration module provides the customization function of system of the present invention, this module is in conjunction with the field apparatus I/O variable of reality connection and the specific requirement of user's remote service, be provided with by the configuration parameters of standard browser, simultaneously user's configuration information offered other all software modules uses of internal system system of the present invention; The function of its specific implementation is as follows:
The IP address configuration of system of the present invention;
The identification of I/O module and configuration feature, can discern the I/O module type (as analog quantity load module (AI), analog output module (AO), switching value output module (DO), switching input module (DI)) of connection automatically, the parameter configuration such as range, engineering unit, bound of I/O parameter is provided simultaneously;
The configuration of equipment alarm informing function, the functions such as e-mail address that provide User Alarms to notify;
The remote data configuration that passes a parameter can be disposed the mode (regularly, pressing fixed qty transmission etc.) that needs the I/O of teletransmission parameter, transmission, the address of remote server etc.;
The configuration info of storage configuration info and upload/download I/O module;
The configuration of I/O module RS-485 bus parameter, data collection rate, RS-485 messaging parameter etc.;
MODEM data communication parameter configuration is as baud rate, remote service center telephone number etc.
Idiographic flow is: read parameter after the system start-up and create the configuration info district from non-volatile data memory, enter configuration status, select by user's operation then, as what select is the systematic parameter configuration, judges that then whether canned data is to deposit non-volatile data memory in, as deposit non-volatile data memory in, then revise the configuration change flag, revise the configuration info district, configuration info deposits non-volatile data memory in, termination routine; As not being to deposit under the situation of non-volatile data memory termination routine in; As what select is refreshing a device tabulation in NETWEB module first single-chip microcomputer, then earlier by RS-485 communication module and slave communication, carry out equipment I/O parameter configuration again, when configuration is finished, judge whether to store information in the non-volatile data memory, in this way, then revise the configuration change flag, revise the configuration info district, configuration info deposits non-volatile data memory in, not to deposit under the situation of non-volatile data memory termination routine in.
2, data acquisition/memory module
Data acquisition/memory module provides on-site data gathering and history data store function, this module is by the RS-485 communication module, read the field data information of gathering by the I/O module, for other modules provide on-the-spot real time data, this module can provide the short-term history data storage function simultaneously, for the timed sending and the historical playback of data provides data message; Its concrete function is:
The field data timing acquiring refreshes the real time data district;
The collection site data, store historical data.
Idiographic flow is: the beginning back is made as dynamic data storage device memory block read-write sign by first single-chip microcomputer and writes, and judges whether NETWEB module, data transmission module run through, and do not run through as program module, rejudge it and can read sign again; As run through, then filtering data is stored in the dynamic data storage device, the data of dynamic data storage device are arranged from high to low according to timestamp, the formation head is a real time data, all be historical data then, be made as dynamic data storage device memory block read-write sign readable, allow NETWEB module, data transmission module program from the memory block read data, be provided with again NETWEB module, data transmission module program can read be masked as readable, make NETWEB module, data transmission module program can read dynamic data storage device data, finish at last.
3, data diagnosis alarm module
The effect of data diagnosis alarm module is the alarm configuration information that provides according to the user, detects the abnormal alarm of I/O data, and the historical storage of warning message is provided simultaneously, notifies the managerial personnel of appointment by the mode of Email; Its concrete function is:
The field data alert if detects;
I/O module detection of power loss is reported to the police;
The historical storage of warning message;
The mail notification function of reporting to the police.
Idiographic flow is: start back first single-chip microcomputer and wait for alert notice, Deng then not returning the wait alert notice, Deng then, the readable mark of program is changed to be read, judge whether dynamic data storage device alert data district is readable, condition does not satisfy (not readable), continue to judge, condition satisfies (readable) and then duplicates alert data to dynamic data storage device data field, and send e-mails according to configuration info, then the readable mark of this program is made as to read and finishes, withdraw from this program module, otherwise return, wait for alert notice.
4, data transmitting module
Data transmitting module utilizes Ethernet or telephone line that the data at scene are sent to remote service center according to the information of user configuration, and its function is:
The timing of data or according to the long-range sending function of user's request;
Data compression function.
Idiographic flow is: start back first single-chip microcomputer and wait for that dynamic data storage device data storage area is readable, the readable mark of program is for reading, packing data when condition satisfies, call the NETWEB module, set up long-range connection, readable mark is made as to read finishes, send packing data again, carrying out delay operation, judge whether to withdraw from this program, is then to finish; As not withdrawing from this program, can wait for again that dynamic data storage device data storage area is readable, the readable mark of program is for reading; When condition does not satisfy, return and wait for that again dynamic data storage device data storage area is readable, the readable mark of program is for reading.
5, WEB release module
The WEB release module provides embedded type WEB data issuing function, makes the user use standard browser can visit the on-the-spot real-time/historical data and the warning message of query facility, provides the corresponding equipment disposition function by the WEB server simultaneously; Specifically:
Cipher protection function is provided, guarantees the security of equipment;
The real-time Presentation Function (preferably finishing graphic interface) of field apparatus is provided;
Historical data, the warning message query function of field apparatus are provided;
Customization webpage upload function is provided, and the upload function that the webpage of user oneself exploitation can provide by this module is loaded in the embedded device;
The configuration function webpage of field apparatus is provided.
Idiographic flow is: at first NETWEB starts Web service, receives user's input, and it is readable that first single-chip microcomputer waits for that the memory block sign is made as, and can read and be masked as readablely, returns judgement when condition does not satisfy; When satisfying, condition judges whether it is real time data again, be that real time data then outputs to real time data in the dynamic data storage device on the webpage, otherwise dynamic data storage device historical data is outputed on the webpage, be made as to read and finish can read sign then, judge whether to withdraw from Web service at last, be then to finish, receive user's input otherwise return.
6, RS-485 communication module
The RS-485 communication module provides the data access passage of system of the present invention and its I/O intermodule, finishes the management and the reading and writing data function of I/O module.
Management information such as I/O type of module, address are provided;
The read-write capability of field equipment data is provided;
The configuration info read-write capability of I/O module is provided.
It is two parts that idiographic flow divides NETWEB module communication flow process and I/O module interrupt response flow process, wherein NETWEB module communication flow process is: carry out the RS-485 interface driving function that is stored in the dynamic data storage device in the porch, send the address to the I/O module, reply as slave, then first single-chip microcomputer sends command word, otherwise retry (retry greater than 3 processing that go offline, otherwise send the address once more); Judge that the slave data upload denys to upload and then send out the upload command word, otherwise give the biography command word after sending command word; Receive from machine data after sending out the upload command word, return when receiving successfully, when unsuccessful, receive again from machine data; Giving and passing order is to send host data or command word to slave, returns when sending successfully, when getting nowhere, resends from machine data.Described I/O module interrupt response flow process: interrupting inlet I/O module reception data, judge it is address command or data command then, be that address command judges whether it is this machine address again, when being this machine address, the I/O module is sent out answer signal and is given first single-chip microcomputer, communication position SM2 puts 0, recovers on-the-spot, interrupts returning; When not being this machine address, directly recovering on-the-spot, interrupt returning; The data command word judges whether it is the upload command word more in this way, and upload command word in this way sends data that slave gathers to first single-chip microcomputer by the I/O module, makes SM2 put 1, recovers on-the-spot, interrupts returning; As not being the upload command word, carry out control command by the I/O module, SM2 puts 1, recovers on-the-spot, interrupts returning.
The present invention has following advantage:
1. be widely used.Can be applied to the automation control area of industries such as machine-building, oil, chemical industry, petrochemical industry, pharmacy, metallurgy, mining, electric power, food processing, the energy, fire-fighting, bank monitoring.
2. have the decentralised control characteristics.The present invention has discarded I/O unit and the control station of DCS, and the I/O function of the control function of DCS control station and DCS is distributed to field apparatus on the RS-485 bus, has realized decentralised control completely, has embodied the high dispersion of system architecture.
3. has the robotization integration capability.The closed system that the present invention has broken through in the DCS system by dedicated network adopts man-to-man equipment line, connect respectively by control loop and to realize the drawback that caused, become based on sealing, special-purpose solution based on come into the open, standardized solution.Adopt native system, can place field apparatus to the control module, the input/output module that are in the pulpit in the former DCS system, be convenient to the automation equipment of standard is linked to be system by the RS-485 bus, realized the various functions of comprehensive automation.
4. the present invention has the dirigibility of use.Intermodule adopts the RS-485 interface, and the user is easy to the needs according to oneself, builds the control system of oneself; Simultaneously, the I/O module adopts the input/output signal of standard, also is easy to be connected with on-the-spot sensor, to the monitoring of tools at scene.
5. the intellectuality and the function autonomy that have field apparatus.The present invention with sensing measurement, compensation calculate, quantities is handled with functions such as control is distributed to and finishes in the field apparatus, only depends on field apparatus just can finish the basic function of automatic control, and the running status of diagnostic device at any time.
6. has good mobility.Because adopt network technology, the user can pass through ethernet network in any place, browses the state of this equipment, and sends control command.
7. the present invention adopts the formula real time operating system of taking the lead, and does not rely on PC.In addition, peripheral resource is abundant, as: program storage 4M, can extend to 8M, data-carrier store 8M can expand to 32M, 40 general inputs, output port (GPIO), 1 RS-232 interface, 1 RS-485 interface, 1 network interface, 32K non-volatile data memory (NVRAM), can expand to 256K, PCF8563 clock a slice, serial EEPROM can connect 256K.
Because the present invention has above characteristics, makes it from being installed to normal operation and maintenance thereof, maintenance, all embodies its superiority.Such as:
1. save hardware quantity and investment.Because being dispersed in on-the-spot smart machine (I/O module), the present invention can directly carry out multiple sensing control warning and computing function, thereby can reduce the quantity of transmitter, no longer need independent regulator, computing unit etc., functional unit and complicated connections the thereof such as signal condition, conversion, isolation that also no longer need the DCS system, can also be with the industry control PC as active station, thereby saved a large number of hardware investment, and can reduce the floor area of pulpit.
2. saving erected cost.Owing to adopt the RS-485 bus, making the greatly simplification that becomes equipment and being connected of this system, reduced the workload of design, installation, saved investment.
3. saving maintenance costs.Because the present invention has the ability of self diagnosis and simple fault processing, and being sent to remote control terminal by the diagnosis maintenance information that network will be correlated with, the user can inquire about the operation of all devices, the diagnosis maintenance information, so that early stage analyzing failure cause is also got rid of fast, shortened and safeguarded shut down time; Because system architecture is simplified, reduce line and maintenance workload simultaneously.
4. the accuracy and the reliability of system have been improved.Because the present invention has intellectuality, digitizing function, to compare with simulating signal, it has fundamentally improved the degree of accuracy of measuring with control, has reduced the transmission error; Owing to the designs simplification (RS-485 bus) of system and the use of network technology, the equipment room line reduces simultaneously, and the field instrument built-in function is strengthened, and has reduced the round-trip transmission of signal, has improved the functional reliability of system.
5. be easy to management, monitoring.Because the present invention adopts Ethernet, field data can clog-freely directly be sent to administration and supervision authorities, is convenient to the enterprise administrator retrieve data, the watch-dog operation conditions.
Description of drawings
Fig. 1 is a hardware block diagram of the present invention.
Fig. 2-the 1st, NETWEB module principle block diagram among Fig. 1.
Fig. 2-the 2nd, the circuit theory diagrams of Fig. 2-1.
Fig. 3 is an analog quantity load module schematic diagram.
Fig. 4 is the analog output module schematic diagram.
Fig. 5 is the switching input module schematic diagram.
Fig. 6 is a switching value output module schematic diagram.
Fig. 7 is the control program FB(flow block) of NETWEB module.
Fig. 8 is the program flow diagram of WEB release module.
Fig. 9-the 1st, the program flow diagram of NETWEB module (main frame) communication in the RS-485 communication module.
Fig. 9-the 2nd, the program flow diagram of I/O module (slave) interrupt response in the RS-485 communication module.
Figure 10 is the control program process flow diagram of data transmitting module.
Figure 11 is the program flow diagram of data diagnosis alarm module.
Figure 12 is the program flow diagram of device configuration module.
Figure 13 is the program flow diagram of data acquisition/memory module.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
As shown in Figure 1, the present invention includes NETWEB module and I/O module, Fig. 2-the 1st, NETWEB module principle block diagram, first singlechip CPU, 1 operation ThreadX The Realtime Operating System Nucleus in the NETWEB module, each program function module is according to the difference of its priority, by operating system uniform dispatching, operation among the program storage FLASH.The hardware of NETWEB is composed as follows: first singlechip CPU 1 of the NET+50 model in the ARM series that employing Netsilicon company provides, realize network function.32 program storage FLASH of AM29DL323DB-90EI 4M, 48LC2M32B2-7 8M16 position dynamic data storage device SDRAM, AT28LV64B 32K 8 bit parallel non-volatile data memory NVRAM, Physical layer PHY (chip for driving LXT971ALE) with MII interface is as Ethernet interface, PCF8563 I 2The clock CLOCK of C chip interface, MAX3241 interface chip for driving is formed RS-232 interface, and MAX485 interface chip for driving is formed the RS-485 interface, and insulating power supply DIA etc.
Described single-chip microcomputer is 32 machines, risc architecture, be integrated with 10/100BaseT ethernet medium access controller (MAC), 10MB ENDEC interface, 10 passage dma controllers, 2 independently serial port, bus interface, timer, general purpose I/O or the like, adopt the RS-485 bus that peripheral module is coupled together, the NET+OS software package that software development adopts NetSilicon company to provide carries out secondary development.This develops software and comprises:
.ThreadX the formula of taking the lead real-time kernel;
.Green?HillsMulti?2000?IDE;
.NET+OS driver, procotol and network service;
.NetSilicon other instrument that provides.
Shown in Fig. 2-1,2-2, native system comprises NETWEB module and I/O module, and the NETWEB module is connected with the I/O module by the RS-485 interface; The NETWEB module is by first singlechip CPU 1, dynamic data storage device SDRAM, program storage FLASH, clock CLOCK, non-volatile data memory NVRAM and Physical layer PHY form, first singlechip CPU 1 is connected in Physical layer PHY and dynamic data storage device SDRAM, program storage FLASH, clock CLOCK, between the non-volatile data memory NVRAM, Physical layer PHY also passes through Ethernet interface, RJ45 is to Ethernet, and through RS-232 interface by the MODEM access network based on ethernet, there is procotol TCP (UDP)/IP in the program storage FLASH, The Realtime Operating System Nucleus, the RS-485 communications protocol, and, link to each other with the I/O module through the RS-485 interface by first singlechip CPU, 1 operation RS-485 communication module program.
As shown in Figure 7, first singlechip CPU 1 copies program among the program storage FLASH among the dynamic data storage device SDRAM to when powering on, comprise: ethernet network is by procotol TCP (UDP)/IP, The Realtime Operating System Nucleus, and finish the control program module of each function, control program module is: WEB release module, 485 communication modules, data transmitting module, data diagnosis alarm module, device configuration module, data acquisition/memory module, and idiographic flow is as follows:
As shown in Figure 8, WEB release module flow process: at first NETWEB starts Web service, receives user's input, and first singlechip CPU 1 waits for and judge that the memory block indicates whether be made as readablely, and can read and be masked as readablely, return judgement when condition does not satisfy; When satisfying, condition judges whether it is real time data again, be that real time data then outputs to real time data among the dynamic data storage device SDRAM on the webpage, otherwise dynamic data storage device SDRAM historical data is outputed on the webpage, be made as to read and finish can read sign then, judge whether to withdraw from Web service at last, be then to finish, receive user's input otherwise return.
Shown in Fig. 9-1,9-2, it is two parts that 485 communication module flow processs are divided NETWEB module (main frame) communication flow and I/O module (slave) interrupt response flow process, wherein NETWEB module (main frame) communication flow is: carry out the RS-485 interface driving function that is stored among the dynamic data storage device SDRAM in the porch, send the address to the I/O module, reply as slave, then first singlechip CPU 1 sends command word, otherwise retry (retry greater than 3 processing that go offline, otherwise send the address once more); Judge that the slave data upload denys to upload and then send out the upload command word, otherwise give the biography command word after sending command word; Receive from machine data after sending out the upload command word, return when receiving successfully, when unsuccessful, receive again from machine data; Giving and passing order is to send host data or command word to slave, returns when sending successfully, when getting nowhere, resends from machine data.
I/O module (slave) interrupt response flow process: interrupting inlet I/O module reception data, judge it is address command or data command then, be that address command judges whether it is this machine address again, when being this machine address, the I/O module is sent out answer signal and is given first singlechip CPU 1, communication position SM2 puts 0, recovers on-the-spot, interrupts returning; When not being this machine address, directly recovering on-the-spot, interrupt returning; The data command word judges whether it is the upload command word more in this way, and upload command word in this way sends data that slave gathers to first singlechip CPU 1 by the I/O module, makes SM2 put 1, recovers on-the-spot, interrupts returning; As not being upload command word (is the control command word as the main frame transmission), carry out control command by the I/O module, SM2 puts 1, recovers on-the-spot, interrupts returning.
As shown in figure 10, the data transmitting module flow process is: start back first singlechip CPU 1 and wait for that dynamic data storage device SDRAM data storage area is readable, the readable mark of program is for reading, and packing data when condition satisfies calls the NETWEB module, set up long-range connection, readable mark is made as to read finishes, send packing data again, carry out delay operation, judging whether to withdraw from this program, is then to finish; As not withdrawing from this program, can wait for again that dynamic data storage device SDRAM data storage area is readable, the readable mark of program is for reading; When condition does not satisfy, return and wait for that again dynamic data storage device SDRAM data storage area is readable, the readable mark of program is for reading.
As shown in figure 11, data diagnosis alarm module flow process: described data diagnosis alarm module flow process: start back first singlechip CPU 1 and wait for alert notice, Deng then not returning the wait alert notice, Deng then, the readable mark of program is changed to be read, judge whether dynamic data storage device SDRAM alert data district is readable, condition does not satisfy (not readable), continue to judge that condition satisfies (readable) and then duplicates alert data to dynamic data storage device SDRAM data field, and sends e-mails according to configuration info, then the readable mark of this program is made as to read and finishes, withdraw from this program module, otherwise return, wait for alert notice;
As shown in figure 12, device configuration module flow process is: read parameter after the system start-up and create the configuration info district from non-volatile data memory NVRAM, enter configuration status, select by user's operation then, as what select is systematic parameter configuration (phone number, IP etc.), judge then whether canned data is to deposit non-volatile data memory NVRAM in, deposit non-volatile data memory NVRAM in this way in, revise the configuration change flag, revise the configuration info district, configuration info deposits non-volatile data memory NVRAM, termination routine in; Not to deposit under the situation of non-volatile data memory NVRAM termination routine in; As what select is refreshing a device tabulation (as bound, data type etc.) in NETWEB module first singlechip CPU 1, then earlier by RS-485 communication module and slave communication, carry out equipment I/O parameter configuration again, when configuration is finished, judge whether to store information among the NVRAM, in this way, then revise the configuration change flag, revise the configuration info district, configuration info deposits non-volatile data memory NVRAM in, not to deposit under the situation of non-volatile data memory NVRAM termination routine in.
As shown in figure 13, data acquisition/memory module flow process is: the beginning back is made as dynamic data storage device SDRAM memory block read-write sign by first singlechip CPU 1 and writes, judge again whether NETWEB module, data transmission module run through, and do not run through as program module, rejudge it and can read sign; As run through, then filtering data is stored among the dynamic data storage device SDRAM, the data of dynamic data storage device SDRAM are arranged from high to low according to timestamp, the formation head is a real time data, all be historical data (can adopt the method storage of round-robin queue) then, be made as dynamic data storage device SDRAM memory block read-write sign readable, allow the NETWEB module, the data transmission module program is from the memory block read data, the NETWEB module is set again, the data transmission module program can read be masked as readable, make the NETWEB module, the data transmission module program can be read dynamic data storage device SDRAM data, finishes at last.
Present embodiment I/O module (as shown in Figure 1) comprises four kinds, eight tunnels analogy amount load module AI promptly shown in Figure 3, eight tunnels analogy amount output module AO shown in Figure 4, eight channel switch amount load module DI shown in Figure 5, eight channel switch amount output module DO shown in Figure 6.Its hardware is composed as follows:
1. analog quantity load module AI
As shown in Figure 3, analog quantity load module AI is applicable to industry spot, can import 8 road voltage signals or current signal, and by the RS-485 interface, carries out real-time communication with the NETWEB module.
This module is made up of second singlechip CPU2, the first A/D converter A/D1, multi-way switch converter MUX and the first photoisolator OPT1, second singlechip CPU2 selects the input measured signal by dc-dc converter MUX, signal is through A/D converter A/D1, deliver to second singlechip CPU2, by RS-485 interface (adopting the MAX485 chip) and NETWEB module communication, between the first A/D converter A/D1 and second singlechip CPU2, be provided with the first photoisolator OPT1 again.
It is second singlechip CPU2 and AD7705,16 first A/D converter A/D1 that this module is selected AT89C52 for use; adopting ADG508 is multi-way switch converter MUX; can import 1~5V voltage signal or 4~20mA current signal (selecting) by wire jumper; and by RS-485 interface (having the ESD electrostatic protection) and NETWEB module communication; this module has adopted photoelectric isolation technology between first modulus/converter A/D1 and second singlechip CPU2; power supply and communication and analog input are separated, the antijamming capability of module is further strengthened.
2. analog output module AO
As shown in Figure 4, analog output module AO is applicable to industry spot, exportable 4 road voltage signals and 4 road current signals, and, carry out real-time communication with the NETWEB module by the RS-485 interface.
This module mainly is made up of the 3rd singlechip CPU 3, the first~two D/A D/A1~D/A2 and the second photoisolator OPT2, the 3rd singlechip CPU 3 input signals are from the NETWEB module, its output signal is delivered to the first~two D/A D/A1~D/A2 through the second photoisolator OPT2, and the first~two D/A D/A1~D/A2 output signal is delivered to peripheral control unit.
It is that the DAC7615 of the 3rd singlechip CPU 3 and BB company is that the first~two D/A D/A1~D/A2 carries out 12 mould/number conversions that this module is selected AT89C52 for use; exportable-10V~+ 10V voltage signal or 4-20mA current signal; peripherals is controlled (as manual operator), and carry out communication by RS-485 interface (having the ESD electrostatic protection) and NETWEB module.This module has adopted photoelectric isolation technology between D/A and the 3rd singlechip CPU 3, power supply and communication and simulation output are separated, and the antijamming capability of module is further strengthened.
3. switching input module DI
As shown in Figure 5, this module mainly is made up of the 4th singlechip CPU 4 and the 3rd photoisolator OPT3, extraneous various switching signals are the photoisolator input signal, the 3rd photoisolator OPT3 output signal is delivered to the 4th singlechip CPU 4, the 4th singlechip CPU 4 will be imported data and send the NETWEB module to through RS-485 interface and NETWEB module communication.
It is the 4th singlechip CPU 4 that switching input module DI selects AT89C52 for use.Be used for industry spot, can gather the state of 8 way switch amount input signals, by RS-485 interface (having the ESD electrostatic protection), with the real-time communication of NETWEB module.Simultaneously between input signal and the 4th singlechip CPU 4, adopted photoelectric isolation technology, made the input of the 4th singlechip CPU 4 and switching value separately, the antijamming capability of module is further strengthened.
4. switching value output module DO
As shown in Figure 6, this module mainly is made up of Darlington driver ULN, the 5th singlechip CPU 5 and the 4th photoisolator OPT4, the 5th singlechip CPU 5 is through RS-485 interface and NETWEB module communication, communication information is the input signal of the 5th singlechip CPU 5, to Darlington driver ULN, Darlington driver ULN output signal divides eight the tunnel extremely to control on-the-spot through relay R ELAY to output terminal through the 4th photoisolator OPT4.
It is the 5th singlechip CPU 5 that switching value output module DO selects AT89C52 for use, is applicable to industry spot, and internal drive No. 8 relays are by RS-485 interface (having the ESD electrostatic protection), with the real-time communication of NETWEB module.Between output signal and the 5th singlechip CPU 5, adopted simultaneously photoelectricity to isolate and the Darlington Driving technique, power supply and communication and the 5th singlechip CPU 5 are separated, the antijamming capability of module is further strengthened.
Among analog quantity load module AI, analog output module AO, switching input module DI, the switching value output module DO each all comprises a configuration information storer EEPROM (integrated house dog WDOG in it, English original name: Microprocessor Reset IC with Watchdog PartSummary), link to each other with single-chip microcomputer, have information such as module type, I/O address, configuration parameter, I/O address is chosen between 0-32.
Present embodiment analog quantity load module AI, analog output module AO, switching input module DI, each module of switching value output module DO all comprise a configuration information storer EEPROM, have information such as module type, I/O address, configuration parameter, I/O address is chosen between 0-32.
The NETWEB module is connected by between RS-485 bus and the I/O module, and (according to the difference of the RS-485 chip for driving that adopts, the I/O module can connect 32,128 or 256 and not wait), the NETWEB module can be connected with 32 I/O modules at most at present.The NETWEB module reads each I/O modules configured information by the RS-485 bus, and the collection site data are also handled, and send to far-end computer by Ethernet again, or the control information of far-end is passed to the module of appointment, participates in control.Detailed functions is as follows:
1) configuration
The system engineer is before system comes into operation, should be according to the applicable cases at scene, by the present invention of device configuration block configuration, configuration client (far-end) is used the Internet browser of standard, by being embedded in WEB release module of the present invention, device configuration module the operational factor and the I/O module correlation parameter of system is set.
2) operating mode inquiry
After entering into normal operating conditions, the present invention will monitor field apparatus ruuning situation at any time by the WEB release module.The client checks on-the-spot real time data information by the Internet browser of standard, part historical information that simultaneously can the playback scene.Under the condition that user right allows, can simply control remote equipment.
3) warning message inquiry
After entering into normal operating conditions, the present invention is by the data diagnosis alarm module, the alarm parameters that will set according to the system engineer, checkout equipment alert if, store warning message into this locality simultaneously, the client checks on-the-spot warning message by the Internet browser of standard.
4) Email receives
After entering into normal operating conditions, the present invention is by the WEB release module, the alarm parameters that will set according to the user, checkout equipment alert if, the EMAIL that sets according to the system engineer receives client's list simultaneously, data diagnosis, warning message is sent in client's mailbox of appointment.
5) customization page download
The present invention is before system comes into operation, can the present invention use third-party html editor by WEB release module, device configuration module, the web page editing explanation that provides according to system, develop self-defining user's webpage, the real time data that issue is on-the-spot, the client is by the Internet browser downloads user's of standard customized web page.
6) remote service center
After entering into normal operating conditions, the present invention is by the WEB release module, configuration info according to the system engineer, the historical data of field apparatus is sent to long-range service centre by Internet or telephone line, the data of remote service center are accepted in the relevant database that software selectes these history data store to the user, and remote service center also can send steering order to the connection device at scene according to the situation of these data analyses.
The invention solves following several gordian techniquies:
1) by embedded real-time operating system and TCP (the UDP)/IP agreement seamless access network based on ethernet of I/O module that will disperse, thus can each I/O module of transparent access in Ethernet;
2) data diagnosis module, data acquisition/memory module provide the function to diagnosis of I/O module and dynamic management;
3) the RS-485 interface finish and the I/O module between the RS-485 communication;
4) by the WEB issuing function of WEB release module realization based on the configuration software of browser;
The present invention can finish the collection and the control of industry spot data, and is sent to long-range (strange land) by the Internet.By standard browser software, can carry out the field data visit, remote detection/supervision/control function such as warning message inquiry simultaneously; The Browse/Server structure is adopted in the configuration of total system and remote monitoring, with the at present popular any Web browser of Internet browser software can be according to reading not miss, big complete desktop browsers to 10Mbyte, no matter little Mosaic browser to 600kbyte also is that browser or the netscape browser of Microsoft all is suitable for;
The invention provides on-the-spot remote data collection and transfer function, with on-the-spot real time data regularly or be sent to by user's request in the database of remote service center, for the fault diagnosis and the plant maintenance of field apparatus provides field data.
The present invention has following function:
1) data acquisition and remote control function.The present invention can connect the industry spot signal of standard, by the I/O module, finishes the collection of analog quantity and switching value signal, carries out simple Long-distance Control simultaneously.
2) configuration of the configuration of system and configuration info upload function.The invention provides software,, give embedded type networking RIOS performance flexibly, model block configuration information upload function is provided simultaneously according to the difference of site of deployment based on the device configuration module of browser.
3) I/O module expanded function.The present invention adopts the RS-485 communication structure, and different according to on-site signal kind and quantity can freely be selected the I/O module, and the I/O concatenation ability of expanding system realizes the preservation of module power down configuration info.
4) the automatic identification and the configuration feature of I/O module.Because the present invention adopts the device configuration module, can discern the type (as analog quantity load module AI, analog output module AO, switching value output module DO, switching input module DI etc.) of link block automatically, the configuration parameters of configuration module (as IP address, range, linear parameter etc.).
5) short-term data memory function.The present invention adopts data diagnosis alarm module and data acquisition/memory module, can store the field data of short-term (temporarily) and the warning message of specified quantity, realizes the playback of the preceding data of equipment failure.
6) remote data transfer function.The present invention is by data transmitting module, according to user's configuration info (regularly, in real time, by user's request etc.), provides the strange land transmission of data.
7) multiple network access function.The present invention adopts Ethernet interface, and two kinds of access way access network based on ethernet of modem.
8) WEB data issuing function.According to user's configuration info, the WEB issuing function of field data is provided, the user uses standard browser, the on-the-spot real time data of free access.
9) warning and diagnostic function.The present invention provides bound to report to the police according to user's configuration info, employing data diagnosis alarm module, and the power down of I/O module is reported to the police, email notification, diagnostic message query display.
10) teledata receiving function.Realize the Data Receiving function in long-range host computer, the present invention is the open access interface that data are provided by data diagnosis alarm module and WEB release module, and data sharing and information integration means are provided.
11) provide general I/O expansion interface and industrial common interfaces gateway function to Ethernet, as RS-232 to the Ethernet transfer gateway etc.
In addition, the physical interface that NETWEB module of the present invention provides network to connect can also drive the Ethernet interface of forming by the 10M/100M networked physics layer and be connected on the Ethernet (Internet) separately by surpassing five class unshielded twisted pairs through RJ45 interface access network based on ethernet mode; Can also pass through the phone access way of modem separately, and be connected with modem by RS-232 interface (providing) by the MAX3241 chip for driving, again through RJ11 interface and telephone line access network based on ethernet, carry out remote transmission data, monitoring, the modem access function is the optional function of equipment, in go back the working procedure functional module, with Ethernet interface, RS-485 interface and RS-232 interface both-way communication.

Claims (10)

1.一种嵌入式网络化远程输入输出系统,其特征在于:包括NETWEB模块、I/O模块及控制程序模块三部分,其中:1. A kind of embedded network remote input and output system, it is characterized in that: comprise NETWEB module, I/O module and control program module three parts, wherein: NETWEB模块运行Intemet网络协议栈,通过RS-485总线管理I/O模块,完成分布式I/O控制,还通过网络传输部分与以太网之间收发数据,实现数据的网络传输及通过Intemet网络对现场设备进行远程监控,数据采集;The NETWEB module runs the Internet protocol stack, manages the I/O module through the RS-485 bus, and completes distributed I/O control. On-site equipment for remote monitoring and data collection; 控制程序模块存储于NETWEB模块中的程序存储器(FLASH)里;The control program module is stored in the program memory (FLASH) in the NETWEB module; I/O模块通过RS-485总线与NETWEB模块通讯,各输入输出功能模块完成现场信号的采集、转换,并对现场控制对象实施控制。The I/O module communicates with the NETWEB module through the RS-485 bus, and each input and output function module completes the collection and conversion of on-site signals, and controls the on-site control objects. 2.按照权利要求1所述嵌入式网络化远程输入输出系统,其特征在于:所述网络传输采用通过以太网接口的接入以太网方式或通过调制解调器(MODEM)的电话接入方式。2. According to the described embedded networked remote input and output system of claim 1, it is characterized in that: said network transmission adopts the access Ethernet mode through the Ethernet interface or the telephone access mode through the modem (MODEM). 3.按照权利要求1所述嵌入式网络化远程输入输出系统,其特征在于:所述NETWEB模块包括:3. according to the described embedded network remote input and output system of claim 1, it is characterized in that: described NETWEB module comprises: -第一单片机(CPU1);- the first microcontroller (CPU1); -动态数据存储器(SDRAM),存储NETWEB模块中第一单片机(CPU1)运行的控制程序,还存储所述I/O模块采集的现场数据;-Dynamic Data Memory (SDRAM), stores the control program that the first single-chip microcomputer (CPU1) runs in the NETWEB module, also stores the scene data that described I/O module collects; -非易失性数据存储器(NVRAM),主要存放为NETWEB模块设定的信息参数;由第一单片机(CPU1)读取;-Non-volatile data memory (NVRAM), which mainly stores information parameters set for the NETWEB module; read by the first single-chip microcomputer (CPU1); -程序存储器(FLASH),用来存放操作系统内核程序、网络协议TCP(UDP)/IP、各功能控制程序模块和RS-485接口通讯协议,并通过第一单片机(CPU1)运行控制程序模块中RS-485通讯模块程序,经RS-485接口与I/O模块相连;-Program memory (FLASH), used to store the operating system kernel program, network protocol TCP (UDP)/IP, each function control program module and RS-485 interface communication protocol, and run through the first single-chip microcomputer (CPU1) in the control program module RS-485 communication module program, connected with I/O module via RS-485 interface; -时钟(CLOCK),为NETWEB模块提供时间信息;- Clock (CLOCK), providing time information for NETWEB module; -物理层(PHY),与第一单片机(CPU1)连接,用来完成TCP/IP网络协议中的第一层部分;-The physical layer (PHY), connected with the first single-chip microcomputer (CPU1), is used to complete the first layer part in the TCP/IP network protocol; -RS-485总线,连接NETWEB模块和各I/O模块,进行数据通讯操作。-RS-485 bus, connect NETWEB module and each I/O module, carry out data communication operation. 4.按照权利要求1所述嵌入式网络化远程输入输出系统,其特征在于:所述由NETWEB模块可动态地控制、管理的所述I/O模块可为32个,主要包括:模拟量输入模块(AI)、模拟量输出模块(AO)、开关量输入模块(DI)、开关量输出模块(DO)。4. according to the described embedded networked remote input and output system of claim 1, it is characterized in that: the described I/O module that can be dynamically controlled and managed by the NETWEB module can be 32, mainly comprising: analog quantity input module (AI), analog output module (AO), digital input module (DI), digital output module (DO). 5.按照权利要求4所述嵌入式网络化远程输入输出系统,其特征在于:模拟量输入模块(AI)由第二单片机(CPU2)、第一模/数转换器(A/D1)、多路开关转换器(MUX)及第一光电隔离器(OPT1)组成,第二单片机(CPU2)通过开关转换器(MUX)选择输入被测信号,信号经模/数转换器(A/D1),送至第二单片机(CPU2),再通过RS-485接口与NETWEB模块通讯,在第一模数/转换器(A/D1)和第二单片机(CPU2)之间设有第一光电隔离器(OPT1)。5. According to the described embedded networked remote input and output system of claim 4, it is characterized in that: the analog input module (AI) is composed of the second single-chip microcomputer (CPU2), the first analog/digital converter (A/D1), multiple The second microcontroller (CPU2) selects and inputs the signal to be tested through the switch converter (MUX), and the signal passes through the analog/digital converter (A/D1). Send to the second single-chip microcomputer (CPU2), then communicate with the NETWEB module through the RS-485 interface, be provided with the first photoelectric isolator ( OPT1). 6.按照权利要求4所述嵌入式网络化远程输入输出系统,其特征在于:模拟量输出模块(AO)主要由第三单片机(CPU3)、第一~二数/模转换器(D/A1~D/A2)及第二光电隔离器(OPT2)组成,第三单片机(CPU3)输入信号来自NETWEB模块,其输出信号经第二光电隔离器(OPT2)送至第一~二数/模转换器(D/A1~D/A2),第一~二数/模转换器(D/A1~D/A2)输出信号送至外围控制设备。6. According to the described embedded networked remote input and output system of claim 4, it is characterized in that: the analog output module (AO) is mainly composed of the 3rd single-chip microcomputer (CPU3), the first ~ two digital/analog converters (D/A1 ~D/A2) and the second photoelectric isolator (OPT2), the input signal of the third single-chip microcomputer (CPU3) comes from the NETWEB module, and its output signal is sent to the first ~ second digital/analog conversion through the second photoelectric isolator (OPT2) devices (D/A1~D/A2), and the output signals of the first~second digital/analog converters (D/A1~D/A2) are sent to the peripheral control equipment. 7.按照权利要求4所述嵌入式网络化远程输入输出系统,其特征在于:开关量输入模块(DI)主要由第四单片机(CPU4)及第三光电隔离器(OPT3)组成,外界各种开关信号为光电隔离器(OPT3)输入信号,第三光电隔离器(OPT3)输出信号送至第四单片机(CPU4),第四单片机(CPU4)经RS-485接口与NETWEB模块通讯,将输入数据传送给NETWEB模块。7. According to the described embedded networked remote input and output system of claim 4, it is characterized in that: the switching value input module (DI) is mainly made up of the 4th single-chip microcomputer (CPU4) and the 3rd optoelectronic isolator (OPT3), outside various The switch signal is the input signal of the photoelectric isolator (OPT3), the output signal of the third photoelectric isolator (OPT3) is sent to the fourth single-chip microcomputer (CPU4), and the fourth single-chip microcomputer (CPU4) communicates with the NETWEB module through the RS-485 interface, and the input data Sent to the NETWEB module. 8.按照权利要求4所述嵌入式网络化远程输入输出系统,其特征在于:开关量输出模块(DO)主要由达林顿驱动器(ULN)、第五单片机(CPU5)及第四光电隔离器(OPT4)组成,第五单片机(CPU5)经RS-485接口与NETWEB模块通讯,通讯信息是第五单片机(CPU5)的输入信号,输出端经第四光电隔离器(OPT4)至达林顿驱动器(ULN),达林顿驱动器(ULN)输出信号分八路经继电器(RELAY)至控制现场。8. According to the described embedded networked remote input and output system of claim 4, it is characterized in that: the switching value output module (DO) mainly consists of a Darlington driver (ULN), the fifth single-chip microcomputer (CPU5) and the fourth photoelectric isolator (OPT4), the fifth single-chip microcomputer (CPU5) communicates with the NETWEB module through the RS-485 interface, the communication information is the input signal of the fifth single-chip microcomputer (CPU5), and the output terminal passes through the fourth photoelectric isolator (OPT4) to the Darlington driver (ULN), the output signal of the Darlington driver (ULN) is divided into eight routes to the control site through the relay (RELAY). 9.按照权利要求5、6、7或8所述嵌入式网络化远程输入输出系统,其特征在于:模拟量输入模块(AI)、模拟量输出模块(AO)、开关量输入模块(DI)、开关量输出模块(DO)中的每个都包括一个配置信息存储器(EEPROM),与单片机相连。9. According to claim 5, 6, 7 or 8 described embedded networked remote input and output system, it is characterized in that: analog input module (AI), analog output module (AO), digital input module (DI) 1. Each of the switching value output modules (DO) includes a configuration information memory (EEPROM), which is connected with the single-chip microcomputer. 10.按照权利要求1所述嵌入式网络化远程输入输出系统,其特征在于:所述控制程序模块为:WEB发布模块、485通讯模块、数据传送模块、数据诊断报警模块、设备组态模块、数据采集/存储模块,具体功能如下:10. according to the described embedded networked remote input and output system of claim 1, it is characterized in that: described control program module is: WEB issue module, 485 communication module, data transmission module, data diagnosis alarm module, equipment configuration module, Data acquisition/storage module, the specific functions are as follows: 所述WEB发布模块:首先NETWEB启动Web服务,接收用户输入,第一单片机(CPU1)等待存储区标志设为可读,并且可读取标志为可读,条件不满足时返回判断;条件满足时判断是否是实时数据,是实时数据则把动态数据存储器SDRAM中实时数据输出到网页上,否则把动态数据存储器(SDRAM)历史数据输出到网页上,然后把可读取标志设为读取完成,最后判断是否退出Web服务,是则结束,否则返回接收用户输入;Described WEB publishing module: first NETWEB starts Web service, receives user input, and the first single-chip microcomputer (CPU1) waits for the storage area sign to be set to readable, and the readable sign is readable, returns judgment when condition is not met; Judging whether it is real-time data, if it is real-time data, the real-time data in the dynamic data memory SDRAM is output on the webpage, otherwise the dynamic data memory (SDRAM) historical data is output on the webpage, and then the readable flag is set as reading completion, Finally, judge whether to exit the Web service, if yes, end, otherwise return to receive user input; 所述485通讯模块包括NETWEB模块通讯和I/O模块中断响应两部分,其中NETWEB模块通讯:在入口处执行存储在动态数据存储器(SDRAM)中的RS-485接口驱动函数,发送地址至I/O模块,如从机有应答,则第一单片机(CPU1)发送命令字,否则重试;发送命令字后判断从机数据上传否,上传则发上传命令字,否则发下传命令字;发上传命令字后接收从机数据,接收成功地返回,不成功时,重新接收从机数据;发下传命令是发送主机数据或命令字给从机,发送成功时返回,不成功时,重新发送从机数据;所述I/O模块中断响应:在中断入口I/O模块接收数据,然后判断是地址命令还是数据命令,是地址命令再判断是否是本机地址,是本机地址时,I/O模块发应答信号给第一单片机(CPU1),恢复现场、中断返回;不是本机地址时,直接恢复现场、中断返回;如是数据命令字,再判断是否是上传命令字,如是上传命令字,由I/O模块发送从机采集的数据给第一单片机(CPU1),恢复现场、中断返回;如不是上传命令字,由I/O模块执行控制命令,恢复现场、中断返回;Described 485 communication modules comprise NETWEB module communication and I/O module interruption response two parts, wherein NETWEB module communication: execute the RS-485 interface driver function stored in dynamic data memory (SDRAM) at entrance, send address to I/O O module, if there is a response from the slave, then the first single-chip microcomputer (CPU1) sends the command word, otherwise retry; after sending the command word, it is judged whether the data of the slave machine is uploaded, and if the upload is uploaded, the upload command word is sent, otherwise the download command word is sent; Receive the slave data after uploading the command word, and return successfully, if not successful, re-receive the slave data; sending the download command is to send the master data or command word to the slave, return when the sending is successful, and resend when unsuccessful Slave data; the I/O module interrupt response: the I/O module receives data at the interrupt entrance, then judges whether it is an address command or a data command, and is an address command to judge whether it is a local address again, and when it is a local address, I The /O module sends a response signal to the first single-chip microcomputer (CPU1), restores the site, and returns from the interrupt; if it is not the address of the local machine, directly restores the site and returns from the interrupt; if it is a data command word, then judge whether it is an upload command word, if it is an upload command word , the I/O module sends the data collected by the slave to the first single-chip microcomputer (CPU1), restores the scene, interrupts and returns; if it is not an upload command word, the I/O module executes the control command, restores the scene, and interrupts and returns; 所述数据传送模块;启动后第一单片机(CPU1)等待动态数据存储器(SDRAM)数据存储区可读,程序的可读标志为正在读取,条件满足时打包数据,调用NETWEB模块,建立远程连接,将可读标志设为读取完成,再发送打包数据,执行延时操作,判断是否退出该程序,是则结束;如不退出该程序,可重新等待动态数据存储器(SDRAM)数据存储区可读,程序的可读标志为正在读取;条件不满足时,返回重新等待动态数据存储器(SDRAM)数据存储区可读,程序的可读标志为正在读取;Described data transmission module; First single-chip microcomputer (CPU1) waits for dynamic data memory (SDRAM) data storage area to be readable after starting, and the readable mark of program is reading, and packs data when condition meets, calls NETWEB module, establishes remote connection , set the readable flag as read completion, then send the packaged data, execute the delay operation, and judge whether to exit the program, if yes, end; if you do not exit the program, you can wait for the SDRAM data storage area to be available again Read, the readable flag of the program is reading; when the condition is not satisfied, return to wait for the data storage area of the dynamic data memory (SDRAM) to be read again, and the readable flag of the program is reading; 所述数据诊断报警模块:启动后第一单片机(CPU1)等待报警通知,等不到时返回等待报警通知,等到时,程序的可读标志置为读,判断动态数据存储器(SDRAM)报警数据区是否可读,条件不满足,继续判断,条件满足则复制报警数据到动态数据存储器(SDRAM)数据区,并根据组态信息发电子邮件,然后把本程序的可读标志设为读取完成,退出本程序模块,否则返回,等待报警通知;Described data diagnosis and alarm module: first single-chip microcomputer (CPU1) waits for alarm notification after starting, returns and waits for alarm notification when not waiting, and when waiting, the readable sign of program is set to read, and judges dynamic data memory (SDRAM) alarm data area Whether it is readable, if the condition is not satisfied, continue to judge, if the condition is met, copy the alarm data to the SDRAM data area, and send an email according to the configuration information, and then set the readable flag of this program as read complete, Exit the program module, otherwise return and wait for the alarm notification; 所述设备组态模块:系统启动后从非易失性数据存储器(NVRAM)中读参数创建组态信息区,进入配置状态,然后由用户操作进行选择,如选择的是系统参数配置,则判断存储信息是否是存入非易失性数据存储器(NVRAM),如存入非易失性数据存储器(NVRAM),则修改组态变化标志,修改组态信息区,组态信息存入非易失性数据存储器(NVRAM),结束程序;如不是存入非易失性数据存储器(NVRAM)的情况下,则结束程序;如选择的是NETWEB模块第一单片机(CPU1)中刷新设备列表,则先通过RS-485通讯模块与从机通讯,再进行设备I/O参数配置,当配置完成时,判断是否存储信息到(NVRAM)中,如是,则修改组态变化标志,修改组态信息区,组态信息存入非易失性数据存储器(NVRAM),不是存入非易失性数据存储器(NVRAM)的情况下,结束程序;Described device configuration module: After the system starts, read parameters from the non-volatile data memory (NVRAM) to create the configuration information area, enter the configuration state, and then select by the user operation, as the selection is the system parameter configuration, then judge Whether the storage information is stored in the non-volatile data memory (NVRAM), if it is stored in the non-volatile data memory (NVRAM), modify the configuration change flag, modify the configuration information area, and store the configuration information in the non-volatile Non-volatile data memory (NVRAM), end the program; if it is not stored in the non-volatile data memory (NVRAM), then end the program; if you choose to refresh the device list in the first single-chip microcomputer (CPU1) of the NETWEB module, then first Communicate with the slave through the RS-485 communication module, and then configure the device I/O parameters. When the configuration is completed, judge whether to store the information in (NVRAM), if so, modify the configuration change flag, modify the configuration information area, The configuration information is stored in the non-volatile data memory (NVRAM), and if it is not stored in the non-volatile data memory (NVRAM), the program ends; 所述数据采集/存储模块:开始后由第一单片机(CPU1)将动态数据存储器(SDRAM)存储区读写标志设为写,再判断NETWEB模块、数据传输模块是否读完,如程序模块没读完,重新判断其可读取标志;如读完,则将过滤数据存储到动态数据存储器(SDRAM)中,动态数据存储器(SDRAM)的数据按照时间戳由高到低进行排列,将动态数据存储器(SDRAM)存储区读写标志设为可读,允许NETWEB模块、数据传输模块程序从存储区读数据,再设置NETWEB模块、数据传输模块程序可读取标志为可读,使NETWEB模块、数据传输模块程序可以读动态数据存储器(SDRAM)数据,最后结束。Described data acquisition/storage module: after the start, the dynamic data memory (SDRAM) storage area read-write sign is set as writing by the first single-chip microcomputer (CPU1), then judge whether the NETWEB module, the data transmission module have read, as the program module does not read If finished, re-judge its readable flag; if finished, store the filtered data in the dynamic data memory (SDRAM), and the data in the dynamic data memory (SDRAM) is arranged according to the time stamp from high to low, and the dynamic data memory (SDRAM) storage area read and write flag is set to be readable, allow NETWEB module, data transmission module program to read data from storage area, then set NETWEB module, data transmission module program readable flag to be readable, make NETWEB module, data transmission The module program can read the dynamic data memory (SDRAM) data, and finally ends.
CN03135038.0A 2003-09-29 2003-09-29 Embedded networked remote input and output system Expired - Fee Related CN1280754C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN03135038.0A CN1280754C (en) 2003-09-29 2003-09-29 Embedded networked remote input and output system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN03135038.0A CN1280754C (en) 2003-09-29 2003-09-29 Embedded networked remote input and output system

Publications (2)

Publication Number Publication Date
CN1604066A CN1604066A (en) 2005-04-06
CN1280754C true CN1280754C (en) 2006-10-18

Family

ID=34659186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN03135038.0A Expired - Fee Related CN1280754C (en) 2003-09-29 2003-09-29 Embedded networked remote input and output system

Country Status (1)

Country Link
CN (1) CN1280754C (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100382515C (en) * 2005-06-28 2008-04-16 上海集成通信设备有限公司 Power and environment concentrated monitoring management system
US8156232B2 (en) * 2005-09-12 2012-04-10 Rockwell Automation Technologies, Inc. Network communications in an industrial automation environment
US7587251B2 (en) * 2005-12-21 2009-09-08 Rockwell Automation Technologies, Inc. Remote monitoring and control of an I/O module
US8028045B2 (en) * 2006-09-29 2011-09-27 Rockwell Automation Technologies, Inc. Web-based configuration server for automation systems
DE102009032229B4 (en) * 2009-07-08 2012-06-14 Abb Technology Ag Method and device for logging process variables of a digital field device
CN102215164B (en) * 2011-05-25 2013-10-23 浙江中控软件技术有限公司 A method of transferring data
CN102722153A (en) * 2012-06-14 2012-10-10 苏州伦科思电子科技有限公司 Embedded networked remote input and output system
CN103676866A (en) * 2013-12-06 2014-03-26 苏州朗捷通智能科技有限公司 Embedded networked multivariate input and output system
CN104751280B (en) * 2015-03-26 2018-01-02 常州大学 A kind of petroleum chemical enterprise's electric energy consumption monitoring system and its data managing method
US10552619B2 (en) * 2015-07-20 2020-02-04 Intel Corporation Technologies for secure trusted I/O access control
CN107465620B (en) * 2017-08-03 2020-07-10 爱普(福建)科技有限公司 General data router and communication method thereof
CN107957699A (en) * 2017-12-01 2018-04-24 四川零点自动化系统有限公司 A kind of modular I/0 system based on ARM technologies
CN107991928A (en) * 2017-12-10 2018-05-04 四川零点自动化系统有限公司 A kind of modular I/0 system based on ARM technologies
CN116990028B (en) * 2023-07-28 2024-11-05 湖北航天化学技术研究所 High-speed acquisition and processing method for test data of standard test engine

Also Published As

Publication number Publication date
CN1604066A (en) 2005-04-06

Similar Documents

Publication Publication Date Title
CN1280754C (en) Embedded networked remote input and output system
CN107908166B (en) Manufacturing MES data acquisition system of automobile based on industry internet
CN109885002A (en) A kind of welding machine networking intelligent monitor system and monitoring method
CN1913452A (en) Method and equipment of intelligent patrol detection for communication network
CN105306272B (en) Information system fault scenes formation gathering method and system
CN105159964A (en) Log monitoring method and system
CN101551662A (en) Sensor network remote supervising method base on internet
CN1268995C (en) Wireless local area network field bus network control station
CN111143167B (en) Alarm merging method, device, equipment and storage medium for multiple platforms
CN105234952A (en) Household monitoring robot control system based on STM32
CN104360650A (en) Crane moving safety monitoring and management system based on mobile network
CN103676866A (en) Embedded networked multivariate input and output system
CN101056220A (en) Central monitoring method of the data service system without network management interface
CN109696883A (en) A kind of numerically-controlled machine tool condition monitoring and early warning system based on cloud storage
CN103699964A (en) Agricultural-product tracing system based on evidence-chain and supply-chain panels
CN113111261A (en) Data processing method of cloud platform, cloud platform and panoramic analysis system
CN115543746A (en) Graphics processor monitoring method, system and device and electronic equipment
CN1488102A (en) Gateway device and gateway setting tool
CN2660800Y (en) Embedded networked remote input and output system
CN104678957B (en) A kind of monitoring method of wellsite facility
CN108881201A (en) The acquisition processing system and method for processing site data needed for a kind of MES
CN1740933A (en) Monitoring system
CN101672879A (en) Automatic diagnostic device and method of electronic products
CN103569421A (en) Data collection and analysis device for cigarette packing machine
CN109413185A (en) A kind of equipment routing inspection system and its Cloud Server design method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20061018

Termination date: 20210929

CF01 Termination of patent right due to non-payment of annual fee