CN103577375A - Bus control method and device, capable of being compatible with plurality of CAN bus hardware circuits - Google Patents

Bus control method and device, capable of being compatible with plurality of CAN bus hardware circuits Download PDF

Info

Publication number
CN103577375A
CN103577375A CN201310610740.2A CN201310610740A CN103577375A CN 103577375 A CN103577375 A CN 103577375A CN 201310610740 A CN201310610740 A CN 201310610740A CN 103577375 A CN103577375 A CN 103577375A
Authority
CN
China
Prior art keywords
hardware circuit
function
bus
interface function
node
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
CN201310610740.2A
Other languages
Chinese (zh)
Other versions
CN103577375B (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.)
Institute of Acoustics CAS
Original Assignee
Institute of Acoustics CAS
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 Institute of Acoustics CAS filed Critical Institute of Acoustics CAS
Priority to CN201310610740.2A priority Critical patent/CN103577375B/en
Publication of CN103577375A publication Critical patent/CN103577375A/en
Application granted granted Critical
Publication of CN103577375B publication Critical patent/CN103577375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a bus control method and device, capable of being compatible with a plurality of CAN bus hardware circuits. The method comprises the following steps: an upper computer of a CAN bus control system transfers predetermined interface function files according to a hardware circuit chosen by a user from the CAN bus hardware circuits, and the chosen hardware circuit is allocated to generate configuration files; the interface function files are dynamic link libraries corresponding to different CAN bus hardware circuits generated by unified interface functions for the different CAN bus hardware circuits; the upper computer loads the dynamic link library corresponding to the chosen hardware circuit according to the configuration files to control the chosen hardware circuit to acquire data and communicate. The bus control method and device, capable of being compatible with the CAN bus hardware circuits can be suitable for unused CAN bus hardware circuits to enable the unused CAN bus hardware circuits to be normally used, and have good expansibility.

Description

