Movatterモバイル変換


[0]ホーム

URL:


CN103516462B - A kind of non-standard Canopen is from the Frame sending method of node and device - Google Patents

A kind of non-standard Canopen is from the Frame sending method of node and device
Download PDF

Info

Publication number
CN103516462B
CN103516462BCN201210203998.6ACN201210203998ACN103516462BCN 103516462 BCN103516462 BCN 103516462BCN 201210203998 ACN201210203998 ACN 201210203998ACN 103516462 BCN103516462 BCN 103516462B
Authority
CN
China
Prior art keywords
frame
data
canopen
sent
xor
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.)
Active
Application number
CN201210203998.6A
Other languages
Chinese (zh)
Other versions
CN103516462A (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.)
Sinovel Wind Group Co Ltd
Original Assignee
Sinovel Wind Group 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 Sinovel Wind Group Co LtdfiledCriticalSinovel Wind Group Co Ltd
Priority to CN201210203998.6ApriorityCriticalpatent/CN103516462B/en
Publication of CN103516462ApublicationCriticalpatent/CN103516462A/en
Application grantedgrantedCritical
Publication of CN103516462BpublicationCriticalpatent/CN103516462B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The invention discloses a kind of non-standard Canopen Frame sending method from node and device, based on Canopen protocol development relatively time-consuming arduously from node for solving in prior art, and realize more complicated problem.The method includes: the identifier position of the arbitration of Frame from node device field is filled function code and the communication object identifier of process data object PDO in Canopen network, and fills data to be sent in data fields, obtain the first Frame;Carry out verifying and generating check results to sent data;Check results is added in the first Frame, obtain the second Frame, the second Frame is sent the host node device to Canopen network.Achieve the communication function only supporting Can2.0 equipment and Canopen network host node, such that it is able to shorten based on Canopen protocol development from the cycle of node, and reduce the complexity of operation.

Description

