A kind of terminal control unit
Technical field
The utility model relates to the field control equipment of refrigerating refrigeration system remote monitoring, particularly a kind of terminal control unit.
Background technology
Constantly monitor the operating condition of refrigerating refrigeration system, guarantee that the reliable normal operation of refrigeration system is the key factor that concerns food quality,, can find immediately and fix a breakdown rapidly, guarantee system's operate as normal in case find that refrigeration system has unusual warning.So remote control technology has had in refrigeration system widely to be used.The monitoring content of refrigerating refrigeration system mainly comprises 4 parts: a. monitoring real time data; B. monitoring alarm data; C. inquire about the real time data historical record; D. inquire about the alert data historical record.But, the terminal control unit of traditional long distance control system, usually can only monitor field apparatus, promptly be uploaded to upper opertaing device after the image data, as: the man-machine interface Centralized Controller, presence server, perhaps send to long-range host computer by gateway, in this long distance control system, the task that terminal control unit is finished is less, a large amount of work focuses on host computer equipment, can not realize the theory of " diversifying risks " in the collecting and distributing control.
The utility model content
In view of this, fundamental purpose of the present utility model is to provide a kind of terminal control unit with separate, stored function and alarm decision function.
For achieving the above object, the technical solution of the utility model is achieved in that
A kind of terminal control unit, comprise that microprocessor, the flash memory Flash of storage scene control program source code, the static memory SRAM that stores scene control program operation intermediate variable, the storage of controlling field apparatus need electricallyerasable ROM (EEROM) EEPROM, clock crystal oscillator circuit and at least one A/D modular converter of alternate device operation history data, described terminal control unit also comprises the RS485 port, described microprocessor comprises data bus and address bus, a plurality of input and output I/O pins, serial ports and clock pin;
The data bus of described microprocessor all is connected Flash and SRAM with address bus;
The serial ports of described microprocessor connects A/D modular converter, EEPROM and at least two RS485 ports respectively;
The clock pin of described microprocessor connects the clock crystal oscillator circuit.
Described RS485 port, at least one is to connect the RS485 port that needs by the field apparatus of RS485 communication modes control.
Described RS485 port, at least one RS485 port connects PC control equipment by the RS485 bus.
Described clock crystal oscillator circuit is two, and being respectively terminal control unit provides timing signal and provide clock pulse signal for microprocessor.
At least one I/O pin of described microprocessor is the digital signal input port.
Described microprocessor is a kind of in Rabbit3000 or Rabbit2000 or the Rabbit4000 model.
A serial ports of described microprocessor is that the scene control program source code is written into mouth.
Described terminal control unit also comprises the triggering latch, and the I/O pin of described microprocessor connects at least one triggering latch that is used to export control command.
Described terminal control unit also has the lithium battery back-up source, and the back-up source pin of described microprocessor connects the lithium battery back-up source.
Described terminal control unit also comprises at least one hand control switch, and the output terminal of described triggering latch connects hand control switch, and control signal is exported through described hand control switch.
The utility model, a kind of terminal control unit has the following advantages:
1. the utility model can independently be stored the historical data of the required backup of this controller, maximum memory space can reach 1MB, by disperseing storage to need the method for the historical data of backup, strengthen the memory space of security, independence and the whole network of Backup Data effectively, and reduced the workload of PC control equipment.
2. the utility model can compare data and the preset monitoring parameter that collects, and carries out alarm decision, and sends warning message to upper opertaing device, further reduces the workload of upper opertaing device.Or directly realize SMS alarm by the external GSM Modem of RS485 port.
3. the utility model contains at least 2 RS485 PORT COM, except that using one of them RS485 port to connect the on-the-spot RS485 bus, also have an extra RS485 port can directly connect other field apparatus (as: frequency converter, GSM Modem, HMI etc.), strengthened individual equipment function expansion and integrated level.
Description of drawings
Fig. 1 is the utility model circuit structure block diagram;
Fig. 2 is the utility model control program process flow diagram.
Embodiment
As shown in Figure 1, the utility model comprises the microprocessor of control terminal, be connected with on it flash memory Flash, static memory SRAM, electricallyerasable ROM (EEROM) EEPROM, analog/digital signal conversion module (A/D, Analog/Digital), trigger latch, clock crystal oscillator circuit OSC and back-up source.Described microprocessor is selected Rabbit 3000 models for use, and it has 20 bit address buses, 56 road I/O pins, 8 bit data bus, 6 pins such as serial ports CMOS, clock and back-up source.The data bus of microprocessor all is connected the flash memory Flash of storage scene control program source code and the static memory SRAM of storage scene control program operation intermediate variable with address bus, the clock pin of microprocessor connects two clock crystal oscillator circuit OSC, frequency provides timing signal for the OSC of 32KHz for terminal control unit, and frequency provides clock pulse signal for the OSC of 22.1MHz for microprocessor.4 serial ports of microprocessor connect the electricallyerasable ROM (EEROM) EEPROM that two RS485 ports, A/D modular converter and storage need the historical data of backup respectively, the serial ports of reserving a microprocessor is used to be written into the scene control program source code as DLL (dynamic link library).No. 1 the RS485 port connects the RS485 bus, be convenient to terminal control unit and its PC control device talk, described upper opertaing device is that man-machine interface (HMI, Human Machine Interface), long-range host computer or other send the equipment of monitor command to terminal control unit.Field apparatus is meant the various refrigeration plants at monitor terminal.No. 2 the RS485 port connects the field apparatus that needs to use the control of RS485 communication modes, as: frequency converter, electric expansion valve etc., this type of opertaing device adopts the transfer control signal of RS485 communication modes to field apparatus usually.The simulating signal input (AI, Analog Input) of field apparatus, such as: system pressure, temperature etc. are sent to microprocessor by the A/D modular converter.Digital signal input (DI, Digital Input), as the ON/OFF of equipment monitoring apparatus, 8 road I/O pins by microprocessor enter microprocessor.Other has the I/O pin of No. 8 microprocessors to connect the triggering latch, triggers latch and connects the hand control switch circuit, and the hand control switch other end is a digital output end, and hand control switch can be forced the output of signal from digital output terminal.In addition, loss of data when preventing the microprocessor sudden power, for microprocessor has disposed the back-up source that is made of lithium battery, back-up source connects the back-up source pin of microprocessor.
Use the communication of Modbus agreement between terminal control unit and the upper opertaing device.
The workflow of terminal control unit, as shown in Figure 2: scene control program begins, microprocessor just begins to gather the data of AI and DI input, carry out scene control program in SRAM, promptly microprocessor calls the scene control program source code among the Flash, and carries out logical operation, the output control signal, promptly export to corresponding field apparatus, with data that collect and the monitoring parameter of presetting relatively, carry out alarm decision then by DO end or No. 2 RS485 ports.If the temperature data that collects has exceeded the scope of monitoring parameter, need to report to the police, then generate warning message.After the alarm decision, with the history data store of need backups in EEPROM.Then, whether inquiry has the information of PC control device access terminal control unit, if have, then accept the PC control device access, receive and handle visit information from host computer, the situation of warning message and execution is fed back to the PC control equipment of terminal control unit, then, turn back to data acquisition step.If there is not the information of upper opertaing device access terminal controller, then directly turn back to the step of image data, finish a control program cycle.
Terminal control unit is constantly carried out scene control program, judges when needing to report to the police, and can send warning message to upper opertaing device, and self can store needs the data of backup as historical data.Microprocessor of the present utility model can also be selected Rabbit2000 or Rabbit4000 model for use, the two and Rabbit3000 difference to some extent on pin layout and travelling speed, and still, function of the present utility model all can realize.In addition, the storage space of EEPROM can reach 1MB, if the upper opertaing device of terminal control unit is not easy to store alarms information, terminal control unit also can be stored in warning message among the EEPROM, to preserve the historical data of warning message, be convenient to the needs of remote monitoring.As long as be written into different control programs, just can realize the purpose of store alarms information.
Microprocessor also can unconnected triggering latch, directly exports digital controlled signal.Microprocessor also can not connect the triggering latch.Hand control switch has three shelves: automatic, Kai Heguan can be provided with a hand control switch to each field apparatus.When whole long distance control system is normally moved, hand control switch is in automatic transmission, when whole long distance control system takes place unusual, during cisco unity malfunction, on-the-spot staff can be as required, selection is opened the pressure of equipment or is forced and closes operation, and by manual control, the loss that machine is brought unusually reduces.Certainly, also can remove hand control switch, promptly trigger latch and directly export digital controlled signal, perhaps trigger latch and hand control switch is not all wanted, directly export digital controlled signal by microprocessor.Back-up source is in order to prevent that the data accident from losing, also can not use back-up source.
The above is preferred embodiment of the present utility model only, is not to be used to limit protection domain of the present utility model.