CN106875664A - A kind of exclusive formula collecting method based on CAN - Google Patents

A kind of exclusive formula collecting method based on CAN Download PDF

Info

Publication number
CN106875664A
CN106875664A CN201710254614.6A CN201710254614A CN106875664A CN 106875664 A CN106875664 A CN 106875664A CN 201710254614 A CN201710254614 A CN 201710254614A CN 106875664 A CN106875664 A CN 106875664A
Authority
CN
China
Prior art keywords
data
acquisition terminal
terminal
acquisition
message
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
CN201710254614.6A
Other languages
Chinese (zh)
Other versions
CN106875664B (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.)
China Shipbuilding Digital Information Technology Co ltd
Original Assignee
LIANYUNGANG JIERUI DEEPSOFT TECHNOLOGY Co Ltd
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 LIANYUNGANG JIERUI DEEPSOFT TECHNOLOGY Co Ltd filed Critical LIANYUNGANG JIERUI DEEPSOFT TECHNOLOGY Co Ltd
Priority to CN201710254614.6A priority Critical patent/CN106875664B/en
Publication of CN106875664A publication Critical patent/CN106875664A/en
Application granted granted Critical
Publication of CN106875664B publication Critical patent/CN106875664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40039Details regarding the setting of the power status of a node according to activity on the bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The present invention is a kind of exclusive formula collecting method based on CAN, and the method is the exclusive formula collecting method based on CAN multiple terminals, realizes the data communication between a set of " data summarization end " and N sets " acquisition terminal ";" data summarization end " and " acquisition terminal " are smart machines;By a CAN cable between N sets " acquisition terminal ", using in hand-in-hand mode parallel connection CAN, it is ultimately attached at " data summarization end ".Including:Exclusive " one-to-one " communication of formula, exclusive formula " one-to-many " polling communication and urgency communication.The mutual cooperation method of " urgent position " and " command code " two kinds of flag bits is devised, by the priority for adjusting message in varied situations, it is ensured that the real-time transmission and response of emergency data.The present invention has a wide range of application, performance boost decades of times, strong to the real-time response ability of emergency data, and " acquisition terminal " quantity is more, more obvious using technique effect of the invention.

Description

