Summary of the invention
The technical issues that need to address of the present invention have provided a kind of multi-functional communications capture card and SUPMAX800 system and acquisition method thereof, are intended to solve lack corresponding acquisition means at present, make many on-site signals defective of centralized and unified monitoring veritably.
In order to solve the problems of the technologies described above, the present invention is achieved by the following technical solutions:
Multi-functional communications capture card of the present invention comprises RS232 level switch module, RS485 level switch module, microprocessor control module, read-write module, bus control module; Whether bus control module is used to control read-write module and can be read and write by little processing and control module; The microprocessor control module is accepted from the Transistor-Transistor Logic level signal after changing by RS232 level switch module or RS485 level switch module, and carries out exchanges data by protocol format translation signals data and read-write module;
SUPMAX800 of the present invention system comprises the base plate parallel bus, the multi-functional communications capture card; Fieldbus signal is introduced signal by RS232 connection terminal or RS485 connection terminal, is input to the base plate parallel bus under the control of multi-functional communications capture card;
Acquisition method of the present invention is realized by following steps:
Read read-write module data by the microprocessor control module;
Read RS232 mouth or RS485 mouth data by the microprocessor control module;
Carry out protocol translation and data-switching according to the serial data that reads;
By the microprocessor control module data are write read-write module;
By read-write module serial data is outputed to the base plate parallel bus;
Compared with prior art, the invention has the beneficial effects as follows: the system concept that has realized the scattered control system that supervision is truly concentrated, control disperses; Make cable cost greatly reduce, operate more easy.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described in further detail:
As seen from Figure 1: multi-functional communications capture card of the present invention comprises RS232 level switch module 4, RS485 level switch module 5, microprocessor control module 1, read-write module 2, bus control module 3; Whether bus control module 3 is used to control read-write module 2 can be by little processing and control module 1 read-write; Microprocessor control module 1 is accepted from the Transistor-Transistor Logic level signal after changing by RS232 level switch module 4 or RS485 level switch module 5, and carries out 2 exchanges data by protocol format translation signals data and read-write module;
Microprocessor control module 1 comprises a unit that reads read-write module data, a unit that reads RS232 or RS485 data, a conversion unit of protocol, a unit that data is write read-write module;
Microprocessor control module 1 adopts the G49 chip;
Read-write module 2 adopts dual port RAM;
Dual port RAM adopts IDT7024;
Dual port RAM adopts the SDRAM of 16 * 4K at a high speed, requires and G49 the line is busy operation at the real-time of system; Adopt the working method of the low-power consumption of knowing clearly on the hardware, I reaches 5 milliwatts, has strengthened the reliability of operation greatly; Under the situation of not conflicting in the address, support G49 and the line is busy operation reading of data simultaneously; Operating ambient temperature range is wide, can reach 0 ℃~70 ℃; The whole paster mounting process that adopted has guaranteed the reliability and stability of fastener.
As seen from Figure 2: SUPMAX800 of the present invention system comprises base plate parallel bus 6; Also comprise RS232 connection terminal 8, RS485 connection terminal 9, multi-functional communications capture card 7; Fieldbus signal is introduced signal by RS232 connection terminal 8 or RS485 connection terminal 9, is input to base plate parallel bus 6 under the control of multi-functional communications capture card 7.
As seen from Figure 3: acquisition method of the present invention is realized by following steps:
Read read-write module data 11 by the microprocessor control module;
Read RS232 mouth or RS485 mouth data 12 by the microprocessor control module;
Carry out protocol translation and data-switching 13 according to the serial data that reads;
By the microprocessor control module data are write read-write module 14;
By read-write module serial data is outputed to base plate parallel bus 15;
Wherein: be the serial ports that conversion of signals is become Transistor-Transistor Logic level signal input microprocessor control module by RS232 or RS485 level switch module in the step 12;
Be by agreements such as MODBUS, MODBUS+ and User Defineds in the step 13;
At first G49 and dual port RAM are carried out initialization during program start or when moving for the first time, whether the current state of cycle criterion bus controller is readable in cycle working time then; If readable, then read by the defined dual port RAM of address code-disc address area data and put into temporary space; Read the data of G49 serial ports, this data layout transmits according to the MODBUS or the MODBUS+ agreement of international standard; Carry out protocol conversion according to these data, carry out data answering, mainly divide following four types by the requirement that signal provides:
1) switching value input data: protocol code is 1, according to its address requirement, data is put into temporary space;
2) analog quantity input data: protocol code 3,,, data are put into temporary space according to its address requirement;
3) switching value output data: protocol code 15, according to the address requirement, reading of data from temporary space;
4) analog quantity output data: protocol code 16, according to the address requirement, reading of data from temporary space;
Judge whether the current state of bus controller can be write; If can write, then the data with temporary space write by the defined dual port RAM of address code-disc address area data;
Press protocol format, write serial ports answer data signal;
Below principle of the present invention is described as follows:
Multi-functional communications capture card major function is to utilize RS232 and RS485 as transmission medium input multi-functional communications capture card by the fieldbus signal that meets international communication standard MODBUS and MODBUS+ agreement on-site signal, carry out the data processing conversion by multi-function data acquisition card, become the data mode that satisfies SUPMAX800 system communication bus and be transferred to the SUPMAX800 system, become the data message that the SUPMAX800 system can monitor;
The hardware scheme of this card is to gather the RS232/485 signal and resolve to Physical layer, carries out physical layer signal with G49 and receives, and sends to and carries out the software protocol processing in the dual port RAM, by total line traffic control, converts the parallel bus form of SUPMAX800 to;
The software of this card mainly is to gather rs 232 serial interface signal mainly by the operation of G49 chip, carries out exchanges data with dual port RAM.Wherein data type is divided into digital quantity input, digital quantity output, analog quantity is imported and analog quantity is exported four types.