Bus control method and device that can compatible multiple CAN bus hardware circuit
Technical field
The present invention relates to CAN monitoring bus message area, relate in particular to a kind of bus control method and device that can compatible multiple CAN bus hardware circuit.
Background technology
Controller local area network (Controller Area Network, CAN) is a kind of multi-line network communicating system.CAN bus is because its remarkable performance, high reliability and cheap price have now been widely used in industrial field control field, for example, automatic industrial manufacturing line, automobile, sensor, Medical Devices, Intelligent Building, elevator are controlled, environment is controlled distributed real-time system.
After the control network successful connection based on CAN bus, for testing CAN bus communication and agreement performance, mainly utilize the application program CANPro of Zhou Ligong company exploitation, this application program must be used supporting CAN data source and sink CANalystII, and this equipment is unique and not modifiable.
The software interface of CANPro application program is mainly to develop for the specific hardware of CANalystII, if while therefore using this program to carry out CAN network service, can only select the bottom hardware equipment matching, when being replaced by other unmatched hardware circuits, this software can not be worked.
Yet, CANPro application program for the exploitation of Zhou Ligong company, due to bottom for be the specific driving of the CANalystII of the said firm exploitation, cause using hardware support kit circuit, and this equipment is unique and not modifiable, for cannot normally using such as " the CAN network R-T unit based on FT2232H " or " the data receiving apparatus based on RS232 type " of exploitation.
Summary of the invention
The invention provides a kind of bus control method and device that can compatible multiple CAN bus hardware circuit, go for no CAN bus hardware circuit, it is normally used, favorable expandability.
First aspect present invention provides a kind of bus control method that can compatible multiple CAN bus hardware circuit, and described method comprises:
The hardware circuit that the host computer of CAN bus control system is selected from a plurality of CAN bus hardware circuit according to user, calls default interface function file, the hardware circuit of described selection is configured to generating configuration file; Described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit;
Described host computer, according to described configuration file, loads the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
In a kind of possible embodiment of the present invention, described CAN bus hardware circuit comprises CAN network R-T unit, the data receiving apparatus based on RS232 type or the CAN data source and sink CANalystII based on FT2232H.
In a kind of possible embodiment of the present invention, described unified interface function comprises: instruction functions and satellite interface function.
In a kind of possible embodiment of the present invention, described instruction functions comprises starter node function, node self check function, wipes FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions of giving directions node;
Described satellite interface function comprises to be opened function, closes function and replacement function.
In a kind of possible embodiment of the present invention, the hardware circuit of the described selection of described control carries out data acquisition and communicates by letter, and specifically comprises:
Described host computer is assigned user's operational order of the hardware circuit of described selection, and by described unified interface function, drives the hardware circuit of described selection to carry out data acquisition and communicate by letter with CAN network.
Second aspect, the present invention also provides a kind of bus control device that can compatible multiple CAN bus hardware circuit, and described device comprises:
Storage unit, for memory interface function file, described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit;
Dispensing unit, for the hardware circuit of selecting from a plurality of CAN bus hardware circuit according to user, calls the described interface function file of described storage unit, the hardware circuit of described selection is configured to generating configuration file;
Processing unit, for according to the described configuration file of described dispensing unit, loads the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
In a kind of possible embodiment of the present invention, described CAN bus hardware circuit comprises CAN network R-T unit, the data receiving apparatus based on RS232 type or the CAN analysis circuit CANalystII based on FT2232H.
In a kind of possible embodiment of the present invention, described unified interface function comprises: instruction functions and satellite interface function.
In a kind of possible embodiment of the present invention, described instruction functions comprises starter node function, node self check function, wipes FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions of giving directions node;
Described satellite interface function comprises to be opened function, closes function and replacement function.
In a kind of possible embodiment of the present invention, described processing unit is specifically for assigning user's operational order of the hardware circuit of described selection, and by described unified interface function, drives the hardware circuit of described selection to carry out data acquisition and communicate by letter with CAN network.
The data communications method of CAN bus control system provided by the invention and device, be directed to different CAN bus hardware circuit, the host computer of CAN bus control system all can normally be used, and goes for no CAN bus hardware circuit, it is normally used, favorable expandability.
Accompanying drawing explanation
The Organization Chart of the CAN bus control system that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 for the embodiment of the present invention provide can compatible multiple CAN bus hardware circuit bus control method process flow diagram;
Fig. 3 for the embodiment of the present invention provide can compatible multiple CAN bus hardware circuit bus control device schematic diagram.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Fig. 1 is the Organization Chart of the CAN bus control system that provides of the embodiment of the present invention, and as shown in Figure 1, CAN bus control system of the present invention comprises: host computer 1, CAN bus hardware circuit 2 and CAN bus network.Host computer 1 is connected with three kinds of different CAN bus hardware circuit 2, CAN bus hardware circuit 2 is generally data source and sink, particularly, can comprise CAN network R-T unit, the data receiving apparatus based on RS232 type or the CAN data source and sink CANalystII etc. based on FT2232H.
Fig. 2 be the embodiment of the present invention provide can compatible multiple CAN bus hardware circuit bus control method process flow diagram, as shown in Figure 2, bus control method that can compatible multiple CAN bus hardware circuit of the present invention comprises:
The hardware circuit that the host computer of S201, CAN bus control system is selected from a plurality of CAN bus hardware circuit according to user, calls default interface function file, the hardware circuit of described selection is configured to generating configuration file.
Described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit, is generally ini file.Interface function is the basic function function that host computer user uses application software to communicate by letter with interface circuit.In order to realize same host computer application program, can operate a plurality of different hardware circuits, the present invention utilizes unified interface function to write interface function file, by the interface function unified standardization of different interface modules.Like this, when carrying out upper computer software programming, without the type of the CAN bus hardware circuit of considering to be connected with CAN network, only need to use unified interface function to realize specific function.
Particularly, described unified interface function comprises: instruction functions and satellite interface function.Wherein, described instruction functions comprise starter node function StartNode, node self check function CheckNode, wipe FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions etc. of giving directions node.Described satellite interface function comprises to be opened function open, closes function close and replacement function reset etc.
The hardware circuit of selecting according to user, calling interface function file, is configured described hardware circuit, generating configuration file, configuration file is generally dll file.
S202, described host computer, according to described configuration file, load the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
The hardware circuit of the described selection of described control carries out data acquisition and communicates by letter, specifically comprise: described host computer is assigned user's operational order of the hardware circuit of described selection, and by described unified interface function, drive the hardware circuit of described selection to carry out data acquisition and communicate by letter with CAN network.
Like this, when the application program operation of host computer, different dynamic link library corresponding to CAN bus hardware circuit is loaded in program, then when carrying out a certain specific function, without explanation interface circuit type, directly call the interface function of the unified standard in dynamic link library and can realize corresponding function.The specific function of the application program of host computer comprises: data that choose interfacing equipment, assign user's operational order, configuration CAN network node, receiving sensor data, access collect etc.After configuring the configuration file of the hardware circuit that user selects, just can normally use host computer application program to carry out work, gather CAN bus data or control the transmission of data.
Be more than to the bus control method detailed description of carrying out that can compatible multiple CAN bus hardware circuit provided by the present invention, below bus control device that can compatible multiple CAN bus hardware circuit provided by the invention be described in detail.
Fig. 3 be the present embodiment provide can compatible multiple CAN bus hardware circuit bus control device schematic diagram, as shown in Figure 3, bus control device that can compatible multiple CAN bus hardware circuit of the present invention comprises: storage unit 301, dispensing unit 302 and processing unit 303.
Storage unit 301 is for memory interface function file.
Described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit, is generally ini file.
Concrete, described unified interface function comprises: instruction functions and satellite interface function.Wherein, described instruction functions comprise starter node function StartNode, node self check function CheckNode, wipe FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions etc. of giving directions node.Described satellite interface function comprises to be opened function open, closes function close and replacement function reset etc.
The hardware circuit of dispensing unit 302 for selecting from a plurality of CAN bus hardware circuit according to user, calls the described interface function file of storage unit 301, the hardware circuit of described selection is configured to generating configuration file.Configuration file is generally dll file.
Processing unit 303, for according to the described configuration file of dispensing unit 302, loads the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
Processing unit 303 is specifically for assigning user's operational order of the hardware circuit of described selection, and drives described hardware circuit to carry out data acquisition and communicate by letter with CAN network by described unified interface function.
Like this, when the application program operation of host computer, different dynamic link library corresponding to CAN bus hardware circuit can be loaded in program, then when carrying out a certain specific function, without explanation interface circuit type, directly call the interface function of the unified standard in dynamic link library and can realize corresponding function.The specific function of the application program of host computer comprises: data that choose interfacing equipment, assign user's operational order, configuration CAN network node, receiving sensor data, access collect etc.After configuring the configuration file of the hardware circuit that user selects, just can normally use host computer application program to carry out work, gather CAN bus data or control the transmission of data.
Bus control method and device that can compatible multiple CAN bus hardware circuit provided by the invention, by writing dynamic link library separately, dynamic link library corresponding to different hardware equipment used unified interface function, realizes same upper computer software to multiple different hardware circuit data acquisition and control.
Professional should further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software is clearly described, composition and the step of each example described according to function in the above description in general manner.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, or the combination of the two is implemented.Software module can be placed in the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only the specific embodiment of the present invention; the protection domain being not intended to limit the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a bus control method that can compatible multiple CAN bus hardware circuit, is characterized in that, described method comprises:
The hardware circuit that the host computer of CAN bus control system is selected from a plurality of CAN bus hardware circuit according to user, calls default interface function file, the hardware circuit of described selection is configured to generating configuration file; Described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit;
Described host computer, according to described configuration file, loads the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
2. method according to claim 1, is characterized in that, described CAN bus hardware circuit comprises CAN network R-T unit, the data receiving apparatus based on RS232 type or the CAN data source and sink CANalystII based on FT2232H.
3. method according to claim 1, is characterized in that, described unified interface function comprises: instruction functions and satellite interface function.
4. method according to claim 3, it is characterized in that, described instruction functions comprises starter node function, node self check function, wipes FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions of giving directions node;
Described satellite interface function comprises to be opened function, closes function and replacement function.
5. method according to claim 1, is characterized in that, the hardware circuit of the described selection of described control carries out data acquisition and communicates by letter, and specifically comprises:
Described host computer is assigned user's operational order of the hardware circuit of described selection, and by described unified interface function, drives the hardware circuit of described selection to carry out data acquisition and communicate by letter with CAN network.
6. a bus control device that can compatible multiple CAN bus hardware circuit, is characterized in that, described device comprises:
Storage unit, for memory interface function file, described interface function file is the described different corresponding dynamic link library of CAN bus hardware circuit that adopts unified interface function to generate for different CAN bus hardware circuit;
Dispensing unit, for the hardware circuit of selecting from a plurality of CAN bus hardware circuit according to user, calls the described interface function file of described storage unit, the hardware circuit of described selection is configured to generating configuration file;
Processing unit, for according to the described configuration file of described dispensing unit, loads the dynamic link library corresponding to hardware circuit of described selection, and the hardware circuit of controlling described selection carries out data acquisition and communicates by letter.
7. device according to claim 6, is characterized in that, described CAN bus hardware circuit comprises CAN network R-T unit, the data receiving apparatus based on RS232 type or the CAN analysis circuit CANalystII based on FT2232H.
8. device according to claim 6, is characterized in that, described unified interface function comprises: instruction functions and satellite interface function.
9. device according to claim 8, it is characterized in that, described instruction functions comprises starter node function, node self check function, wipes FLASH data function, request latest data function, suspend request function, ask each node storage data function, for the instruction functions of giving directions node;
Described satellite interface function comprises to be opened function, closes function and replacement function.
10. device according to claim 6, it is characterized in that, described processing unit is specifically for assigning user's operational order of the hardware circuit of described selection, and by described unified interface function, drives the hardware circuit of described selection to carry out data acquisition and communicate by letter with CAN network.
CN201310610740.2A 2013-11-26 2013-11-26 Bus control method and device that can compatible multiple CAN bus hardware circuit Active CN103577375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310610740.2A CN103577375B (en) 2013-11-26 2013-11-26 Bus control method and device that can compatible multiple CAN bus hardware circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310610740.2A CN103577375B (en) 2013-11-26 2013-11-26 Bus control method and device that can compatible multiple CAN bus hardware circuit