A kind of exclusive formula collecting method based on CAN
Technical field
The present invention relates to a kind of collecting method, particularly a kind of exclusive formula collecting method based on CAN.
Background technology
In numerous fieldbus, CAN is more next due to having the advantages that prominent reliability, real-time and flexibility More favored by people, correspondingly, the product demand market based on CAN expands day by day, using also more and more wider It is general.
Data acquisition is from its exterior gathered data and to be input to a kind of interface skill of internal system using a kind of device Art, at interval of certain hour(Claim the sampling period)Same point Data duplication is gathered, every field is widely used in.With interconnection The fast development of net industry, data acquisition has been widely used in internet and field of distributed type, and data acquisition is brought into One brand-new epoch.
Periodic data acquisition uses the work framework of client/server, and data summarization end is used as client computer, collection Terminal, when data summarization end needs gathered data, command request, acquisition terminal response is sent to acquisition terminal as server Command request, returns to the data to be gathered.According to this communication process, within a sampling period, complete remaining to adopt other Collect the data acquisition of terminal.Its defect is:Within a sampling period, data center sends repeatedly same command request, In CAN, same acquisition terminal can receive repeatedly same command request, add command processing time, greatly waste Communication bandwidth.In addition, when acquisition terminal needs to send emergency data, the real-time response time of data center does not know.It is best Response condition be inquiry specify acquisition terminal when, the terminal just need send emergency data;Worst response condition is When first acquisition terminal is inquired about, last acquisition terminal needs to send emergency data.
The content of the invention
The technical problems to be solved by the invention are directed to the deficiencies in the prior art, there is provided a kind of in real time, to be efficiently based on The exclusive formula collecting method of CAN.
The technical problems to be solved by the invention are realized by following technical scheme.The present invention is that one kind is based on The exclusive formula collecting method of CAN, is characterized in:
The method is the exclusive formula collecting method based on CAN multiple terminals, realizes a set of " data summarization end " and N sets Data communication between " acquisition terminal ", N is positive integer;Described " data summarization end " and " acquisition terminal " are hard with CAN The smart machine of part interface and energy configuration processor code characteristic;By a CAN cable between N sets " acquisition terminal ", adopt With in hand-in-hand mode parallel connection CAN, it is ultimately attached at " data summarization end ";
The collecting method includes:Exclusive " one-to-one " communication of formula;In CAN, " data summarization end " is to specified " acquisition terminal " of identifier value initiates command request, is only somebody's turn to do the request of " acquisition terminal " response command, and return to response data;
Exclusive formula " one-to-many " polling communication;By configuring " father's terminal ", " data summarization end " need to only send a subcommand please Seek the data acquisition that can just complete a cycle;
Urgency communication;The mutual cooperation method of " urgent position " and " command code " two kinds of flag bits is devised, by different situations The priority of lower adjustment message, it is ensured that the real-time transmission and response of emergency data.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:Described smart machine is PC computers.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:The method supports the CAN hardware of CAN 2.0A or CAN2.0B agreements;M bit identifiers, Y >=M >=3, for CAN are used 2.0A hardware, Y is equal to 11, and for CAN 2.0B hardware, Y is equal to 29;Identifier is stored in the identifier domain of CAN message.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:The identifier of " data summarization end " and " acquisition terminal " use different numerical value, and " data summarization end " identifier number Value is minimum;Define identifier minimum one is urgent position, is defaulted as " 1 " and represents normal condition communication, and " 0 " represents urgent number According to communication;Using the bit (M-2) of identifier | bit (M-1) two is used as command code;Bit0 represents the lowest order of identifier, bit (M-1)Represent the highest order of identifier.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:Using following methods definition command code in " data summarization end ":
(1)" 11b " represents that data summarization end sends data polling order, and since request returned successively specifying x-th acquisition terminal Each data acquisition of terminal is returned, x is the identifier of the acquisition terminal, and x is stored in the data field of CAN message;
(2)" 10b " represents that data summarization end sends particular command and asks to x-th acquisition terminal, and x is the mark of the acquisition terminal Symbol, x is stored in the data field of CAN message with particular command request;
Using following methods definition command code in " acquisition terminal ":
" 11b " data polling command request that A, " 11b " and " 10b " expression " acquisition terminal " response " data summarization end " send; The data is activation that wherein " 10b " represents current is not over;The data is activation that " 11b " represents current is over;
B, urgent position be " 1 " when, " 10b " that " 00b " and " 01b " expression " acquisition terminal " response " data summarization end " sends Particular command is asked;The data is activation that wherein " 00b " represents current is not over;" 01b " represents current data is activation Through terminating;
(3)When urgent position is " 0 ", " 00b " and " 01b " expression " acquisition terminal " sends provisional orders to " data summarization end " please Ask;The data is activation that wherein " 00b " represents current is not over;The data is activation that " 01b " represents current is over.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:The method is initiated using exclusive formula One-to-one communication, i.e. data summarization end to the acquisition terminal with designated identification identifier value Command request, only the acquisition terminal response command are asked, and return to response data;Configuration father's terminal procedures belong to one-to-one logical Letter, data summarization end sends " 10b " command request bag, identifier is contained in the data field of command request bag to specified acquisition terminal There is value, command request the acquisition terminal of the identifier value to be configured to father's terminal of the terminal, and the terminal receives order please After asking, response configuration is carried out, configuration result is reported and gives data summarization end;Configuration father's terminal is realized and allows the acquisition terminal can be with The CAN message from father's terminal is received, for the one-to-many polling communication of the formula of monopolizing.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:The method is using exclusive formula " one-to-many " polling communication:" data summarization end " initiates inquiry to multiple " acquisition terminals " please Ask, it is desirable to which they return to respective gathered data " data summarization end ", " one-to-many " communication is periodic data communication Process;In " one-to-many " communication cycle, " data summarization end " need to only send a command request, multiple " acquisition terminals " Respond successively, return to the gathered data of this terminal;
(1)" data summarization end " includes " acquisition terminal to " 11b " command request is sent in CAN in the data field of message The identifier value of 1# ", it is desirable to which " acquisition terminal 1# " returns to its gathered data;
(2)All " acquisition terminals " in CAN can receive " 11b " the command request message at " data summarization end ", By judging the identifier value in message data domain, " acquisition terminal 1# " meets requirement, its response command request, to " data summarization End " returns to gathered data, and other " acquisition terminals " ignores the command message;
(3)" acquisition terminal 1# " is " father's terminal " of " acquisition terminal 2# ", and " acquisition terminal 2# " can simultaneously receive " collection The response message of terminal 1# ", " acquisition terminal 1# " judge identifier in message urgent position whether " 0 ", if " 0 ", then neglect The slightly message;In this way " 1 ", then it is handled as follows by recognizing " command code " of identifier in response message again:
(i)When " command code " is non-" 11b ", " acquisition terminal 2# " ignores the message, does not process;
(ii)When " command code " is " 11b ", " acquisition terminal 2# " returns to itself gathered data to " data summarization end ";
And other " acquisition terminals " then directly ignores the response message of " acquisition terminal 1# ", do not process;
(4)" acquisition terminal 2# " is " father's terminal " of " acquisition terminal 3# ", and " acquisition terminal 3# " can simultaneously be received and " gathered eventually End 2# " response message, " acquisition terminal 2# " judge identifier in message urgent position whether " 0 " ", if " 0 ", then ignore The message;In this way " 1 ", then it is handled as follows by recognizing " command code " of identifier in response message again:
(i)When " command code " is non-" 11b ", " acquisition terminal 2# " ignores the message, does not process;
(ii)When " command code " is " 11b ", " acquisition terminal 2# " returns to itself gathered data to " data summarization end ";
And other " acquisition terminals " then directly ignores the response message of " acquisition terminal 2# ", do not process;
(5)By that analogy, last " acquisition terminal N# " returns to gathered data to " data summarization end ", completes a week The data acquisition of phase.
A kind of exclusive formula collecting method based on CAN of the present invention, its further preferred technical side Case is:" urgency communication " of the method is that " acquisition terminal " actively sends data to " data summarization end ";" acquisition terminal a " needs During urgency communication, " the urgent position " of identifier is set to " 0 ", the priority of the polling communication that compares, " acquisition terminal a " has more High priority, therefore periodic polling communication process will be interrupted, it is ensured that emergency data is preferentially passed at " data summarization end "; " the urgent position " that self identification is accorded with is set to " 0 ", now " data summarization end " by " data summarization end " after urgent messages are received Message will be with limit priority, when the emergency data for also having other " acquisition terminals " in CAN will send, it will quilt Transmission process is interrupted, after waiting a response message to be sent to " acquisition terminal a " at first, " acquisition terminal " being interrupted could continue hair Send data;
By that analogy, the urgency communication process of other-end is completed.
When in extreme circumstances, having multiple " acquisition terminals " while there is exception, urgent report is sent to " data summarization end " Text, now CAN can enter arbitration mechanism, send data successively according to the height of priority;" data summarization end " is receiving To after urgent messages, " the urgent position " that self identification is accorded with is set to " 0 ", now the message at " data summarization end " will be excellent with highest Response message, corresponding " acquisition terminal " is sent to according to the order for receiving urgent messages by first level successively, finally completes whole The urgency communication of " acquisition terminal ".
Compared with prior art, the present invention and the present invention for further designing have following remarkable advantage:
1st, " data summarization end " and " acquisition terminal " preferably PC but is not limited to PC, with described CAN hardware interfaces and The smart machine of energy configuration processor code characteristic all meets technical requirements, has a wide range of application.
2nd, can support greater number of " acquisition terminal ", performance boost decades of times, and " acquisition terminal " quantity is more, adopts It is more obvious with technique effect of the invention.
3rd, the real-time response ability to emergency data is strong, and using the technology of the present invention, " acquisition terminal " is withouted waiting for can Directly to send emergency data requirement treatment.Even if in extreme circumstances, having m " acquisition terminal " while requiring to send urgent number According to " acquisition terminal " of lowest priority is most long to be needed to wait(m-1)The time of × 0.4ms(With the rate calculations of 250kb/s).
Brief description of the drawings
Fig. 1 is a kind of data acquisition modes classification of exclusive formula collecting method based on CAN of the present invention;
Fig. 2 is a kind of hardware structure diagram of the invention;
Fig. 3 is the identifier definition figure of CAN message;
Fig. 4 is the communication process figure of exclusive formula " one-to-many " polling communication;
Fig. 5 initiates the communication process figure of urgency communication when being many " acquisition terminals " difference corresponding to urgency communication;
Fig. 6 is many " acquisition terminals " corresponding to urgency communication while initiating the communication process figure of urgency communication.
Specific embodiment
Referring to the drawings, concrete technical scheme of the invention is further described, is entered in order to those skilled in the art One step ground understands the present invention, without constituting the limitation to its right.
Reference picture 1, a kind of exclusive formula collecting method based on CAN, the method is based on CAN multiple terminals Exclusive formula collecting method, realize the data communication between a set of " data summarization end " and N sets " acquisition terminal ", N is for just Integer;Described " data summarization end " and " acquisition terminal " are the intelligence with CAN hardware interfaces and energy configuration processor code characteristic Can equipment;By a CAN cable between N sets " acquisition terminal ", using in hand-in-hand mode parallel connection CAN, most It is connected to eventually at " data summarization end ".
The method includes:
Exclusive " one-to-one " communication of formula, in CAN, " data summarization end " is to " acquisition terminal " with designated identification identifier value Command request is initiated, the request of " acquisition terminal " response command is only somebody's turn to do, and return to response data;
Exclusive formula " one-to-many " polling communication, by configuring " father's terminal ", " data summarization end " need to only send a subcommand please Seek the data acquisition that can just complete a cycle;
Urgency communication, devises the mutual cooperation method of " urgent position " and " command code " two kinds of flag bits, by different situations The priority of lower adjustment message, it is ensured that the real-time transmission and response of emergency data.
Reference picture 2, a kind of exclusive formula collecting method based on CAN:Support CAN 2.0A or CAN 2.0B associations The CAN hardware of view.Overall hardware configuration includes:CAN, N number of " acquisition terminal " and a data summarization end, and should all support CAN 2.0A or CAN 2.0B agreements.
Reference picture 3, uses M bit identifiers(Y≥M≥3), for CAN 2.0A hardware, Y is equal to 11, for CAN 2.0B Hardware, Y is equal to 29.Identifier is stored in the identifier domain of CAN message.
A minimum bit0 of identifier is urgent position, and default value is " 1 ", represents normal condition communication, and value " 0 " represents tight Anxious data communication;The highest one of identifier is bit(M-1), use minimum two bit of identifier(M-2)| bit(M-1) As command code.
The identifier of " data summarization end " and " acquisition terminal " uses different numerical value, and " data summarization end " identifier Numerical value is minimum.The priority of message is determined that identifier value is smaller by identifier value, and priority is higher, with preferential total using CAN The right of line.
The mutual cooperation method of " urgent position " and " command code " flag bit according to this principle design.The following is to command code Using definition:
(1)The definition of command code is used in " data summarization end ":
" 11b " expression " data summarization end " sends data polling order, asks since x-th " acquisition terminal " is specified, successively Each data acquisition of terminal is returned to, x is the identifier for being somebody's turn to do " acquisition terminal ", and x is stored in the data field of CAN message.
" 10b " expression " data summarization end " sends particular command and asks to x-th " acquisition terminal ", and " collection is eventually to be somebody's turn to do for x The identifier at end ", x is stored in the data field of CAN message with particular command request.
(2)The definition of command code is used in " acquisition terminal ":
" 11b " data polling command request that " 11b " and " 10b " expression " acquisition terminal " response " data summarization end " sends.Its In " 10b " represent that current data is activation is not over;The data is activation that " 11b " represents current is over.
When urgent position is " 1 ", " 10b " that " 00b " and " 01b " expression " acquisition terminal " response " data summarization end " sends Particular command is asked.The data is activation that wherein " 00b " represents current is not over;" 01b " represents current data is activation Through terminating.
When urgent position is " 0 ", " 00b " and " 01b " expression " acquisition terminal " sends provisional orders to " data summarization end " Request.The data is activation that wherein " 00b " represents current is not over;The data is activation that " 01b " represents current is over.
Reference picture 3-4, monopolizes formula " one-to-many " polling communication, and its step is as follows:
Step one:" data summarization end " includes in the data field of message and " gathers eventually to " 11b " command request is sent in CAN The identifier value of end 1# ", it is desirable to which " acquisition terminal 1# " returns to its gathered data;
Step 2:All " acquisition terminals " in CAN can all receive " data summarization end " " 11b " command request report Text, by judging the identifier value in message data domain, " acquisition terminal 1# " meets requirement, its response command request, to " data are converged Total end " returns to gathered data, and other " acquisition terminals " ignores the command message;
Step 3:" acquisition terminal " 1# " is " father's terminal " of " acquisition terminal 2# ", and " acquisition terminal 2# " can be received simultaneously The response message of " acquisition terminal 1# ", " acquisition terminal 1# " judge identifier in message urgent position whether " 0 ", if " 0 ", Then ignore the message;In this way " 1 ", then it is handled as follows by recognizing " command code " of identifier in response message again:
(1)When " command code " is non-" 11b ", " acquisition terminal 2# " ignores the message, does not process;
(2)When " command code " is " 11b ", " acquisition terminal 2# " returns to itself gathered data to " data summarization end ";Other " collections Terminal " then ignores the response message of " acquisition terminal 1# ", does not deal with;
Step 4:The process as described in step 3, last " acquisition terminal N " is returned to " data summarization end " and gathered Data, that is, complete the data acquisition of a cycle.
Wherein, the configuration process of described " father's terminal " belongs to " one-to-one " communication." data summarization end " " adopts to specified Collection terminal " sends " 10b " command request bag, and identifier value is contained in the data field of command request bag, and command request is with the mark " acquisition terminal " of identifier value is configured to " father's terminal " of the terminal, after the terminal receives command request, carries out response and matches somebody with somebody Put, configuration result is reported to " data summarization end ".Configuration " father's terminal " is come to allow " acquisition terminal " can receive The CAN message of " father's terminal ", so as to be applied to exclusive formula " one-to-many " polling communication.
Reference picture 5-6, described urgency communication, its step is as follows:
(1)The identifier " urgent position " of transmitted message is set to " 0 " by " acquisition terminal ", to obtain current highest priority;
(2)After " data summarization end " receives message, the transmitted identifier " urgent position " for obtaining response message is set to " 0 ", to take Obtain limit priority, it is ensured that the real-time transmission and response of emergency data.
Reference picture 5, urgency communication is that " acquisition terminal " actively sends data to " data summarization end ", and " acquisition terminal a " is needed When wanting urgency communication, " the urgent position " of identifier is set to " 0 ", the priority of the polling communication that compares, " acquisition terminal a " has Higher priority, therefore periodic polling communication process will be interrupted, it is ensured that emergency data preferentially passes to " data summarization End "." the urgent position " that self identification is accorded with is set to " 0 " by " data summarization end " after urgent messages are received, and now " data are converged The message at total end " will will send with limit priority, the emergency data for also having other " acquisition terminals " such as in CAN, Transmission process will be interrupted, after waiting a response message to be sent to " acquisition terminal a " at first, " acquisition terminal " ability being interrupted Continue to send data.By that analogy, the urgency communication process of other-end is completed.
Reference picture 6, in extreme circumstances, has multiple " acquisition terminals " while there is exception, is sent out to " data summarization end " Urgent messages are sent, now CAN can enter arbitration mechanism, and data are sent successively according to the height of priority." data summarization " the urgent position " that self identification is accorded with is set to " 0 " by end " after urgent messages are received, and now the message at " data summarization end " will With limit priority, response message is sent to corresponding " acquisition terminal " successively according to the order for receiving urgent messages, most The urgency communication of all " acquisition terminal " is completed afterwards.In this way, can make the acquisition terminal of different priorities can be Emergency data is reported to " data summarization end " and priority treatment is obtained in shortest time.

