CN111290367B - Gateway control method and device for unmanned tractor - Google Patents
Gateway control method and device for unmanned tractor Download PDFInfo
- Publication number
- CN111290367B CN111290367B CN202010100185.9A CN202010100185A CN111290367B CN 111290367 B CN111290367 B CN 111290367B CN 202010100185 A CN202010100185 A CN 202010100185A CN 111290367 B CN111290367 B CN 111290367B
- Authority
- CN
- China
- Prior art keywords
- unmanned tractor
- port
- data
- judging whether
- personal computer
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
- G05B23/0213—Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real time diagnostics
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
The invention has proposed gateway control method and apparatus that a unmanned tractor uses, the said method includes step 1, carry on the initialization to bus CAN, serial port IO and gateway controller sequentially; step 2, starting a CAN3 process, and sequentially judging whether each ID port of the unmanned tractor industrial personal computer needs to send data; step 3, starting a serial port IO process, firstly judging whether the unmanned tractor is in an automatic driving mode, and then determining the working mode of the unmanned tractor; step 4, sequentially judging whether data are to be sent on the CAN1, CAN2 and CAN4 buses; and (5) repeating the steps 2 to 4.
Description
Technical Field
The invention relates to the technical field of unmanned vehicles, in particular to a gateway control method and device for an unmanned tractor.
Background
The gateway control device of the vehicle is a core component in a whole vehicle electronic and electrical framework, is used as a data interaction hub of a whole vehicle network, is responsible for a vehicle braking system, a steering system, an acousto-optic system, and data interaction between a power system and an industrial personal computer, and is an execution device of the industrial personal computer. However, since the number of external link devices is large and the number of interfaces is large, the gateway control device is large in size and large in occupied area, and further the space of vehicle equipment is very small in the vehicle production research and development process.
Disclosure of Invention
The invention provides a gateway control method and a gateway control device used by an unmanned tractor, which are used for solving the problem of narrow vehicle space caused by more external equipment ports and larger volume of a gateway control device, and adopt the following technical scheme:
the invention provides a gateway control method for an unmanned tractor, which comprises the following steps:
if so, transferring the data to be sent by the corresponding ID port to a sending buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data;
if so, finishing the judgment of the automatic driving mode of the unmanned tractor;
if not, sequentially judging whether the three operation modes of steering, braking and gear of the unmanned tractor are manual modes;
then, determining the working mode of the unmanned tractor;
if yes, sequentially starting the CAN1, the CAN2 and the CAN4 to send a CAN interruption receiving function;
if not, ending the bus data sending condition judgment process;
and (5) repeating the steps 2 to 4.
Further, the specific process of starting the bus process to judge whether the ID port of the industrial personal computer of the unmanned tractor is to send data in step 2 includes:
s101, judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
if so, transferring the data to be sent by the first ID port to a data buffer area;
otherwise, entering S102;
s102, judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the second ID port to a data buffer area;
otherwise, entering S103;
s103, judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the third ID port to a data buffer area;
otherwise, entering S104;
s104, judging whether a fourth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fourth ID port to a data buffer area;
otherwise, entering S105;
s105, judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fifth ID port to a data buffer area;
otherwise, entering S106;
s106, judging whether a sixth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the sixth ID port to a data buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data.
Further, the specific process of determining whether the unmanned tractor is in the automatic driving mode in step 3 includes:
s201, judging whether the unmanned tractor is in an automatic driving state or not;
if so, ending the judgment process of the automatic driving state of the unmanned tractor;
otherwise, entering S202;
s202, judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
if yes, entering S203;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the steering operation of the unmanned tractor to be switched into the manual mode;
s203, judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
if yes, entering S204;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the braking operation of the unmanned tractor to be switched into the manual mode;
s204, judging whether the operation of the gear of the unmanned tractor is in a manual mode;
if so, finishing the judgment of three operation working modes of steering, braking and gear of the unmanned tractor;
and otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the gear operation of the unmanned tractor to be switched into the manual mode.
Further, the specific process of determining the working mode of the unmanned tractor in step 3 includes:
s301, judging whether the unmanned tractor has a service brake operation or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s302, judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is an artificial mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s303, judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
Further, in step 4, the CAN interrupt receiving function is:
judging whether each ID port of the unmanned tractor industrial personal computer allows to receive data;
if so, putting the data into data receiving buffer areas corresponding to all ID ports of the industrial personal computer of the unmanned tractor;
otherwise, ending the CAN interrupt receiving function process.
A gateway control apparatus corresponding to the method, the apparatus comprising a gateway controller;
the data interaction end of the gateway controller is connected with the data interaction end of the unmanned tractor industrial personal computer;
and the data output end of the gateway controller is respectively connected with a braking device, a steering device and a gear device of the unmanned tractor.
The gateway controller is provided with a plurality of data receiving ports for receiving external data input;
each data receiving port is correspondingly connected with two IO ports on the gateway controller, and a resistor is arranged on a line connecting the data receiving port with the two IO ports of the gateway controller.
Further, the gateway controller further comprises:
the initialization module is used for initializing the bus CAN, the serial port IO and the gateway controller;
the ID port data sending and judging module is used for sequentially judging whether each ID port of the unmanned tractor industrial personal computer needs to send data or not;
the automatic driving mode judging module is used for judging whether the unmanned tractor is in an automatic driving mode or not;
the steering operation judging module is used for judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
the braking operation judging module is used for judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
the gear operation judging module is used for judging whether the operation of the gears of the unmanned tractor is in a manual mode;
the working mode determining module is used for determining that the working mode of the unmanned tractor is 1 or 0;
and the bus data judgment module is used for sequentially judging whether data are to be sent on the CAN1, CAN2 and CAN4 buses.
Further, the ID port data transmission determining module includes:
the first ID port data judgment module is used for judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
the second ID port data judgment module is used for judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
the third ID port data judgment module is used for judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
the fourth ID port data judgment module is used for judging whether a fourth ID port of the industrial personal computer of the unmanned tractor needs to send data or not;
the fifth ID port data judgment module is used for judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
and the sixth ID port data judgment module is used for judging whether the sixth ID port of the unmanned tractor industrial personal computer needs to send data or not.
Further, the operation mode determination module includes:
a foot brake working mode determining module for judging whether the unmanned tractor has foot brake operation,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the industrial personal computer working mode determining module is used for judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is a manual mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the communication state working mode determines each module and is used for judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
And further, the CAN interruption receiving function module is used for judging whether each ID port of the unmanned tractor industrial personal computer allows data receiving.
The invention has the beneficial effects that:
the gateway control method and the gateway control device for the unmanned tractor provided by the invention have the advantages that the interface of the gateway controller has a multiplexing function, namely, a pair of interfaces can realize any one of two functions, so that the interface quantity of external equipment of the gateway control device is effectively reduced, the size of the gateway controller is further reduced, and the occupied space of the equipment is reduced. On the other hand, the gateway control device adopts various equipment communication modes of a bus CAN and a serial port, so that the communication efficiency of the network management control device is effectively improved, meanwhile, the control method provided by the invention CAN effectively improve the control efficiency and the control accuracy of the unmanned tractor, and the control method and the control device structure CAN still realize the control efficiency and the control accuracy of the unmanned tractor without changing the hardware structure of the control device after the software program of peripheral equipment. The replacement time of the equipment is effectively saved, and manpower and material resources are saved.
Drawings
Fig. 1 is an overall flowchart of a gateway control method according to the present invention;
FIG. 2 is a flow chart of the industrial personal computer ID port judgment of the present invention;
FIG. 3 is a flow chart illustrating the determination of the three modes of operation of the present invention, namely autopilot, steering, braking and gear;
FIG. 4 is a flow chart of the present invention for determining the mode of operation of an unmanned tractor;
FIG. 5 is a flow chart of CAN data determination according to the present invention;
FIG. 6 is a flowchart of a CAN interrupt reception procedure according to the present invention;
fig. 7 is a schematic structural diagram of a gateway control apparatus according to the present invention;
fig. 8 is a schematic diagram of port connection of the gateway controller according to the present invention;
fig. 9 is a schematic diagram of the internal structure of the gateway controller according to the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
A gateway control method and a device used by an unmanned tractor are used for solving the problem that a narrow vehicle space is caused by a plurality of external circuits of a gateway control device.
The embodiment of the invention provides a gateway control method used by an unmanned tractor, which comprises the following steps of:
if so, transferring the data to be sent by the corresponding ID port to a sending buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data;
if so, finishing the judgment of the automatic driving mode of the unmanned tractor;
if not, sequentially judging whether the three operation modes of steering, braking and gear of the unmanned tractor are manual modes;
then, determining the working mode of the unmanned tractor;
if yes, sequentially starting the CAN1, the CAN2 and the CAN4 to send a CAN interruption receiving function;
if not, ending the bus data sending condition judgment process;
and (5) repeating the steps 2 to 4.
The gateway control method effectively improves the communication efficiency of the network management control device, meanwhile, the gateway control method provided by the invention can effectively improve the control efficiency and the control accuracy of the unmanned towing vehicle, and the control method and the control device structure can still realize the control efficiency and the control accuracy of the unmanned towing vehicle without changing the hardware structure of the control device after the software program of the peripheral equipment. The replacement time of the equipment is effectively saved, and manpower and material resources are saved.
In an embodiment, as shown in fig. 2, the specific process of starting the bus process to determine whether the ID port of the industrial personal computer of the unmanned tractor needs to send data in step 2 includes:
s101, judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
if so, transferring the data to be sent by the first ID port to a data buffer area;
otherwise, entering S102;
s102, judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the second ID port to a data buffer area;
otherwise, entering S103;
s103, judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the third ID port to a data buffer area;
otherwise, entering S104;
s104, judging whether a fourth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fourth ID port to a data buffer area;
otherwise, entering S105;
s105, judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fifth ID port to a data buffer area;
otherwise, entering S106;
s106, judging whether a sixth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the sixth ID port to a data buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data.
The process sequentially judges the ID ports of the industrial personal computer, accurately positions the data transmission condition of the ports of the industrial personal computer, effectively improves the accuracy of data transmission, avoids the condition of misjudgment of port data transmission, and effectively improves the control efficiency and accuracy of the unmanned tractor.
In one embodiment, as shown in fig. 3, the specific process of determining whether the unmanned tractor is in the automatic driving mode in step 3 includes:
s201, judging whether the unmanned tractor is in an automatic driving state or not;
if so, ending the judgment process of the automatic driving state of the unmanned tractor;
otherwise, entering S202;
s202, judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
if yes, entering S203;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the steering operation of the unmanned tractor to be switched into the manual mode;
s203, judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
if yes, entering S204;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the braking operation of the unmanned tractor to be switched into the manual mode;
s204, judging whether the operation of the gear of the unmanned tractor is in a manual mode;
if so, finishing the judgment of three operation working modes of steering, braking and gear of the unmanned tractor;
and otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the gear operation of the unmanned tractor to be switched into the manual mode.
The automatic operation state judging device has the advantages that whether the operation state of the unmanned tractor is manual operation or automatic driving is effectively judged, the judging performance with high efficiency and high accuracy is realized, the real-time monitoring of each action in each stage of vehicle driving is realized, the vehicle operation danger caused by misjudgment of the driving state is avoided, and the vehicle driving safety is effectively ensured.
In one embodiment, as shown in fig. 4, the specific process of determining the operation mode of the unmanned tractor in step 3 includes:
s301, judging whether the unmanned tractor has a service brake operation or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s302, judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is an artificial mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s303, judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
The working state of the unmanned tractor is effectively judged, the high-efficiency and high-accuracy judgment performance is realized, the real-time monitoring of each action in each stage of vehicle driving is realized, the running danger of the vehicle caused by misjudgment of the driving state is avoided, and the running safety of the vehicle is effectively ensured.
In one embodiment, as shown in fig. 6, the CAN interrupt receiving function in step 4 is:
judging whether each ID port of the unmanned tractor industrial personal computer allows to receive data;
if so, putting the data into data receiving buffer areas corresponding to all ID ports of the industrial personal computer of the unmanned tractor;
otherwise, ending the CAN interrupt receiving function process.
The data transmission condition of the CAN bus is judged in sequence, the data transmission condition of the bus is accurately positioned, the accuracy of data transmission is effectively improved, meanwhile, the misjudgment condition of port data transmission is avoided, and the control efficiency and accuracy of the unmanned tractor are effectively improved.
A gateway control apparatus corresponding to the method, as shown in fig. 7 and 8, the apparatus includes a gateway controller;
the data interaction end of the gateway controller is connected with the data interaction end of the unmanned tractor industrial personal computer;
and the data output end of the gateway controller is respectively connected with a braking device, a steering device and a gear device of the unmanned tractor.
The gateway controller is provided with a plurality of data receiving ports for receiving external data input;
each data receiving port is correspondingly connected with two IO ports on the gateway controller, and a resistor is respectively arranged on a line connecting the data receiving port with the two IO ports of the gateway controller, wherein, as shown in fig. 8, the left RXD1 is simultaneously connected with 2 IO ports of the right chip, which are respectively a 103-th referrer pin and a 91-th pin, but 2 10-ohm resistors are respectively connected in series between the 2 pins, and the serially connected resistors can realize the collision of the IO ports caused by configuration errors, thereby playing a role of protection.
According to the scheme, the interface multiplexing function is effectively realized, namely one port is connected with two IO ports, any one of 2 functions CAN be realized, meanwhile, the device changes a software program, the function of using a CAN bus or a serial port CAN be realized without changing hardware, and the gateway controller has the characteristics of convenience in program writing change, flexibility in controller function change, change and the like.
In one embodiment, as shown in fig. 9, the gateway controller further comprises:
the initialization module is used for initializing the bus CAN, the serial port IO and the gateway controller;
the ID port data sending and judging module is used for sequentially judging whether each ID port of the unmanned tractor industrial personal computer needs to send data or not;
the automatic driving mode judging module is used for judging whether the unmanned tractor is in an automatic driving mode or not;
the steering operation judging module is used for judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
the braking operation judging module is used for judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
the gear operation judging module is used for judging whether the operation of the gears of the unmanned tractor is in a manual mode;
the working mode determining module is used for determining that the working mode of the unmanned tractor is 1 or 0;
and the bus data judgment module is used for sequentially judging whether data are to be sent on the CAN1, CAN2 and CAN4 buses.
The data transmission condition and the unmanned aerial vehicle operating condition of accurate positioning industrial computer port have effectively improved the accuracy of data transmission and vehicle control, avoid the condition of port data transmission erroneous judgement simultaneously, have effectively improved the control efficiency and the accuracy of unmanned driving tractor.
In one embodiment, as shown in fig. 9, the ID port data transmission determining module includes:
the first ID port data judgment module is used for judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
the second ID port data judgment module is used for judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
the third ID port data judgment module is used for judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
the fourth ID port data judgment module is used for judging whether a fourth ID port of the industrial personal computer of the unmanned tractor needs to send data or not;
the fifth ID port data judgment module is used for judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
and the sixth ID port data judgment module is used for judging whether the sixth ID port of the unmanned tractor industrial personal computer needs to send data or not.
The data transmission condition of the port of the industrial personal computer is accurately positioned, the accuracy of data transmission is effectively improved, meanwhile, the condition of misjudgment of port data transmission is avoided, and the control efficiency and accuracy of the unmanned tractor are effectively improved.
In one embodiment, as shown in fig. 8, the operation mode determination module includes:
a foot brake working mode determining module for judging whether the unmanned tractor has foot brake operation,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the industrial personal computer working mode determining module is used for judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is a manual mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the communication state working mode determines each module and is used for judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
The working state of the unmanned tractor is effectively judged, the high-efficiency and high-accuracy judgment performance is realized, the real-time monitoring of each action in each stage of vehicle driving is realized, the running danger of the vehicle caused by misjudgment of the driving state is avoided, and the running safety of the vehicle is effectively ensured.
In one embodiment, as shown in fig. 9, the CAN interrupt the receive function module to determine whether each ID port of the industrial personal computer of the unmanned tractor allows data reception.
The data transmission condition of the CAN bus is judged, the data transmission condition of the bus is accurately positioned, the accuracy of data transmission is effectively improved, meanwhile, the misjudgment condition of port data transmission is avoided, and the control efficiency and accuracy of the unmanned tractor are effectively improved.
It will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (10)
1. A gateway control method for use by an unmanned tractor, the gateway control method comprising:
step 1, initializing a bus CAN, a serial port IO and a gateway controller in sequence; the bus CAN comprises four buses of CAN1, CAN2, CAN3 and CAN 4; the CAN1 connects the gateway controller with the brake device; the CAN2 is used for connecting the gateway controller with the gear device; the CAN3 connects the gateway controller with the industrial personal computer; CAN4 connects the gateway controller with the steering device; the serial port IO is an IO pin interface of the gateway controller;
step 2, starting a CAN3 process, and sequentially judging whether each ID port of the unmanned tractor industrial personal computer needs to send data;
if so, transferring the data to be sent by the corresponding ID port to a sending buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data;
step 3, starting a serial port IO process, and firstly, judging whether the unmanned tractor is in an automatic driving mode or not;
if so, finishing the judgment of the automatic driving mode of the unmanned tractor;
if not, sequentially judging whether the three operation modes of steering, braking and gear of the unmanned tractor are manual modes;
then, determining the working mode of the unmanned tractor;
step 4, sequentially judging whether data are to be sent on the CAN1, CAN2 and CAN4 buses;
if yes, sequentially starting the CAN1, the CAN2 and the CAN4 to send a CAN interruption receiving function;
if not, ending the bus data sending condition judgment process;
and (5) repeating the steps 2 to 4.
2. The gateway control method for the unmanned tractor according to claim 1, wherein the specific process of starting the bus process to determine whether the ID port of the industrial personal computer of the unmanned tractor is to send data in step 2 includes:
s101, judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
if so, transferring the data to be sent by the first ID port to a data buffer area;
otherwise, entering S102;
s102, judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the second ID port to a data buffer area;
otherwise, entering S103;
s103, judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the third ID port to a data buffer area;
otherwise, entering S104;
s104, judging whether a fourth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fourth ID port to a data buffer area;
otherwise, entering S105;
s105, judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the fifth ID port to a data buffer area;
otherwise, entering S106;
s106, judging whether a sixth ID port of the unmanned tractor industrial personal computer needs to send data or not;
if so, transferring the data to be sent by the sixth ID port to a data buffer area;
otherwise, ending the process of judging whether the ID port of the industrial personal computer needs to send data.
3. The gateway control method for the unmanned tractor according to claim 1, wherein the specific process of determining whether the unmanned tractor is in the automatic driving mode in step 3 comprises:
s201, judging whether the unmanned tractor is in an automatic driving state or not;
if so, ending the judgment process of the automatic driving state of the unmanned tractor;
otherwise, entering S202;
s202, judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
if yes, entering S203;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the steering operation of the unmanned tractor to be switched into the manual mode;
s203, judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
if yes, entering S204;
otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the braking operation of the unmanned tractor to be switched into the manual mode;
s204, judging whether the operation of the gear of the unmanned tractor is in a manual mode;
if so, finishing the judgment of three operation working modes of steering, braking and gear of the unmanned tractor;
and otherwise, sending an instruction for switching the manual mode to an industrial personal computer of the unmanned tractor, so that the industrial personal computer controls the gear operation of the unmanned tractor to be switched into the manual mode.
4. The gateway control method for the unmanned tractor according to claim 1, wherein the specific process of determining the working mode of the unmanned tractor in step 3 comprises:
s301, judging whether the unmanned tractor has a service brake operation or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s302, judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is an artificial mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
s303, judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
5. The gateway control method for use by an unmanned tractor according to claim 1, wherein the CAN interrupt receive function of step 4 is:
judging whether each ID port of the unmanned tractor industrial personal computer allows to receive data;
if so, putting the data into data receiving buffer areas corresponding to all ID ports of the industrial personal computer of the unmanned tractor;
otherwise, ending the CAN interrupt receiving function process.
6. A gateway control apparatus according to any one of claims 1 to 5, wherein said apparatus comprises a gateway controller;
the data interaction end of the gateway controller is connected with the data interaction end of the unmanned tractor industrial personal computer;
the data output end of the gateway controller is respectively connected with a braking device, a steering device and a gear device of the unmanned tractor;
the gateway controller is provided with a plurality of data receiving ports for receiving external data input;
each data receiving port is correspondingly connected with two IO ports on the gateway controller, and a resistor is arranged on a line connecting the data receiving port with the two IO ports of the gateway controller.
7. The gateway control apparatus for use by an unmanned tractor according to claim 6, wherein the gateway controller further comprises:
the initialization module is used for initializing the bus CAN, the serial port IO and the gateway controller;
the ID port data sending and judging module is used for sequentially judging whether each ID port of the unmanned tractor industrial personal computer needs to send data or not;
the automatic driving mode judging module is used for judging whether the unmanned tractor is in an automatic driving mode or not;
the steering operation judging module is used for judging whether the operation of the steering action of the unmanned tractor is in a manual mode;
the braking operation judging module is used for judging whether the operation of the braking action of the unmanned tractor is in a manual mode;
the gear operation judging module is used for judging whether the operation of the gears of the unmanned tractor is in a manual mode;
the working mode determining module is used for determining that the working mode of the unmanned tractor is 1 or 0;
and the bus data judgment module is used for sequentially judging whether data are to be sent on the CAN1, CAN2 and CAN4 buses.
8. The gateway control apparatus for use by an unmanned tractor according to claim 7, wherein the ID port data transmission judging module includes:
the first ID port data judgment module is used for judging whether a first ID port of an industrial personal computer of the unmanned tractor needs to send data or not;
the second ID port data judgment module is used for judging whether a second ID port of the unmanned tractor industrial personal computer needs to send data or not;
the third ID port data judgment module is used for judging whether a third ID port of the unmanned tractor industrial personal computer needs to send data or not;
the fourth ID port data judgment module is used for judging whether a fourth ID port of the industrial personal computer of the unmanned tractor needs to send data or not;
the fifth ID port data judgment module is used for judging whether a fifth ID port of the unmanned tractor industrial personal computer needs to send data or not;
and the sixth ID port data judgment module is used for judging whether the sixth ID port of the unmanned tractor industrial personal computer needs to send data or not.
9. The gateway control apparatus for use by an unmanned tractor according to claim 7, wherein the operating mode determining module comprises:
a foot brake working mode determining module for judging whether the unmanned tractor has foot brake operation,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the industrial personal computer working mode determining module is used for judging whether the industrial control mode sent by the industrial personal computer of the unmanned tractor is a manual mode,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, marking the working mode of the unmanned tractor at the moment as 0;
the communication state working mode determines each module and is used for judging whether the communication between the communication device of the unmanned tractor and the industrial personal computer is interrupted or not,
if so, marking the working mode of the unmanned tractor at the moment as 1;
otherwise, the working mode of the unmanned tractor at the moment is marked as 0.
10. The gateway control apparatus for use by an unmanned tractor according to claim 6, wherein the gateway controller further comprises:
and the CAN interruption receiving function module is used for judging whether each ID port of the industrial personal computer of the unmanned tractor allows data receiving.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010100185.9A CN111290367B (en) | 2020-02-18 | 2020-02-18 | Gateway control method and device for unmanned tractor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010100185.9A CN111290367B (en) | 2020-02-18 | 2020-02-18 | Gateway control method and device for unmanned tractor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111290367A CN111290367A (en) | 2020-06-16 |
CN111290367B true CN111290367B (en) | 2021-06-22 |
Family
ID=71030101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010100185.9A Active CN111290367B (en) | 2020-02-18 | 2020-02-18 | Gateway control method and device for unmanned tractor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111290367B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111854782A (en) * | 2020-06-22 | 2020-10-30 | 北京九曜智能科技有限公司 | Path planning method capable of realizing automatic unhooking and unhooking |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105083169A (en) * | 2015-07-25 | 2015-11-25 | 上海修源网络科技有限公司 | Communication frame of electric automobile controller and electric automobile controller |
CN207664996U (en) * | 2017-12-08 | 2018-07-27 | 北京汽车研究总院有限公司 | A kind of CAN bus system and vehicle for vehicle |
CN208241689U (en) * | 2018-05-14 | 2018-12-14 | 广州莲雾科技有限公司 | A kind of intelligent vehicle-carried gateway |
CN110316204A (en) * | 2019-07-09 | 2019-10-11 | 威马智慧出行科技(上海)有限公司 | Control method, gateway and the automobile of vehicle driving model |
CN110557326A (en) * | 2018-05-30 | 2019-12-10 | 陕西重型汽车有限公司 | vehicle-mounted intelligent remote gateway |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8086368B2 (en) * | 2009-01-06 | 2011-12-27 | Bosch Security Systems Inc. | Variable function communication gateway for vehicles |
CN110225071A (en) * | 2018-03-02 | 2019-09-10 | 上海擎感智能科技有限公司 | Vehicle intelligent gateway and automobile |
-
2020
- 2020-02-18 CN CN202010100185.9A patent/CN111290367B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105083169A (en) * | 2015-07-25 | 2015-11-25 | 上海修源网络科技有限公司 | Communication frame of electric automobile controller and electric automobile controller |
CN207664996U (en) * | 2017-12-08 | 2018-07-27 | 北京汽车研究总院有限公司 | A kind of CAN bus system and vehicle for vehicle |
CN208241689U (en) * | 2018-05-14 | 2018-12-14 | 广州莲雾科技有限公司 | A kind of intelligent vehicle-carried gateway |
CN110557326A (en) * | 2018-05-30 | 2019-12-10 | 陕西重型汽车有限公司 | vehicle-mounted intelligent remote gateway |
CN110316204A (en) * | 2019-07-09 | 2019-10-11 | 威马智慧出行科技(上海)有限公司 | Control method, gateway and the automobile of vehicle driving model |
Also Published As
Publication number | Publication date |
---|---|
CN111290367A (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8552729B2 (en) | State monitoring unit for assembled battery | |
CN102857397B (en) | The how main asynchronous duplex differential bus of one and the means of communication | |
CN109494418B (en) | Battery core sampling device and method of battery management system | |
CN101947938B (en) | Hybrid power CAN network communication system | |
CN101499046A (en) | SPI equipment communication circuit | |
CN109542817B (en) | Universal electronic countermeasure equipment control framework | |
CN201307060Y (en) | OBD communication diagnostic test station | |
CN111290367B (en) | Gateway control method and device for unmanned tractor | |
CN102279581B (en) | Integral test device for pico-satellite | |
CN117075571A (en) | Test method, test system, test equipment and readable storage medium | |
CN209860931U (en) | Intelligent CAN bus diagnosis monitor | |
CN108519936B (en) | Verification system and method for data transmission bus of effective load subsystem | |
CN101320269A (en) | Car body control module with CAN diagnosis | |
CN113934192A (en) | Simulation debugging system and method for vehicle information system | |
CN2529204Y (en) | Remote supervisory and controlling device for vehicle engineering machinery | |
CN115663549B (en) | Multi-interface conversion device and vehicle | |
KR20210066554A (en) | Apparatus for controlling a vehicle and method thereof | |
CN215679082U (en) | CAN bus test system | |
CN206594471U (en) | A kind of composite power source pure electric vehicle controller | |
CN116074397A (en) | Data sharing system | |
JP4453449B2 (en) | In-vehicle communication module and in-vehicle device | |
CN103473206A (en) | Data transmission method and I2C (Inter-Integrated Circuit) interface extender | |
CN113630294A (en) | Switch modularization detection method and device | |
CN220401774U (en) | Communication detecting system based on vehicle-mounted gateway | |
CN220232439U (en) | Vehicle USB and OBD data conversion device |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230103 Address after: No. 1-1, Aofeng Road, Wozhou Town, Xinchang County, Shaoxing City, Zhejiang Province 312500 Patentee after: Jiuyao Intelligent Technology (Zhejiang) Co.,Ltd. Address before: Floor 9, building 26, courtyard 9, Linhe Avenue, Renhe Town, Shunyi District, Beijing Patentee before: Beijing Jiuquan Intelligent Technology Co.,Ltd. |