CN110768801B - A device and method for simulating AGV communication mode - Google Patents
A device and method for simulating AGV communication mode Download PDFInfo
- Publication number
- CN110768801B CN110768801B CN201810840392.0A CN201810840392A CN110768801B CN 110768801 B CN110768801 B CN 110768801B CN 201810840392 A CN201810840392 A CN 201810840392A CN 110768801 B CN110768801 B CN 110768801B
- Authority
- CN
- China
- Prior art keywords
- microcontroller
- data
- network
- instruction
- ethernet
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/10—Current supply arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention relates to a device and a method for simulating an AGV communication mode, wherein the device comprises: the system comprises a power supply, an embedded microcontroller, an Ethernet controller, a physical layer chip, a USB bridge chip, an EEPROM and the like; the method comprises the following steps: the USB power supply and communication system is characterized in that the microcontroller controls parameters, protocol types, data sending start and stop, data sending interval time, data sending length and the like of the Ethernet according to instructions sent by the USB or the virtual serial port, meanwhile, the system has data receiving capacity, performs data processing and instruction execution and counts the received data quantity, and the EEPROM can store the data such as set parameters and the like when the power fails. The device and the method can simulate the communication mode of the AGV equipment in large-scale network application, test the network performance and control the function of the scheduling software by the upper computer, and have the advantages of small volume, low cost, convenient use and the like.
Description
Technical Field
The invention relates to a device and a method for simulating an AGV communication mode, in particular to a device and a method for testing large-scale network performance and controlling and scheduling software functions by an upper computer.
Background
With the continuous development of the internet of things, a large-scale networking technology is widely applied. However, when testing networking of large-scale equipment such as an AGV and a machine tool, a sufficient number of terminal devices cannot be purchased in a short time due to high price. If a device and a method can simulate the devices to carry out networking communication, the network performance can be tested in advance and the upper computer controls the scheduling software.
In the networking operation process of the AGV, the communication with an upper computer is basically as follows: the method comprises the steps that an AGV periodically uploads state information including landmarks, directions, speeds, electric quantity and the like; and the upper computer aperiodically downloads instructions including starting, stopping, steering, speed regulation and the like. The invention provides a device and a method for simulating an AGV communication mode, which can simulate the communication between the AGV and an upper computer, periodically upload state information and feed back an instruction issued by the upper computer. The network performance can be tested and the functions of the upper computer control scheduling software can be tested before the large-scale AGV layout.
Disclosure of Invention
The invention designs a device and a method for simulating an AGV communication mode aiming at the Ethernet network performance test.
The technical scheme adopted by the invention for solving the technical problems is as follows: a device for simulating an AGV communication mode comprises a microcontroller, a USB power supply and communication interface and an EEPROM, wherein the USB power supply and communication interface and the EEPROM are connected with the microcontroller:
the microcontroller is used for judging received data and setting a network and transmission;
the USB power supply and communication interface is used for supplying power to the device and connecting the PC to realize the configuration function of the device;
and the EEPROM is used for storing the data in a power-down mode.
When the microcontroller is provided with a USB slave interface and an Ethernet MAC, a differential line of the USB slave interface is directly connected to a USB power supply and communication interface; the MII or RMII interface of the microcontroller is used to connect an ethernet PHY chip which is in turn connected to an RJ45 jack of a discrete or integrated ethernet transformer.
When the microcontroller does not have a USB slave interface and an Ethernet MAC, the USB end of the USB-UART bridge chip is connected to a USB power supply and communication interface, and the UART end is connected to the microcontroller;
when the ethernet MAC chip is integrated with the PHY, one end of the ethernet MAC chip is connected to the microcontroller and the other end is directly connected to the RJ45 jack of a discrete or integrated ethernet transformer.
When the Ethernet MAC chip is not integrated with PHY, one end of the Ethernet MAC chip is connected to the controller, and the other end of the Ethernet MAC chip is connected to an RJ45 socket of a discrete or integrated Ethernet transformer through the Ethernet PHY chip.
A method for simulating AGV communication comprises the following steps:
the microcontroller reads each saved parameter from the EEPROM and initializes each peripheral;
after the serial port receiving interruption, when the received data is an effective instruction, the operations of network parameter setting, target parameter setting, network protocol setting, network sending control, user data setting and query instruction are sequentially carried out.
The network parameter setting step, the microcontroller configures the IP, MAC, subnet mask and gateway address of the system according to the instruction, and stores the network parameter configuration information into the EEPROM;
setting the target parameters, configuring the target address and the port information by the microcontroller according to the instruction, and storing the target parameter configuration information into the EEPROM;
and in the network protocol setting, the microcontroller sets a TCP (transmission control protocol) or UDP (user datagram protocol) protocol according to the instruction and stores the network protocol configuration information into the EEPROM (electrically erasable programmable read-only memory).
The network sending setting is that the microcontroller sets the sending data length and the time interval according to the instruction, re-initializes the timer according to the time interval setting, and stores the network sending configuration information into the EEPROM;
the network transmission control, the microcontroller modifies the network transmission control flag bit according to the instruction, judges the flag bit when the timer is interrupted, controls the Ethernet to transmit corresponding data if the flag bit is allowed to be transmitted, and does not transmit the data if the flag bit is not allowed to be transmitted;
the user data setting step, the microcontroller modifies the user data area according to the instruction and stores the modified data into the EEPROM;
and the microcontroller returns the system network parameters, the target network parameters, the sending data parameters, the receiving data quantity and the software version number according to the query instruction.
If the data received by the serial port is not the instruction with the set format, prompting the instruction frame format and the command code of the corresponding function.
A simulation AGV communication method is used for simulating a communication mode of network equipment, is connected with a wireless node and communicates with an upper computer.
The network device is an AGV.
The invention provides a convenient network testing approach for large-scale application of AGV, tests network performance and functions of upper computer control scheduling software, has various advantages of small volume, low cost, convenient use and the like, and has the following beneficial effects and advantages:
(1) small volume and low cost.
(2) The USB interface can be inserted into equipment to provide a 5V power supply, and the use is convenient.
(3) The network parameters, data length and time interval can be set, the receiving and sending can be controlled, the network protocol can be switched, and various data can be stored when the power is down.
(4) The user can design data by himself, simulate various network terminals not limited to AGV application, and test related network performance and upper computer control scheduling software functions before actual terminal equipment is accessed. .
Drawings
FIG. 1 is a block diagram of a system architecture when a microcontroller has a USB slave interface and an Ethernet MAC;
FIG. 2 is a block diagram of the system architecture of the microcontroller without the USB slave interface and Ethernet MAC;
fig. 3 is a system program flow chart.
Detailed Description
The present invention will be described in further detail with reference to examples.
As shown in fig. 1 to 2, an apparatus for simulating AGV communication method includes:
the USB slave machine interface is used for communication and power supply;
the power supply conversion circuit is used for converting 5V supplied by the USB into power supply voltage required by a system;
the microcontroller is used for overall control and data processing;
and the EEPROM is connected with the microcontroller and used for storing data in a power-down mode.
If the microcontroller is provided with a USB slave and an Ethernet MAC, directly connecting a D +/D-differential line of the USB slave to a USB socket; the MII or RMII interface is used to connect the Ethernet PHY chip, ultimately to an RJ45 jack for a discrete or integrated Ethernet transformer. The device is firstly connected to a PC through a USB interface for configuration, then the USB and the RJ45 are connected to a wireless network node, and data transmission simulating an AGV communication mode is carried out according to configuration information.
If the microcontroller is not provided with a USB slave and an Ethernet MAC, the USB end from the USB to the UART bridge chip can be connected into a USB socket of the device, and the UART end is connected to the microcontroller; and connecting the Ethernet MAC chip to the microcontroller, if the MAC chip is integrated with the PHY, directly connecting the Ethernet MAC chip to an RJ45 socket of a discrete or integrated Ethernet transformer, otherwise, connecting the Ethernet PHY chip to an RJ45 socket of the discrete or integrated Ethernet transformer. The device is firstly connected to a PC through a USB interface for configuration, then the USB and the RJ45 are connected to a wireless network node, and data transmission of an analog AGV communication mode is carried out according to configuration information.
A method for simulating AGV communication mode includes:
parameter configuration and instruction sending functions can be carried out through the USB port;
data transmission and reception may be performed through the ethernet port.
The microcontroller can configure parameters of the system such as IP, MAC, subnet mask, gateway address and the like according to the network parameter setting instruction and store the configuration information into the EEPROM.
The microcontroller can configure information such as target addresses, ports and the like according to the target parameter setting instruction and store the configuration information into the EEPROM.
The microcontroller can set the corresponding setting of the TCP or UDP protocol according to the network protocol setting instruction and store the configuration information into the EEPROM.
The microcontroller can set the length and time interval of the transmitted data according to the network transmission setting instruction, reinitialize the timer according to the time interval setting, and store the configuration information into the EEPROM.
The microcontroller can modify the network transmission control flag bit according to the network transmission control instruction, judge the flag bit when the timer is interrupted, and control the Ethernet to transmit corresponding data if the transmission is allowed.
The microcontroller can modify the user data area according to the user data setting instruction and store the modified data into the EEPROM.
The microcontroller can return system network parameters, target network parameters, data sending parameters, data receiving quantity, software version numbers and other data according to the query instruction.
If the data received by the microcontroller is not a standard configuration instruction, the data automatically returns to a help menu to prompt the format of an instruction frame and a command code of a corresponding function.
The microcontroller of the implementation model machine adopts STM32F030F3P6, has the characteristics of small volume, low cost, easy development and the like, and has no USB slave interface and an Ethernet MAC layer, so that a USB is required to be externally connected to a UART bridge chip CP2102 and an Ethernet protocol chip W5500, and an AT24C02 memory is used for storing data. The USB power supply and communication system is characterized in that the USB power supply and communication system is adopted, the microcontroller controls parameters, protocol types, data sending start and stop, data sending interval time, data sending length and the like of the Ethernet according to instructions sent by the USB or the virtual serial port, meanwhile, the system has data receiving capacity, performs data processing and instruction execution and counts the data receiving quantity, and the EEPROM can store the data such as set parameters in a power-down mode.
The microcontroller firstly reads each saved parameter from the EEPROM to initialize each peripheral, and then opens three interrupts of serial port receiving, network receiving and timer period timing.
As shown in fig. 3, the serial port is used for receiving an instruction configuration system of the upper computer, and after the serial port is interrupted in receiving, whether the received data is a valid instruction needs to be judged, and if the instruction is invalid, the next data is waited; if the instruction is valid, the following steps are carried out:
1. and a network parameter setting instruction, and the microcontroller configures parameters of the system such as IP, MAC, subnet mask, gateway address and the like according to the instruction and stores configuration information into the EEPROM.
2. And setting a target parameter instruction, configuring information such as a target address, a port and the like by the microcontroller according to the instruction, and storing the configuration information into the EEPROM.
3. And setting a command by the network protocol, setting the corresponding setting of the TCP or UDP protocol by the microcontroller according to the command, and storing the configuration information into the EEPROM.
4. The network sends a setting instruction, the microcontroller sets the data sending length and the time interval according to the instruction, re-initializes the timer according to the time interval setting, and stores the configuration information into the EEPROM.
5. The network sends a control instruction, the microcontroller modifies the network sending control zone bit according to the instruction, judges the zone bit when the timer is interrupted, and controls the Ethernet to send corresponding data if the sending is allowed.
6. And the microcontroller modifies the user data area according to the instruction and stores the modified data into the EEPROM.
7. And inquiring the instruction, and returning the data such as the system network parameter, the target network parameter, the sending data parameter, the receiving data quantity, the software version number and the like by the microcontroller according to the instruction.
8. If the data received by the serial port is not the standard configuration instruction, the data automatically returns to the help menu to prompt the instruction frame format and the command code of the corresponding function.
After the Ethernet receives the interrupt trigger, the microcontroller can perform operations such as instruction execution, data analysis, data quantity statistics and the like according to the received data, and perform corresponding data feedback on the upper computer.
After the timer period is triggered by interruption, the microcontroller judges the current network transmission zone bit, and if the current network transmission zone bit is allowed to be transmitted, the Ethernet data with the specified data volume is transmitted according to the timing period of the timer.
After the configuration of the AGV communication mode simulation device is finished, the AGV communication mode simulation device is connected with a wireless node, and can simulate actual AGV equipment to complete wireless communication with an upper computer. The function of upper control scheduling software can be tested under the condition that actual AGV equipment is not enough while the performance of the wireless network is tested.
Claims (3)
1. The utility model provides a device of simulation AGV communication mode which characterized in that includes microcontroller and USB power supply and communication interface, EEPROM rather than being connected:
the microcontroller is used for judging received data and setting a network and transmission;
the USB power supply and communication interface is used for supplying power to the device and connecting the PC to realize the configuration function of the device;
the EEPROM is used for storing data in a power-down mode;
when the microcontroller is provided with a USB slave interface and an Ethernet MAC, a differential line of the USB slave interface is directly connected to a USB power supply and communication interface; the MII or RMII interface of the microcontroller is connected with an Ethernet PHY chip, and the Ethernet PHY chip is connected with an RJ45 socket of a discrete or integrated Ethernet transformer;
when the microcontroller does not have a USB slave interface and an Ethernet MAC, the USB end of the USB-UART bridge chip is connected to a USB power supply and communication interface, and the UART end is connected to the microcontroller;
when the Ethernet MAC chip is integrated with the PHY, one end of the Ethernet MAC chip is connected to the microcontroller, and the other end of the Ethernet MAC chip is directly connected to an RJ45 socket of a discrete or integrated Ethernet transformer;
when the Ethernet MAC chip is not integrated with PHY, one end of the Ethernet MAC chip is connected to the controller, and the other end of the Ethernet MAC chip is connected to an RJ45 socket of a discrete or integrated Ethernet transformer through the Ethernet PHY chip.
2. A simulation AGV communication method is characterized in that:
the microcontroller reads each saved parameter from the EEPROM and initializes each peripheral;
after the serial port receiving interruption, when the received data is an effective instruction, the operations of network parameter setting, target parameter setting, network protocol setting, network sending control, user data setting and query instruction are sequentially carried out;
the network parameter setting step, the microcontroller configures the IP, MAC, subnet mask and gateway address of the system according to the instruction, and stores the network parameter configuration information into the EEPROM;
setting the target parameters, configuring the target address and the port information by the microcontroller according to the instruction, and storing the target parameter configuration information into the EEPROM;
setting the network protocol, setting a TCP (transmission control protocol) or UDP (user datagram protocol) protocol by the microcontroller according to the instruction, and storing the configuration information of the network protocol into the EEPROM (electrically erasable programmable read-only memory);
the network sending setting is that the microcontroller sets the sending data length and the time interval according to the instruction, re-initializes the timer according to the time interval setting, and stores the network sending configuration information into the EEPROM;
the network transmission control, the microcontroller modifies the network transmission control flag bit according to the instruction, judges the flag bit when the timer is interrupted, controls the Ethernet to transmit corresponding data if the flag bit is allowed to be transmitted, and does not transmit the data if the flag bit is not allowed to be transmitted;
the user data setting step, the microcontroller modifies the user data area according to the instruction and stores the modified data into the EEPROM;
the micro-controller returns the system network parameter, the target network parameter, the sending data parameter, the receiving data quantity and the software version number according to the inquiry instruction
The wireless node is used for simulating the communication mode of network equipment, is connected with the wireless node and is communicated with an upper computer;
the network device is an AGV.
3. A method for simulating AGV communication according to claim 2, further comprising: if the data received by the serial port is not the instruction with the set format, prompting the instruction frame format and the command code of the corresponding function.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810840392.0A CN110768801B (en) | 2018-07-27 | 2018-07-27 | A device and method for simulating AGV communication mode |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810840392.0A CN110768801B (en) | 2018-07-27 | 2018-07-27 | A device and method for simulating AGV communication mode |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110768801A CN110768801A (en) | 2020-02-07 |
| CN110768801B true CN110768801B (en) | 2022-02-11 |
Family
ID=69326963
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810840392.0A Active CN110768801B (en) | 2018-07-27 | 2018-07-27 | A device and method for simulating AGV communication mode |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110768801B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN202009466U (en) * | 2011-03-08 | 2011-10-12 | 深圳创维数字技术股份有限公司 | Portable set-top box tester |
| CN203978498U (en) * | 2014-03-20 | 2014-12-03 | 江苏联合职业技术学院徐州财经分院 | Embedded Internet remote gas watch-dog |
| CN106936495A (en) * | 2017-03-23 | 2017-07-07 | 厦门优迅高速芯片有限公司 | The automatic testing equipment and method of a kind of smooth transceiving chip |
| CN107908179A (en) * | 2017-12-18 | 2018-04-13 | 湖州振硕自动化科技有限公司 | A kind of Portable aircraft brake controller detector |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8325710B2 (en) * | 2007-08-09 | 2012-12-04 | Phybridge Inc. | Inline power system and method for network communications |
| CN105785958B (en) * | 2016-05-08 | 2018-02-13 | 杭州集控科技有限公司 | Multi-functional data collector, acquisition system and method based on wisdom factory |
-
2018
- 2018-07-27 CN CN201810840392.0A patent/CN110768801B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN202009466U (en) * | 2011-03-08 | 2011-10-12 | 深圳创维数字技术股份有限公司 | Portable set-top box tester |
| CN203978498U (en) * | 2014-03-20 | 2014-12-03 | 江苏联合职业技术学院徐州财经分院 | Embedded Internet remote gas watch-dog |
| CN106936495A (en) * | 2017-03-23 | 2017-07-07 | 厦门优迅高速芯片有限公司 | The automatic testing equipment and method of a kind of smooth transceiving chip |
| CN107908179A (en) * | 2017-12-18 | 2018-04-13 | 湖州振硕自动化科技有限公司 | A kind of Portable aircraft brake controller detector |
Non-Patent Citations (1)
| Title |
|---|
| AGV远程控制系统设计与实现;孙凌;《中国优秀硕士学位论文全文数据库(电子期刊)》;20160415;摘要,第3、5章 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110768801A (en) | 2020-02-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108270883B (en) | Can automatic dispensing device address code method, breaker and storage medium | |
| CN109981360B (en) | Internet of things equipment site opening method, device and system and storage medium | |
| CN105823167A (en) | Air conditioner control method and air conditioner | |
| CN101132328A (en) | Real-time industrial Ethernet EtherCAT communication controller | |
| CN207039633U (en) | A smart home system gateway | |
| CN102297493A (en) | System and method for monitoring air conditioning unit | |
| CN108449236B (en) | Router function test system | |
| CN108123860A (en) | The ID of intelligent domestic system node device based on CAN bus is distributed automatically and management method | |
| CN104518910B (en) | Apparatus for configuring Ethernet device and method for configuring Ethernet device | |
| CN111131536B (en) | Efficient configuration method, device and system for communication address and electric meter | |
| CN114745740A (en) | Intelligent household appliance upgrading system and method | |
| CN110768801B (en) | A device and method for simulating AGV communication mode | |
| CN101106495A (en) | Apparatus and method for displaying working process of industrial Ethernet streamlined IP protocol | |
| CN112260894A (en) | CAN bus network system performance test platform and use method | |
| CN111107507B (en) | LoRa equipment networking method suitable for geological disaster monitoring application | |
| CN102710672B (en) | The access method of data card form web page control inerface and system | |
| CN114641978B (en) | Method for configuring wireless HART device using bluetooth | |
| CN107360295A (en) | A kind of test main frame and method | |
| CN109889368B (en) | GPRS remote upgrading method based on STM32 controller | |
| KR101266021B1 (en) | Apparatus and method for controlling mobile terminal in data communication system | |
| CN217656706U (en) | Network adapter and control system | |
| CN106648805A (en) | Intelligent device, intelligent system, and method for intelligently installing application | |
| CN115460073A (en) | Device configuration method, device, device deployment system and storage medium | |
| CN114594713A (en) | Network adapter, control system, and motor control method | |
| CN105187305B (en) | LTE dongle adaptive approach and system for LTE uplink home gateways |
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 |