Claims (9)

1. a kind of exclusive formula collecting method based on CAN, it is characterised in that:
The method is the exclusive formula collecting method based on CAN multiple terminals, realizes a set of " data summarization end " and N sets Data communication between " acquisition terminal ", N is positive integer;Described " data summarization end " and " acquisition terminal " are hard with CAN The smart machine of part interface and energy configuration processor code characteristic;By a CAN cable between N sets " acquisition terminal ", adopt With in hand-in-hand mode parallel connection CAN, it is ultimately attached at " data summarization end ";
Its collecting method includes:
Exclusive " one-to-one " communication of formula;In CAN, " data summarization end " is to " acquisition terminal " with designated identification identifier value Command request is initiated, the request of " acquisition terminal " response command is only somebody's turn to do, and return to response data;
Exclusive formula " one-to-many " polling communication;By configuring " father's terminal ", " data summarization end " need to only send a subcommand please Seek the data acquisition that can just complete a cycle;
Urgency communication;The mutual cooperation method of " urgent position " and " command code " two kinds of flag bits is devised, by different situations The priority of lower adjustment message, it is ensured that the real-time transmission and response of emergency data.
2. a kind of exclusive formula collecting method based on CAN according to claim 1, it is characterised in that:It is described Smart machine be PC computers.
3. a kind of exclusive formula collecting method based on CAN according to claim 1, it is characterised in that:The party Method supports the CAN hardware of CAN 2.0A or CAN2.0B agreements;M bit identifiers are used, Y >=M >=3 are hard for CAN 2.0A Part, Y is equal to 11, and for CAN 2.0B hardware, Y is equal to 29;Identifier is stored in the identifier domain of CAN message.
4. a kind of exclusive formula collecting method based on CAN according to claim 1, it is characterised in that:" data Collect end " and " acquisition terminal " identifier using different numerical value, and the numerical value of " data summarization end " identifier is minimum;It is fixed Minimum one of adopted identifier is urgent position, is defaulted as " 1 " and represents normal condition communication, and " 0 " represents emergency data communication;Make With the bit (M-2) of identifier | bit (M-1) two is used as command code;Bit0 represents the lowest order of identifier, bit(M-1)Represent The highest order of identifier.
5. a kind of exclusive formula collecting method based on CAN according to claim 1-4 any one, it is special Levy and be:Using following methods definition command code in " data summarization end ":
(1)" 11b " represents that data summarization end sends data polling order, and since request returned successively specifying x-th acquisition terminal Each data acquisition of terminal is returned, x is the identifier of the acquisition terminal, and x is stored in the data field of CAN message;
(2)" 10b " represents that data summarization end sends particular command and asks to x-th acquisition terminal, and x is the mark of the acquisition terminal Symbol, x is stored in the data field of CAN message with particular command request;
Using following methods definition command code in " acquisition terminal ":
" 11b " data polling command request that A, " 11b " and " 10b " expression " acquisition terminal " response " data summarization end " send; The data is activation that wherein " 10b " represents current is not over;The data is activation that " 11b " represents current is over;
B, urgent position be " 1 " when, " 10b " that " 00b " and " 01b " expression " acquisition terminal " response " data summarization end " sends Particular command is asked;The data is activation that wherein " 00b " represents current is not over;" 01b " represents current data is activation Through terminating;
(3)When urgent position is " 0 ", " 00b " and " 01b " expression " acquisition terminal " sends provisional orders to " data summarization end " please Ask;The data is activation that wherein " 00b " represents current is not over;The data is activation that " 01b " represents current is over.
6. a kind of exclusive formula collecting method based on CAN according to claim 5, it is characterised in that:The party Method initiates command request using exclusive formula One-to-one communication, i.e. data summarization end to the acquisition terminal with designated identification identifier value, Only acquisition terminal response command request, and return to response data;Configuration father's terminal procedures belong to One-to-one communication, and data are converged Always hold and send " 10b " command request bag to specified acquisition terminal, identifier value is contained in the data field of command request bag, order please Ask the acquisition terminal with the identifier value to be configured to father's terminal of the terminal, after the terminal receives command request, carry out Response configuration, configuration result is reported and gives data summarization end;Configuration father's terminal realizes and the acquisition terminal can be received come from The CAN message of father's terminal, for the one-to-many polling communication of the formula of monopolizing.
7. a kind of exclusive formula collecting method based on CAN according to claim 5, it is characterised in that the party Method is using exclusive formula " one-to-many " polling communication:" data summarization end " initiates inquiry request to multiple " acquisition terminals ", it is desirable to it Respective gathered data is returned at " data summarization end ", " one-to-many " communication is periodic data communication process;One In individual " one-to-many " communication cycle, " data summarization end " need to only send a command request, and multiple " acquisition terminals " is responded successively, Return to the gathered data of this terminal;
(1)" data summarization end " includes " acquisition terminal to " 11b " command request is sent in CAN in the data field of message The identifier value of 1# ", it is desirable to which " acquisition terminal 1# " returns to its gathered data;
(2)All " acquisition terminals " in CAN can receive " 11b " the command request message at " data summarization end ", By judging the identifier value in message data domain, " acquisition terminal 1# " meets requirement, its response command request, to " data summarization End " returns to gathered data, and other " acquisition terminals " ignores the command message;
(3)" acquisition terminal 1# " is " father's terminal " of " acquisition terminal 2# ", and " acquisition terminal 2# " can simultaneously receive " collection The response message of terminal 1# ", " acquisition terminal 1# " judge identifier in message urgent position whether " 0 ", if " 0 ", then neglect The slightly message;In this way " 1 ", then it is handled as follows by recognizing " command code " of identifier in response message again:
(i)When " command code " is non-" 11b ", " acquisition terminal 2# " ignores the message, does not process;
(ii)When " command code " is " 11b ", " acquisition terminal 2# " returns to itself gathered data to " data summarization end ";
And other " acquisition terminals " then directly ignores the response message of " acquisition terminal 1# ", do not process;
(4)" acquisition terminal 2# " is " father's terminal " of " acquisition terminal 3# ", and " acquisition terminal 3# " can simultaneously be received and " gathered eventually End 2# " response message, " acquisition terminal 2# " judge identifier in message urgent position whether " 0 " ", if " 0 ", then ignore The message;In this way " 1 ", then it is handled as follows by recognizing " command code " of identifier in response message again:
(i)When " command code " is non-" 11b ", " acquisition terminal 2# " ignores the message, does not process;
(ii)When " command code " is " 11b ", " acquisition terminal 2# " returns to itself gathered data to " data summarization end ";
And other " acquisition terminals " then directly ignores the response message of " acquisition terminal 2# ", do not process;
(5)By that analogy, last " acquisition terminal N# " returns to gathered data to " data summarization end ", completes a week The data acquisition of phase.
8. a kind of exclusive formula collecting method based on CAN according to claim 5, it is characterised in that:The party " urgency communication " of method is that " acquisition terminal " actively sends data to " data summarization end ";" acquisition terminal a " needs urgency communication When, " the urgent position " of identifier is set to " 0 ", the priority of the polling communication that compares, " acquisition terminal a " has higher preferential Level, therefore periodic polling communication process will be interrupted, it is ensured that emergency data is preferentially passed at " data summarization end ";" data Collect end " after urgent messages are received, " the urgent position " that self identification is accorded with is set to " 0 ", now the report at " data summarization end " Text will be with limit priority, when the emergency data for also having other " acquisition terminals " in CAN will send, it will be interrupted Transmission process, after waiting a response message to be sent to " acquisition terminal a " at first, " acquisition terminal " being interrupted could continue to send number According to;
By that analogy, the urgency communication process of other-end is completed.
9. a kind of exclusive formula collecting method based on CAN according to claim 8, it is characterised in that:When Under extreme case, there is multiple " acquisition terminals " while there is exception, urgent messages are sent to " data summarization end ", now CAN is total Line can enter arbitration mechanism, and data are sent successively according to the height of priority;" data summarization end " after urgent messages are received, " the urgent position " that self identification is accorded with is set to " 0 ", now the message at " data summarization end " will be with limit priority, according to reception Response message is sent to corresponding " acquisition terminal " by the order of urgent messages successively, finally completes the tight of whole " acquisition terminal " Anxious communication.
CN201710254614.6A 2017-04-18 2017-04-18 Exclusive data acquisition method based on CAN bus Active CN106875664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710254614.6A CN106875664B (en) 2017-04-18 2017-04-18 Exclusive data acquisition method based on CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710254614.6A CN106875664B (en) 2017-04-18 2017-04-18 Exclusive data acquisition method based on CAN bus