A kind of non-standard Canopen is from the Frame sending method of node and device
Technical field
The present invention relates to Canopen network communication field, in particular to a kind of non-standard CanopenFrom Frame sending method and the device of node.
Background technology
The most integrated and intelligent along with blower fan system, fan master control system needs to issue relevant controlInformation processed is to subsystems core component, and subsystems core component is also required to relevant shape simultaneouslyState information is sent to fan master control system.Can(Control Area Network, control area network)Network is owing to the features such as point spread is flexible, communication delay is less and error detection mechanism is perfect are existingField bus is widely used.
Canopen agreement is in CAL(CAN Application Layer, CAN application layer) on the basis ofExploitation, employ CAL communication and service protocol subset, it is provided that the one of dcsImplementation.CANopen allows the function of node arbitrarily to expand while ensureing network node interoperabilityExhibition, simple or complicated.In blower fan, the core component of a lot of subsystems is all supported and uses Canopen at presentAgreement.Leading between the systems such as the most existing master control system and change oar, driftage, gearbox fault diagnosis in advanceLetter uses Can network based on Canopen agreement.Master control system PLC(ProgrammableLogic Controller, PLD) as host node, remaining each subsystem core controllerAs from node, this network structure well ensure that between subsystems, the independence of communication is with reliableProperty.In addition, along with the function of unit is the most perfect, system needs add corresponding module, asFor the root of blade load measuring cell of independent pitch and the digital input and output modules of extension or mouldIntend input/output module etc., and they are required for completing to communicate with master control system PLC.Accordingly, it would be desirable toBased on Canopen protocol development from node.Traditional is based on Canopen protocol development from node, needsObject dictionary to be completed is write, to NMT(network management, Network management), SDO(clothesBusiness data object, Service Data Objects), PDO(Process Data Object, process data pairAs) and predefined message etc. be achieved.The Canopen being achieved in that is longer from the Node Development cycle,Canopen realizes extremely complex from the exploitation of node protocol, and development process needs consider a lot of withThe problem that chip performance is relevant, such as OD(object dictionary, object dictionary) realize during itsThe distribution of different read-write properties correspondence deposit positions, the requirement to chip performance of the method for four kinds of message realizationsDeng.Additionally, for application-specific, some message it is not necessary that.Such as certain from node onlyBeing for use as the module of I O function, under this situation, NMT, SDO and predefined message etc. are not haveNecessary.Visible, traditional is longer from the cycle of node based on Canopen protocol development, and realizesMore complicated.
Summary of the invention
The present invention provides a kind of non-standard Canopen Frame sending method from node and device, is used forSolve in prior art based on Canopen protocol development longer from the node cycle, and realize more multipleMiscellaneous problem.
The invention provides a kind of non-standard Canopen Frame sending method from node, including:
Process data object PDO in Canopen network is filled in the identifier position that Frame is arbitrated fieldFunction code and communication object identifier, and in data fields, fill data to be sent, obtain the first dataFrame;Carry out verifying and generating check results to sent data;Check results is added to the first dataIn frame, obtain the second Frame, the second Frame is sent the host node device to Canopen network.
Further, said method also includes: the second Frame is being sent the master to Canopen networkAfter node device, send heartbeat message to host node device.
Further, said method also includes: after obtaining the first Frame, enters the first FrameLine flag, obtains the labelling of the first Frame;The labelling of the first Frame is added together with check resultsIn the first Frame.
Wherein, the first Frame is marked includes: to the first data before sending the first FrameFrame counts, and obtains the count value that current data frame is corresponding, using count value as the first FrameLabelling.
Wherein, carry out verification to sent data to include: data to be sent entered in units of byteRow XOR, obtains the result after XOR;Result after XOR and count value are carried out XOR, obtains schoolTest result.
According to another aspect of the present invention, it is provided that a kind of non-standard Canopen is from the Frame of nodeDispensing device, including: processing module, fill Canopen for Frame being arbitrated the identifier position of fieldThe function code of process data object PDO and communication object identifier in network, and fill in data fields and treatThe data sent, obtain the first Frame;Correction verification module, for carrying out verifying also to sent dataGenerate check results;First sending module, for check results being added in the first Frame, obtainsSecond Frame, sends the host node device to Canopen network by the second Frame.
Further, said apparatus also includes: the second sending module, for being sent by the second FrameAfter the host node device of Canopen network, send heartbeat message to host node device.
Further, said apparatus also includes: mark module, is used for after obtaining the first Frame,First Frame is marked, obtains the labelling of the first Frame;First sending module includes: addUnit, adds to the labelling of the first Frame in the first Frame together with check results.
Wherein, above-mentioned mark module includes: counting unit, for sending before the first Frame theOne Frame counts, and obtains the count value that current data frame is corresponding, using count value as firstThe labelling of Frame.
Wherein, above-mentioned correction verification module includes: the first XOR unit, is used for data to be sent with byteCarry out XOR for unit, obtain the result after XOR;Second XOR unit, for by the result after XORCarry out XOR with count value, obtain check results.
Technical scheme, by by Frame to be sent in Can2.0 equipment according to CanopenThe communication pattern of network host node is packaged, thus by the data frame format of Can2.0A and CanopenPDO content in traffic model is mapped, it is achieved that off-gauge from node and Canopen networkThe communication function of host node.Such that it is able to shorten based on Canopen protocol development from the cycle of node, andAnd reduce the complexity of operation.
Accompanying drawing explanation
Fig. 1 is the potential field composition schematic diagram of Frame;
Fig. 2 is arbitration field composition schematic diagram;
Fig. 3 is that the non-standard Canopen of according to embodiments of the present invention 1 is from the Frame sending method of nodeFlow chart;
Fig. 4 is that the non-standard Canopen of according to embodiments of the present invention 2 is from the Frame sending method of nodeFlow chart;
Fig. 5 be according to embodiments of the present invention 3 realization be similar to the stream of message method of HeartbeatingCheng Tu;
Fig. 6 is that the non-standard Canopen of according to embodiments of the present invention 4 is from the Frame dispensing device of nodeStructured flowchart;And
Fig. 7 be according to embodiments of the present invention 4 the non-standard Canopen of another kind send out from the Frame of nodeSend apparatus structure block diagram.
Detailed description of the invention
Understandable, below in conjunction with the accompanying drawings for enabling the above-mentioned purpose of the present invention, feature and advantage to become apparent fromWith detailed description of the invention, the embodiment of the present invention is described in further detail.
Embodiment 1
The present embodiment is to use only to support Can2.0A equipment as Canopen network from node, it is achieved itsThe method communicated with Canopen network host node.Wherein, Can2.0A is by 4 different frame classesType represents and controls, i.e. Frame, remote frame, erroneous frame, overload frame, the present embodiment is concerned only with andRealize being similar to the Frame that PDO communication function is relevant.The potential field of Frame forms as shown in Figure 1,, arbitration field initial by frame, controlling filed, data fields, CRC check field, response field, End of Frame form.The present embodiment is paid close attention to emphatically arbitration field, data fields.Wherein arbitrate the composition of field as shown in Figure 2, secondaryCutting out in field and be made up of identifier and the long-range request position that sends, data fields is made up of 8 byte.
Fig. 3 is that the non-standard Canopen of according to embodiments of the present invention 1 is from the Frame sending method stream of nodeCheng Tu, as it is shown in figure 1, this method comprises the following steps:
Step 301: Canopen network is filled in the identifier position of the arbitration of Frame from node device fieldThe function code of middle process data object PDO and communication object identifier, and fill to be sent in data fieldsData, obtain the first Frame;
Step 302: carry out verifying and generating check results to sent data;
Step 303: check results added in the first Frame, obtains the second Frame, by secondFrame sends the host node device to Canopen network.
In above-mentioned steps 301, due to communication object identifier in distinct device, may be because of equipmentConfiguration changes and changes, and therefore, in the present embodiment, predefines with conventional CanopenPrincipal and subordinate's peer objects illustrates, and can determine that according to give the NodeID from node distribution in host nodeCorresponding predefined communication object identifier, i.e. may determine that required arbitration in conjunction with corresponding function codeIdentifier position in Chang.Simultaneously for the request that remotely the sends position of arbitration field, due in the present embodiment fromNode sends Frame to host node, and therefore, this remotely sends request position RTR, is set to dominant.It addition, fill data the most to be sent in eight positions of the data fields of Frame, in these eight positionsData to be sent are then equivalent to four words transmitted in PDO.
The Frame verification to sending of the equipment of the Can2.0A in this step is specifically, in units of byteCarry out XOR to sent Frame, the result obtained is being carried out XOR with above-mentioned count value,The result obtained eventually is as check results.Specifically data to be sent can will be filled in the three of PDO words,Check results is inserted in a remaining word.The verification that this assay can realize sending data is beatenBag or the Canopen network host node data to receiving unpack inspection, when the main joint of Canopen networkPoint receive from based on Can2.0A from the Frame of node device time, according to this check results,To judge in the transmission of data, if frame losing or other error of transmission occur.
Additionally, in above-mentioned steps 301 method of calibration to data to be sent can also use even-odd check,The methods of calibration such as CRC check realize.
The present embodiment by by non-standard Canopen network Frame to be sent from node device according toThe data frame format of Canopen network service is packaged, it is achieved that non-standard Canopen network is from nodeCommunication between equipment and Canopen network host node, thus avoid based on Canopen network development fromNode is wasted time and energy, is realized more complicated problem, and then saves manpower, reduces the choosing to equipmentRequirement during type.
Embodiment 2
Fig. 4 is that the non-standard Canopen of according to embodiments of the present invention 2 is from the Frame sending method stream of nodeCheng Tu, as shown in Figure 4, this method comprises the following steps:
Step 401: Canopen network is filled in the identifier position of the arbitration of Frame from node device fieldThe function code of middle process data object PDO and communication object identifier, and fill to be sent in data fieldsData, obtain the first Frame;
Step 402: be marked the first Frame, obtains the labelling of current data frame;
Step 403: carry out verifying and generating check results to sent data;
Step 404: labelling and check results are filled in the first Frame, obtains the second Frame,Second Frame is sent the host node device to Canopen network.
In the present embodiment, in order to make Canopen network host node realize it from the monitoring of node,During in above-mentioned steps 404, the labelling of current data frame is filled into above-mentioned first Frame, so that this labellingSent along with current data frame to Canopen network host node equipment.The wherein labelling of current data frameThen can play the effect of heartbeat message, when host node receives this Frame, by this heart beating reportThe detection of literary composition, it may be determined that the most whether Frame mistake occurs.Wherein, the first Frame is enteredCurrently processed Frame can be counted by line flag, obtains the count value that current data frame is corresponding,Using count value as the labelling of the first Frame.Can also be when when transmission current data frame, will be currentData be labeled as 1, when send next Frame time, data labelling upset be 0, whenever sending a frameDuring data, carry out once inside out.
Based on realizing the purpose of heartbeat message, in the present embodiment, can be first at first three word of PDOThe data that middle filling is to be sent;It is separately provided an enumerator, every Fixed Time Interval for each PDOAdd one, reset when counter overflow;In units of byte, first three word of PDO is carried out XOR, gainedTo result value with enumerator again carry out XOR, obtain the check results of a byte;By enumeratorValue is put in the high eight-bit of the 4th word of PDO, and check results is put in the low eight of the 4th word of PDO.ThisSample just completes the packing of tetra-words of PDO, the wherein high eight-bit of the 4th word, the value of the most above-mentioned enumerator,Can realize being similar to the testing mechanism of heartbeat message, low eight verifications that can realize sending data are beatenWrap or unpack inspection to receiving data.In addition it is also possible to periodically send according to fixed time intervalHeartbeat message is to the host node of Canopen network.In the present embodiment, take while sending FrameWith heart beating herein, it is achieved that the host node of Canopen network is to from the monitoring of node, thus ensure thatThe correctness of communication and reliability.
Embodiment 3
The method that the equipment only supporting Can2.0A realizes in Canopen network communication includes following twoIndividual part:
Part I: realize being similar to the message of PDO communication, fills in the identifier position of arbitration fieldThe function code of PDO and COB-ID in Canopen Communication Model.In different equipment, COB-ID may be because joiningThe change put and change, this sentences conventional Canopen and predefines principal and subordinate's peer objects and illustrate,Corresponding predefined according to can determine that host node to this NodeID from node distributionCOB-ID, i.e. can determine that the identifier position in required arbitration field in conjunction with corresponding function code;In arbitration" dominant ", " recessive " position accordingly are filled in the request that remotely the sends position of field.It is data due to sendFrame, fills " dominant " position remotely sending at request position, position.8 byte of data fields fillData to be sent, are equivalent to four words transmitted in standard PDO.
Part II, it is achieved be similar to heartbeat message, owing to not being similar to heart beating report in Can2.0AThe agreement of literary composition function, can choose a word to realize this function in the PDO message that Part I realizes.
Fig. 5 be according to embodiments of the present invention 3 realization be similar to the method flow diagram of heartbeat message.
As it is shown in figure 5, the method comprises the following steps:
Step 501: fill data to be sent in first three word of PDO;
Step 502: being separately provided an overflow value for each PDO is the enumerator of 256, when fixingBetween interval add 1, when counter overflow reset;
Step 503: in units of byte, first three word of PDO is carried out XOR, acquired results again with enumeratorXOR, obtains the check results of a byte;
Step 504: the value of enumerator is put in the most-significant byte of the 4th word of PDO, above-mentioned check results is putLeast-significant byte in the 4th word of PDO.
Through above step, just completing the packing of tetra-words of PDO, wherein the most-significant byte of the 4th word is permissibleRealizing being similar to the monitoring mechanism of heartbeat message, least-significant byte can realize the verification packing sending data simultaneouslyOr unpack inspection to accepting data.From the point of view of above procedure sends for data, data are connectIt is subject to and unpacks testing sequence to be similar to.When " heartbeat message " lost efficacy or unpacked check errors, report communication eventBarrier.
Embodiment 4
Fig. 6 is that the non-standard Canopen of according to embodiments of the present invention 4 is from the Frame dispensing device knot of nodeStructure block diagram.
As shown in Figure 6, this non-standard Canopen includes from the Frame dispensing device 60 of node:
Processing module 61, for filling the identifier position of the arbitration of Frame from node device fieldThe function code of process data object PDO and communication object identifier in Canopen network, and in data fieldsThe data that middle filling is to be sent, obtain the first Frame;
Correction verification module 62, for carrying out verifying and generating check results to sent data;
First sending module 63, for check results being added in the first Frame, obtains the second dataFrame, sends the host node device to Canopen network by the second Frame.
In order to realize Canopen network host node to from the monitoring of node, said apparatus can also include:Second sending module, for the second Frame is being sent after the host node device of Canopen network,Heartbeat message is sent to this host node device.
In order to make Canopen network host node realize it from the monitoring of node, as it is shown in fig. 7, this realityThe device 70 executing example can also include: mark module 71, for after obtaining the first Frame, rightFirst Frame is marked, and obtains the labelling of current data frame;Based on this mark module, above-mentioned firstSending module also needs to include: adding device, for adding check results and labelling to second dataIn frame.
The most above-mentioned mark module may include that counting unit, for carrying out currently processed FrameCounting, obtains the count value that current data frame is corresponding, using count value as the labelling of the first Frame.
The most above-mentioned correction verification module can also include: the first XOR unit, for by data to be sent withByte is that unit carries out XOR, obtains the result after XOR;Second XOR unit, for by after XORResult and count value carry out XOR, obtain check results.
It should be noted that in this article, the relational terms of such as first and second or the like is used merely toOne entity or operation are separated with another entity or operating space, and not necessarily requires or implyRelation or the order of any this reality is there is between these entities or operation.And, term " includes "," comprise " or its any other variant is intended to comprising of nonexcludability, so that include that one isThe process of row key element, method, article or equipment not only include those key elements, but also include the brightestOther key elements really listed, or also include intrinsic for this process, method, article or equipmentKey element.In the case of there is no more restriction, statement " including ... " key element limited,It is not precluded from there is also other identical element in including the process of key element, method, article or equipment.
These are only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.All any modification, equivalent substitution and improvement etc. made within the spirit and principles in the present invention, all compriseWithin the scope of the present invention.