Publications (2)

Publication Number Publication Date
CN103577375A true CN103577375A (en) 2014-02-12
CN103577375B CN103577375B (en) 2016-05-04

Family

ID=50049187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310610740.2A Active CN103577375B (en) 2013-11-26 2013-11-26 Bus control method and device that can compatible multiple CAN bus hardware circuit

Country Status (1)

Country Link
CN (1) CN103577375B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133435A (en) * 2014-07-04 2014-11-05 深圳市宝捷龙电脑刺绣技术有限公司 Embedded-type high-speed-embroidery-machine control system based on CAN bus
CN105262655A (en) * 2015-09-16 2016-01-20 复旦大学 Communication method higher in rate and compatible with CAN2.0 bus
CN105446284A (en) * 2014-09-26 2016-03-30 比亚迪股份有限公司 Data analysis method and data analysis device of CAN (Controller Area Network) bus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069433B (en) * 2019-04-18 2020-11-20 英博超算(南京)科技有限公司 Medium system compatible with different automobile CAN communication interfaces

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040260408A1 (en) * 2003-01-28 2004-12-23 Cindy Scott Integrated configuration in a process plant having a process control system and a safety system
CN102495791A (en) * 2011-11-01 2012-06-13 浙江省电力试验研究院 Method for making automatic test interfaces of relay protection testers of multiple manufacturers compatible
CN103377070A (en) * 2012-04-12 2013-10-30 沈阳高精数控技术有限公司 Field bus interface abstract method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040260408A1 (en) * 2003-01-28 2004-12-23 Cindy Scott Integrated configuration in a process plant having a process control system and a safety system
CN102495791A (en) * 2011-11-01 2012-06-13 浙江省电力试验研究院 Method for making automatic test interfaces of relay protection testers of multiple manufacturers compatible
CN103377070A (en) * 2012-04-12 2013-10-30 沈阳高精数控技术有限公司 Field bus interface abstract method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133435A (en) * 2014-07-04 2014-11-05 深圳市宝捷龙电脑刺绣技术有限公司 Embedded-type high-speed-embroidery-machine control system based on CAN bus
CN105446284A (en) * 2014-09-26 2016-03-30 比亚迪股份有限公司 Data analysis method and data analysis device of CAN (Controller Area Network) bus
CN105262655A (en) * 2015-09-16 2016-01-20 复旦大学 Communication method higher in rate and compatible with CAN2.0 bus
CN105262655B (en) * 2015-09-16 2018-08-07 复旦大学 A kind of communication means with higher rate of compatible CAN2.0 buses