Publications (2)

Publication Number Publication Date
CN106875664A true CN106875664A (en) 2017-06-20
CN106875664B CN106875664B (en) 2020-07-03

Family

ID=59163090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710254614.6A Active CN106875664B (en) 2017-04-18 2017-04-18 Exclusive data acquisition method based on CAN bus

Country Status (1)

Country Link
CN (1) CN106875664B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483313A (en) * 2017-10-14 2017-12-15 连云港杰瑞深软科技有限公司 A kind of collecting method and system based on cascade ethernet device
CN111262766A (en) * 2020-01-17 2020-06-09 北京汽车股份有限公司 Method, device and system for transmitting multi-packet application message data
CN112165420A (en) * 2020-08-27 2021-01-01 深圳市优必选科技股份有限公司 Message processing method, message processing device, robot system and CAN (controller area network) equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089059A1 (en) * 2003-10-24 2005-04-28 Fuji Xerox Co., Ltd. Controller area network (CAN) based communication system with multiple bus connected nodes
CN1838011A (en) * 2006-04-04 2006-09-27 西安电子科技大学 Intelligent management apparatus and management method for distributed control network based on CAN bus
CN101626333A (en) * 2009-08-07 2010-01-13 北京和利时电机技术有限公司 Controller area network (CAN) bus system and application layer communication method in same
CN101867570A (en) * 2010-05-13 2010-10-20 浙江大学 CAN-based communication method in embedded software reliability test
CN102984096A (en) * 2012-10-12 2013-03-20 中国船舶重工集团公司第七一九研究所 Assembling method for controller area network (CAN) data frames applied in ship dynamic information acquisition device
CN104333517A (en) * 2014-09-28 2015-02-04 航天科工深圳(集团)有限公司 Automation equipment communication method based on CAN bus
CN104950765A (en) * 2015-06-23 2015-09-30 合肥工业大学 Inverter parallel system based on CAN (controller area network) bus and carrier synchronization method of inverter parallel system
CN105119793A (en) * 2015-07-20 2015-12-02 电子科技大学 Identifier distribution method of sensor network CAN bus frame format
CN106066836A (en) * 2015-04-20 2016-11-02 Ls产电株式会社 Data transmission and reception system
CN106125716A (en) * 2016-06-27 2016-11-16 淮安信息职业技术学院 Vehicle teaching device line intelligent fault checking system workflow based on CAN
CN106205013A (en) * 2016-07-14 2016-12-07 中车青岛四方车辆研究所有限公司 Smoke detector based on automatic addressing mode and the means of communication
CN106330643A (en) * 2016-10-31 2017-01-11 威胜电气有限公司 Communication method of one-host and multi-slave communication network and communication device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089059A1 (en) * 2003-10-24 2005-04-28 Fuji Xerox Co., Ltd. Controller area network (CAN) based communication system with multiple bus connected nodes
CN1838011A (en) * 2006-04-04 2006-09-27 西安电子科技大学 Intelligent management apparatus and management method for distributed control network based on CAN bus
CN101626333A (en) * 2009-08-07 2010-01-13 北京和利时电机技术有限公司 Controller area network (CAN) bus system and application layer communication method in same
CN101867570A (en) * 2010-05-13 2010-10-20 浙江大学 CAN-based communication method in embedded software reliability test
CN102984096A (en) * 2012-10-12 2013-03-20 中国船舶重工集团公司第七一九研究所 Assembling method for controller area network (CAN) data frames applied in ship dynamic information acquisition device
CN104333517A (en) * 2014-09-28 2015-02-04 航天科工深圳(集团)有限公司 Automation equipment communication method based on CAN bus
CN106066836A (en) * 2015-04-20 2016-11-02 Ls产电株式会社 Data transmission and reception system
CN104950765A (en) * 2015-06-23 2015-09-30 合肥工业大学 Inverter parallel system based on CAN (controller area network) bus and carrier synchronization method of inverter parallel system
CN105119793A (en) * 2015-07-20 2015-12-02 电子科技大学 Identifier distribution method of sensor network CAN bus frame format
CN106125716A (en) * 2016-06-27 2016-11-16 淮安信息职业技术学院 Vehicle teaching device line intelligent fault checking system workflow based on CAN
CN106205013A (en) * 2016-07-14 2016-12-07 中车青岛四方车辆研究所有限公司 Smoke detector based on automatic addressing mode and the means of communication
CN106330643A (en) * 2016-10-31 2017-01-11 威胜电气有限公司 Communication method of one-host and multi-slave communication network and communication device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483313A (en) * 2017-10-14 2017-12-15 连云港杰瑞深软科技有限公司 A kind of collecting method and system based on cascade ethernet device
CN107483313B (en) * 2017-10-14 2023-09-08 中船重工信息科技有限公司 Data acquisition method and system based on cascade Ethernet equipment
CN111262766A (en) * 2020-01-17 2020-06-09 北京汽车股份有限公司 Method, device and system for transmitting multi-packet application message data
CN111262766B (en) * 2020-01-17 2021-11-23 北京汽车股份有限公司 Method, device and system for transmitting multi-packet application message data
CN112165420A (en) * 2020-08-27 2021-01-01 深圳市优必选科技股份有限公司 Message processing method, message processing device, robot system and CAN (controller area network) equipment

Also Published As

Publication number Publication date
CN106875664B (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN103518350A (en) Method and system for group communication, group server and group member device
CN108733604A (en) A kind of 485 bus intelligent expansion method and devices based on modbus communications protocol
CN102523103B (en) Industrial monitoring network data collection node
CN110505319A (en) A kind of RS485 is from device address auto-allocation method and system
CN104243611A (en) Distribution thought based message service middleware system
CN106875664A (en) A kind of exclusive formula collecting method based on CAN
CN102158346A (en) Information acquisition system and method based on cloud computing
CN103248526A (en) Communication equipment and method for achieving out-of-band monitoring and management, and master-slave switching method
CN102195946A (en) Intelligent communication controller based on ARM (Advanced RISC Machines) technology
CN110635982B (en) Double-host communication method and system on communication bus, industrial control gateway and storage medium
CN103095684A (en) Method obtaining attention user aggregate information, device and system
CN105786592A (en) Method and device for processing distributed transactions
CN105183299A (en) Human-computer interface service processing system and method
CN109327511A (en) A kind of data request method and server based on http protocol
CN109521738A (en) Plant data processing system and method based on agreement transmission
CN105553682A (en) Event notification method and event notification system
CN107205059A (en) Manage method, acquisition terminal and the meter equipment of meter device address
CN108259605B (en) Data calling system and method based on multiple data centers
CN105337850A (en) Internet of Things data processing method and internet of Things gateway
KR20160103110A (en) Network element data access method and apparatus, and network management system
CN109217986A (en) A kind of data transmission method and system based on Internet of Things
CN107528798B (en) RS485 bus system-based optimal scheduling method
CN105656794A (en) Data distribution method and device
CN202385116U (en) Distributed operation and maintenance data acquisition device
CN109632842A (en) A kind of the CT detector and its application method of module serial structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Haizhou District of Jiangsu city of Lianyungang province Lian Hai road 222000 No. 42

Patentee after: CSIC Information Technology Co.,Ltd.

Address before: Haizhou District of Jiangsu city of Lianyungang province Lian Hai road 222000 No. 42

Patentee before: LIANYUNGANG JARI SHENRUAN TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 222000 No.42, Hailian East Road, Haizhou District, Lianyungang City, Jiangsu Province

Patentee after: China Shipbuilding Digital Information Technology Co.,Ltd.

Address before: 222000 No.42, Hailian East Road, Haizhou District, Lianyungang City, Jiangsu Province

Patentee before: CSIC Information Technology Co.,Ltd.