Claims (10)

CN201210203998.6A2012-06-152012-06-15A kind of non-standard Canopen is from the Frame sending method of node and deviceActiveCN103516462B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201210203998.6ACN103516462B (en)2012-06-152012-06-15A kind of non-standard Canopen is from the Frame sending method of node and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201210203998.6ACN103516462B (en)2012-06-152012-06-15A kind of non-standard Canopen is from the Frame sending method of node and device

Publications (2)

Publication NumberPublication Date
CN103516462A CN103516462A (en)2014-01-15
CN103516462Btrue CN103516462B (en)2016-08-17

Family

ID=49898569

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201210203998.6AActiveCN103516462B (en)2012-06-152012-06-15A kind of non-standard Canopen is from the Frame sending method of node and device

Country Status (1)

CountryLink
CN (1)CN103516462B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104639296B (en)*2015-02-282018-04-13安徽江淮汽车集团股份有限公司A kind of CAN bus data fields method of calibration and system
CN106603357A (en)*2016-11-112017-04-26深圳怡化电脑股份有限公司Sensor data reporting method, device and system
CN109104351B (en)*2017-06-212020-08-25比亚迪股份有限公司Train network node and train network node monitoring method based on CANopen protocol
CN109343453B (en)*2018-11-022020-01-21合肥保得工业自动化有限公司Data synchronization method of CANopen
CN111131147B (en)*2019-11-082022-07-26深圳市泰达机器人有限公司Ethernet TCP/IP application layer TC transmission protocol method and system based on object dictionary
CN112398711B (en)*2020-09-232022-07-15卡斯柯信号有限公司CAN bus communication method for safety computer
CN113852531B (en)*2021-09-222022-11-15河北通合新能源科技有限公司CAN communication method and CAN controller for function code matching

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6975655B2 (en)*2000-04-072005-12-13Broadcom CorporationMethod of controlling data sampling clocking of asynchronous network nodes in a frame-based communications network
CN101854300A (en)*2010-06-022010-10-06北京工业大学 A Method to Realize CANopen Slave Station
CN102025545A (en)*2010-12-162011-04-20上海电器科学研究院 Control system for CANopen network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6975655B2 (en)*2000-04-072005-12-13Broadcom CorporationMethod of controlling data sampling clocking of asynchronous network nodes in a frame-based communications network
CN101854300A (en)*2010-06-022010-10-06北京工业大学 A Method to Realize CANopen Slave Station
CN102025545A (en)*2010-12-162011-04-20上海电器科学研究院 Control system for CANopen network