Also Published As

Publication number Publication date
CN103577375B (en) 2016-05-04

Similar Documents

Publication Publication Date Title
US20120166724A1 (en) High availability raid using low-cost direct attached raid controllers
CN103577375A (en) Bus control method and device, capable of being compatible with plurality of CAN bus hardware circuits
CN105429776A (en) Method and system for virtual network function management
CN107995043B (en) Application disaster recovery system based on hybrid cloud platform
CN103391214A (en) Cloud computing system and method to manage and deploy physical and virtual environment
CN109901881A (en) Plug-in loading method, device, computer equipment and the storage medium of application program
EP2842044A1 (en) Platform runtime abstraction
CN105404530B (en) It is a kind of to realize easy deployment and the system and method using private clound
CN102419753B (en) Information processing equipment, information processing method and information processing system
KR101821016B1 (en) Apparatus, system and method for allocating identifiers to components of a control system
CN115965517A (en) Graphics processor resource management method and device, electronic device and storage medium
US20160147657A1 (en) System and method for optimized disk io ram caching for a vdi environment
CN103560934A (en) Power line modem production testing method and device
CN103412838A (en) Expansion system, communication method, address configuration method, equipment and device
CN101770211B (en) Vehicle integrated data processing method capable of realizing real-time failure switching
CN104991826A (en) Method and apparatus for deploying virtual machine
CN104536926A (en) Control method and device of serial devices
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
WO2020206690A1 (en) Application cleaning method and apparatus, storage medium and electronic device
CN1983195A (en) Mounting device, electronic device, method of controlling mounting device, controlling program, and recording medium
CA2635103A1 (en) Method of configuring telephone softkeys
CN105808313A (en) Intelligent terminal data interaction system and method for intelligent terminal
CN108762786A (en) A kind of firmware update of server cabinet, server cabinet and host
CN104394232A (en) Independent management and concentrated management method of cloud equipment
CN104956355B (en) Distributed test system framework

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant