CN101094110A - System and method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames - Google Patents

System and method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames Download PDF

Info

Publication number
CN101094110A
CN101094110A CN 200710072521 CN200710072521A CN101094110A CN 101094110 A CN101094110 A CN 101094110A CN 200710072521 CN200710072521 CN 200710072521 CN 200710072521 A CN200710072521 A CN 200710072521A CN 101094110 A CN101094110 A CN 101094110A
Authority
CN
China
Prior art keywords
send
immediately
sent completely
completely back
back delay
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.)
Granted
Application number
CN 200710072521
Other languages
Chinese (zh)
Other versions
CN100505650C (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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CNB2007100725218A priority Critical patent/CN100505650C/en
Publication of CN101094110A publication Critical patent/CN101094110A/en
Application granted granted Critical
Publication of CN100505650C publication Critical patent/CN100505650C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is used for solving the issue that is the currently-used technology can't set, detect and display the intra-frame and inter-frame character interval time of Modbus RTU. The Modbus bus interface of first communication unit on master node and the Modbus of second communication unit on slave node are respectively connected on Modbus bus; setting up 3 character interval times in the master node and inputs two frames of transmission message; dividing the types of transmission messages into two types, namely error type 1 and error type 2, and transmitting them; according to the detected time interval, the slave node divides and displays the received messages.

Description

Be provided with and detection display system and method with the interframe character pitch time in the Modbus RTU frame
Technical field
The present invention relates to be provided with the interframe character pitch time in a kind of Modbus RTU frame and detect the technique for displaying field.
Background technology
Field bus technique has been applied to industry spot more and more.The Modbus bus is simple with its agreement especially, implement easily, cost performance is high, reliability advantages of higher and obtained application more and more widely.Setting with the interframe character pitch time in the frame is one of Modbus rtu protocol key technology, the Modbus rtu protocol is by to distinguishing the initial of a frame message and finish with the detection of interframe character pitch time in the message frame, to the character pitch time handle incorrect will cause between the different Mo dbus product incompatible.With interframe character pitch time set and detection, be highly significant in the Modbus RTU frame for understanding the Modbus key technology, designing the Modbus Related product.And how at also not solving with setting and the technique for displaying problem of interframe character pitch time in the ModbusRTU frame.
Summary of the invention
The present invention be for overcome prior art exist can not realize in the Modbus RTU frame with the setting of interframe character pitch time with detect the technique for displaying problem, and then provide in a kind of Modbus RTU frame and to be provided with and to detect display system and method with the interframe character pitch time.
System of the present invention is by host node 1, form from node 2, Modbus bus 3;
Described host node 1 sends button 1-5 by the first keyboard 1-1, first microprocessor unit 1-2, the first display unit 1-3, the first communication unit 1-4, startup and forms; The control data output bus end of the control data output bus end of the first keyboard 1-1, startup transmission button 1-5 connects the control data input bus end of first microprocessor unit 1-2 respectively, the communication data output input bus end of the first communication unit 1-4 connects the communication data output input bus end of first microprocessor unit 1-2, and the video data output bus end of first microprocessor unit 1-2 connects the data input bus (DIB) end of the first display unit 1-3;
Form by the second keyboard 2-1, the second microprocessor unit 2-2, the second display unit 2-3, second communication unit 2-4 from node 2; The control data output bus end of the second keyboard 2-1 connects the control data input bus end of the second microprocessor unit 2-2, the communication data output input bus end of second communication unit 2-4 connects the communication data output input bus end of the second microprocessor unit 2-2, and the video data output bus end of the second microprocessor unit 2-2 connects the data input bus (DIB) end of the second display unit 2-3;
The Modbus bus interface of the first communication unit 1-4 of host node 1, all be connected in turn on the Modbus bus 3 from the Modbus bus interface of the second communication unit 2-4 of node 2.
Being provided with and detecting the method step that shows with the interframe character pitch time in its Modbus RTU frame is:
Step 1, start-up system, initialization host node 1, from node 2, the initialization content comprises timer that each processor unit is set and serial ports mode of operation, each display unit of initialization, and to be provided with from the address of node 2 be that 01h, definition counter variable TCOUNT and its initial value are set to 0;
Step 2, the first keyboard 1-1 by host node 1 were provided with the character pitch time of first microprocessor unit 1-2,3 character pitch times that are provided with are respectively: the t1≤1.5 times character time, 1.5 character time<t2<3.5 times character time doubly, the t3 〉=3.5 times character time;
Step 3, import two frame request messages by the first keyboard 1-1 in the host node 1, be respectively: message 1 is 01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1; Message 2 is 01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
Step 4, the transmission message that host node 1 is set are correct message, promptly meet the Modbus agreement with the interframe character pitch time in the frame; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 5, the character pitch time that the transmission message of host node 1 is set are type of error 1, are about to a frame message and split into two frames; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t3 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t3 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 6, the character pitch time that the transmission message of host node 1 is set are type of error 2, are about to two frame messages and are merged into a frame; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t1 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 7, the character pitch time that the transmission message of host node 1 is set are type of error 3, promptly do not cause producing error character because of blanking time of the adjacent character that sends message meeting the Modbus agreement; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t2 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t2 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 8, receive to interrupt by serial ports and timer overflows the blanking time of interrupting detecting between adjacent two characters from node 2; Timer is operated in automatic heavy duty and goes into pattern, when timing reaches 0.5 times of character during the time, produces to overflow interruption; Whenever receive a character from node 2, promptly produce a serial ports and interrupt, to timer and TCOUNT zero clearing, timer and TCOUNT restart counting immediately in serial ports reception interrupt service routine; Timer whenever overflows once, promptly counter variable TCOUNT is done add-one operation; Value analytic message according to TCOUNT: when TCOUNT≤5, think that a frame message finishes as yet; When 5≤TCOUNT<9, think that the character that received last time is the last character of a frame message, and, think that then this character is an error character if before next timer interrupts, receive new character; When TCOUNT 〉=9, think that the character that receives thereafter is the initial character of a new frame message;
Step 9, from node 2 according to character that receives and the blanking time between the detected adjacent character, come according to the composition of the message frame of being resolved, by the second display unit 2-3 explicit message, be followed successively by:
" message 1:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1;
" message 2:01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 3:01h, 08h, 00h, 00h;
" message 4:AAh, 55h, CRCL1, CRCH1;
" message 5:01h, 06h, 11h, 22h;
" message 6:CCh, 33h, CRCL2, CRCH2;
" message 7:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1,01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 8:01h, 08h, 00h, 00h;
" message 9: error character: AAh, 55h, CRCL1, CRCH1;
" message 10:01h, 06h, 11h, 22h;
" message 11: error character: CCh, 33h, CRCL2, CRCH2 ".
The present invention can be provided with the correct or wrong Modbus RTU message character pitch time, and can detect blanking time and show adjacent character, the visual result that it draws, its message content can embody correct and situations three kinds of mistakes, help to grasp the define mechanism of Modbus RTU character pitch time, help carrying out of Modbus bus education experiment and training the message start-stop.Its system also has advantage of simple structure.
Description of drawings
Fig. 1 is the electrical block diagram of system of the present invention.
Embodiment
Embodiment one: in conjunction with Fig. 1 present embodiment is described, the system of present embodiment is by host node 1, form from node 2, Modbus bus 3;
Described host node 1 sends button 1-5 by the first keyboard 1-1, first microprocessor unit 1-2, the first display unit 1-3, the first communication unit 1-4, startup and forms; The control data output bus end of the control data output bus end of the first keyboard 1-1, startup transmission button 1-5 connects the control data input bus end of first microprocessor unit 1-2 respectively, the communication data output input bus end of the first communication unit 1-4 connects the communication data output input bus end of first microprocessor unit 1-2, and the video data output bus end of first microprocessor unit 1-2 connects the data input bus (DIB) end of the first display unit 1-3;
Form by the second keyboard 2-1, the second microprocessor unit 2-2, the second display unit 2-3, second communication unit 2-4 from node 2; The control data output bus end of the second keyboard 2-1 connects the control data input bus end of the second microprocessor unit 2-2, the communication data output input bus end of second communication unit 2-4 connects the communication data output input bus end of the second microprocessor unit 2-2, and the video data output bus end of the second microprocessor unit 2-2 connects the data input bus (DIB) end of the second display unit 2-3;
The Modbus bus interface of the first communication unit 1-4 of host node 1, all be connected in turn on the Modbus bus 3 from the Modbus bus interface of the second communication unit 2-4 of node 2.
That the microprocessor among described first microprocessor unit 1-2, the second microprocessor unit 2-2 is all selected for use is C8051F021; What the first display unit 1-3, the second display unit 2-3 selected for use is MS12864J model liquid crystal; What the first keyboard 1-1, the second keyboard 2-1 selected for use is the Omron keyboard; What startup transmission button 1-5 selected for use is the Omron button; That the first communication unit 1-4, second communication unit 2-4 select for use is MAX485.
Being provided with and detecting the method step that shows with the interframe character pitch time in its Modbus RTU frame is:
Step 1, start-up system, initialization host node 1, from node 2, the initialization content comprises timer that each processor unit is set and serial ports mode of operation, each display unit of initialization, and to be provided with from the address of node 2 be that 01h, definition counter variable TCOUNT and its initial value are set to 0;
Step 2, the first keyboard 1-1 by host node 1 were provided with the character pitch time of first microprocessor unit 1-2,3 character pitch times that are provided with are respectively: the t1≤1.5 times character time, 1.5 character time<t2<3.5 times character time doubly, the t3 〉=3.5 times character time;
Step 3, import two frame request messages by the first keyboard 1-1 in the host node 1, be respectively: message 1 is 01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1; Message 2 is 01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
Step 4, the transmission message that host node 1 is set are correct message, promptly meet the Modbus agreement with the interframe character pitch time in the frame; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 5, the character pitch time that the transmission message of host node 1 is set are type of error 1, are about to a frame message and split into two frames; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t3 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t3 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 6, the character pitch time that the transmission message of host node 1 is set are type of error 2, are about to two frame messages and are merged into a frame; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t1 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 7, the character pitch time that the transmission message of host node 1 is set are type of error 3, promptly do not cause producing error character because of blanking time of the adjacent character that sends message meeting the Modbus agreement; The startup of pressing in the host node 1 sends button 1-5, the sending order and the time interval that host node 1 sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t2 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t2 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 8, receive to interrupt by serial ports and timer overflows the blanking time of interrupting detecting between adjacent two characters from node 2; Timer is operated in automatic heavy duty and goes into pattern, when timing reaches 0.5 times of character during the time, produces to overflow interruption; Whenever receive a character from node 2, promptly produce a serial ports and interrupt, to timer and TCOUNT zero clearing, timer and TCOUNT restart counting immediately in serial ports reception interrupt service routine; Timer whenever overflows once, promptly counter variable TCOUNT is done add-one operation; Value analytic message according to TCOUNT: when TCOUNT≤5, think that a frame message finishes as yet; When 5≤TCOUNT<9, think that the character that received last time is the last character of a frame message, and, think that then this character is an error character if before next timer interrupts, receive new character; When TCOUNT 〉=9, think that the character that receives thereafter is the initial character of a new frame message;
Step 9, from node 2 according to character that receives and the blanking time between the detected adjacent character, come according to the composition of the message frame of being resolved, by the second display unit 2-3 explicit message, be followed successively by:
" message 1:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1;
" message 2:01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 3:01h, 08h, 00h, 00h;
" message 4:AAh, 55h, CRCL1, CRCH1;
" message 5:01h, 06h, 11h, 22h;
" message 6:CCh, 33h, CRCL2, CRCH2;
" message 7:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1,01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 8:01h, 08h, 00h, 00h;
" message 9: error character: AAh, 55h, CRCL1, CRCH1;
" message 10:01h, 06h, 11h, 22h;
" message 11: error character: CCh, 33h, CRCL2, CRCH2 ".

Claims (2)

1, is provided with the interframe character pitch time in the Modbus RTU frame and detects display system, it is characterized in that it is by host node (1), form from node (2), Modbus bus (3);
Described host node (1) sends button (1-5) by first keyboard (1-1), first microprocessor unit (1-2), first display unit (1-3), first communication unit (1-4), startup and forms; The control data output bus end of the control data output bus end of first keyboard (1-1), startup transmission button (1-5) connects a control data input bus end of first microprocessor unit (1-2) respectively, the communication data output input bus end of first communication unit (1-4) connects the communication data output input bus end of first microprocessor unit (1-2), and the video data output bus end of first microprocessor unit (1-2) connects the data input bus (DIB) end of first display unit (1-3);
Form by second keyboard (2-1), second microprocessor unit (2-2), second display unit (2-3), second communication unit (2-4) from node (2); The control data output bus end of second keyboard (2-1) connects the control data input bus end of second microprocessor unit (2-2), the communication data output input bus end of second communication unit (2-4) connects the communication data output input bus end of second microprocessor unit (2-2), and the video data output bus end of second microprocessor unit (2-2) connects the data input bus (DIB) end of second display unit (2-3);
The Modbus bus interface of first communication unit (1-4) of host node (1), all be connected in turn on the Modbus bus (3) from the Modbus bus interface of the second communication unit (2-4) of node (2).
2, be provided with and the detection display packing with the interframe character pitch time in the Modbus RTU frame, it is characterized in that its method step is:
Step 1, start-up system, initialization host node (1), from node (2), the initialization content comprises timer that each processor unit is set and serial ports mode of operation, each display unit of initialization, and to be provided with from the address of node (2) be that 01h, definition counter variable TCOUNT and its initial value are set to 0;
Step 2, first keyboard (1-1) by host node (1) were provided with the character pitch time of first microprocessor unit (1-2), 3 character pitch times that are provided with are respectively: the t1≤1.5 times character time, 1.5 character time<t2<3.5 times character time doubly, the t3 〉=3.5 times character time;
Step 3, first keyboard (1-1) that passes through in the host node (1) are imported two frame request messages, and be respectively: message 1 is 01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1; Message 2 is 01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
Step 4, the transmission message that host node (1) is set are correct message, promptly meet the Modbus agreement with the interframe character pitch time in the frame; The startup of pressing in the host node (1) sends button (1-5), the sending order and the time interval that host node (1) sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 5, the character pitch time that the transmission message of host node (1) is set are type of error 1, are about to a frame message and split into two frames; The startup of pressing in the host node (1) sends button (1-5), the sending order and the time interval that host node (1) sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t3 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t3 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 6, the character pitch time that the transmission message of host node (1) is set are type of error 2, are about to two frame messages and are merged into a frame; The startup of pressing in the host node (1) sends button (1-5), the sending order and the time interval that host node (1) sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t1 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t1 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 7, the character pitch time that the transmission message of host node (1) is set are type of error 3, promptly do not cause producing error character because of blanking time of the adjacent character that sends message meeting the Modbus agreement; The startup of pressing in the host node (1) sends button (1-5), the sending order and the time interval that host node (1) sends character in the message are: send 01h, be sent completely back delay t1 and send 08h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t1 and send 00h immediately, be sent completely back delay t2 and send AAh immediately, be sent completely back delay t1 and send 55h immediately, be sent completely back delay t1 and send CRCL1 immediately, be sent completely back delay t1 and send CRCH1 immediately, be sent completely back delay t3 and send 01h immediately, be sent completely back delay t1 and send 06h immediately, be sent completely back delay t1 and send 11h immediately, be sent completely back delay t1 and send 22h immediately, be sent completely back delay t2 and send CCh immediately, postpone t1 after being sent completely and send 33h immediately, be sent completely back delay t1 and send CRCL2 immediately, be sent completely back delay t1 and send CRCH2 immediately;
Step 8, receive to interrupt by serial ports and timer overflows the blanking time of interrupting detecting between adjacent two characters from node (2); Timer is operated in automatic heavy duty and goes into pattern, when timing reaches 0.5 times of character during the time, produces to overflow interruption; Whenever receive a character from node (2), promptly produce a serial ports and interrupt, to timer and TCOUNT zero clearing, timer and TCOUNT restart counting immediately in serial ports reception interrupt service routine; Timer whenever overflows once, promptly counter variable TCOUNT is done add-one operation; Value analytic message according to TCOUNT: when TCOUNT≤5, think that a frame message finishes as yet; When 5≤TCOUNT<9, think that the character that received last time is the last character of a frame message, and, think that then this character is an error character if before next timer interrupts, receive new character; When TCOUNT 〉=9, think that the character that receives thereafter is the initial character of a new frame message;
Step 9, from node (2) according to the character that receives and the blanking time between the detected adjacent character, come according to the composition of the message frame of being resolved, by second display unit (2-3) explicit message, be followed successively by:
" message 1:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1;
" message 2:01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 3:01h, 08h, 00h, 00h;
" message 4:AAh, 55h, CRCL1, CRCH1;
" message 5:01h, 06h, 11h, 22h;
" message 6:CCh, 33h, CRCL2, CRCH2;
" message 7:01h, 08h, 00h, 00h, AAh, 55h, CRCL1, CRCH1,01h, 06h, 11h, 22h, CCh, 33h, CRCL2, CRCH2;
" message 8:01h, 08h, 00h, 00h;
" message 9: error character: AAh, 55h, CRCL1, CRCH1;
" message 10:01h, 06h, 11h, 22h;
" message 11: error character: CCh, 33h, CRCL2, CRCH2 ".
CNB2007100725218A 2007-07-18 2007-07-18 Method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames Expired - Fee Related CN100505650C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100725218A CN100505650C (en) 2007-07-18 2007-07-18 Method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100725218A CN100505650C (en) 2007-07-18 2007-07-18 Method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames

Publications (2)

Publication Number Publication Date
CN101094110A true CN101094110A (en) 2007-12-26
CN100505650C CN100505650C (en) 2009-06-24

Family

ID=38992158

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100725218A Expired - Fee Related CN100505650C (en) 2007-07-18 2007-07-18 Method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames

Country Status (1)

Country Link
CN (1) CN100505650C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354175A (en) * 2011-08-01 2012-02-15 李遇浦 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN103067238A (en) * 2012-12-28 2013-04-24 深圳市研控自动化科技有限公司 Data collection method compatible with MODBUS bus
CN103995798A (en) * 2013-02-20 2014-08-20 卡西欧计算机株式会社 Microprocessor and arithmetic processing method
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method
CN105162671A (en) * 2015-09-30 2015-12-16 常州铭赛机器人科技股份有限公司 Welding table control system of arbitrary host and control method thereof
CN108494650A (en) * 2018-02-07 2018-09-04 丽水博远科技有限公司 A kind of binary signaling protocol data link layer transmission frame format
CN112637027A (en) * 2020-12-22 2021-04-09 北京神经元网络技术有限公司 Frame boundary defining device based on UART (universal asynchronous receiver/transmitter), transmitting method and receiving method
CN114697237A (en) * 2022-04-15 2022-07-01 北京广利核系统工程有限公司 Bus communication cycle test system and method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354175A (en) * 2011-08-01 2012-02-15 李遇浦 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN102354175B (en) * 2011-08-01 2014-10-15 李遇浦 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN103067238A (en) * 2012-12-28 2013-04-24 深圳市研控自动化科技有限公司 Data collection method compatible with MODBUS bus
CN103067238B (en) * 2012-12-28 2015-09-30 深圳市研控自动化科技有限公司 A kind of collecting method being compatible with MODBUS bus
CN103995798A (en) * 2013-02-20 2014-08-20 卡西欧计算机株式会社 Microprocessor and arithmetic processing method
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method
CN105162671A (en) * 2015-09-30 2015-12-16 常州铭赛机器人科技股份有限公司 Welding table control system of arbitrary host and control method thereof
CN105162671B (en) * 2015-09-30 2018-04-03 常州铭赛机器人科技股份有限公司 The welding stage control system and its control method of any main frame
CN108494650A (en) * 2018-02-07 2018-09-04 丽水博远科技有限公司 A kind of binary signaling protocol data link layer transmission frame format
CN112637027A (en) * 2020-12-22 2021-04-09 北京神经元网络技术有限公司 Frame boundary defining device based on UART (universal asynchronous receiver/transmitter), transmitting method and receiving method
CN114697237A (en) * 2022-04-15 2022-07-01 北京广利核系统工程有限公司 Bus communication cycle test system and method
CN114697237B (en) * 2022-04-15 2023-12-26 北京广利核系统工程有限公司 Bus communication cycle test system and method

Also Published As

Publication number Publication date
CN100505650C (en) 2009-06-24

Similar Documents

Publication Publication Date Title
CN100505650C (en) Method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames
CN102819512A (en) Full-duplex communication device based on SPI and method thereof
WO2018086282A1 (en) Method and device for controlling overlay comment at front end
CN104375789A (en) Synchronous displaying method and system of tiled display screen
CN101226700A (en) Teaching experimental approach for slicing and regrouping process of IP datagram
CN103793244A (en) Method and device for displaying information on start page
CN100538683C (en) The method and apparatus and the corresponding bus system that are used for the control bus system
CN101895361B (en) Method, system and clock board for transmitting synchronous status message
CN103686199A (en) IPTV multi-window program preview method, system and terminal
CN103412896A (en) Browser resource showing method and system
CN104123125A (en) Webpage resource acquisition method and device
CN101656744B (en) Device and method for retransmitting communication protocol of cash-out machine
CN115794313A (en) Virtual machine debugging method, system, electronic equipment and storage medium
CN104965702A (en) Multi-window running method and device of intelligent terminal and intelligent terminal
CN104917731A (en) Method and system for improving data display speed, server and browser
CN107290988A (en) Robot and its teaching machine communication system and method
CN105530110A (en) Network failure detection method and related network elements
CN104243513A (en) Data transmission device of double-card navigation system
CN100407680C (en) System and method for confirming CAN node message transmission waiting condition and waiting time
CN105068912A (en) Method and apparatus for executing webpage task
JPH10208148A (en) Work indicating method/system in store system
CN100463421C (en) Device and method of detection and display of CAN error frame
CN103176798A (en) Data interaction system and data interaction method
CN105812859A (en) Data processing method and system of module TV input event
CN108984206B (en) Data sending method and equipment

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090624

Termination date: 20100718