Also Published As

Publication numberPublication date
CN103516462A (en)2014-01-15

Similar Documents

PublicationPublication DateTitle
CN103516462B (en)A kind of non-standard Canopen is from the Frame sending method of node and device
CN103530211B (en)A kind of method of the PCIE winding Autonomous tests based on UVM platforms
CN105015565B (en)A kind of train fault information automatic displaying method
CN108737187B (en) A CAN bus fault simulation system and fault simulation method
CN103036742B (en)Control method and system that communication apparatus batch detects
CN110138624A (en)Vehicle-mounted ethernet test equipment, system and test method
CN103530216A (en)PCIE verification method based on UVM
CN109347648A (en) OAM message transmission method, transmission device and storage medium
US20070179733A1 (en)Methods and apparatus for testing a link between chips
CN202995711U (en)Device for remotely controlling field programmable gate array (FPGA) prototype verification system
CN104954096A (en)One-master multi-slave high-speed synchronous serial communication data transmission method
CN106293625A (en)A kind of method and apparatus of configuration register
CN101304342B (en) An Enhanced Ethernet Interface Device
CN101677277B (en)MODBUS-RTU protocol conformance test method
CN109951366A (en) A Modbus RTU bus controller and control method
CN110380923A (en)Site element protection looped network test device
CN104484257B (en)A kind of general 1553B bus communication emulation test system and method
CN105162649A (en)Testing method and system for nuclear power station safety level network performance index
CN109274636B (en) Data safe transmission method and device, system and train
CN107181661A (en)Real-time fault protecting method, master node, slave node and loop-type network system
CN102510383A (en)Middleware system with network traffic shaping function for aircraft electronic communication
CN107968722B (en)Method for converting interface control file into AFDX (avionics full Duplex switched Ethernet) network equipment configuration file
CN201072431Y (en)Broadband aviation electronic bus testing device
CN104022934A (en) Communication method of communication equipment based on PROFIBUS-DP protocol
CN102884744B (en)For protecting up for the method and apparatus of the packet transmitted by interface

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp