Logistics robot PLC controller communication optimization method and system based on TCP / IP protocol
By developing a communication optimization method and system for logistics robot PLC controllers based on the TCP/IP protocol, the problem of low communication efficiency in multi-level shuttle vehicles was solved, achieving more efficient and stable communication, increasing the amount of data, and ensuring the real-time nature of the data.
Patent Information
- Application Number
- CN202310196659.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-03-02
AI Technical Summary
In the logistics industry, the PLC communication efficiency of multi-level shuttles is low, and they cannot directly interface with WCS/WMS systems or edge computers, resulting in excessive pressure on the software. Furthermore, the existing Modbus TCP protocol has poor communication efficiency on multi-level shuttles.
A communication optimization method and system for logistics robot PLC controllers based on the TCP/IP protocol is adopted. By optimizing the communication between the TCP client and TCP server, verification data is generated and processed, and automatic reconnection and disconnection are performed when communication problems occur, thereby improving communication stability.
It shortens the communication time on the multi-level shuttle of the logistics robot, improves communication efficiency and stability, increases the amount of data in a single communication, and ensures the real-time nature of the data and the stability of the system.
Smart Images

Figure CN116320071B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Things, in particular to a logistics robot PLC controller communication optimization method and system based on TCP / IP protocol. BACKGROUND
[0002] With the rapid development of communication technology, modern logistics has gradually improved and progressed. Whether it is warehousing, transportation or distribution, the advanced technology is integrated into each link, which greatly improves the efficiency and service quality of logistics. Logistics cannot be separated from the support of communication technology, and at the same time, due to the particularity of many application scenarios of logistics, various communication technologies need to be cross-used to complete the corresponding work. Mobile communication technology, as the mainstream communication technology of logistics, is the main tool for data transmission between logistics nodes. At present, mobile communication technology is mostly applied in the following aspects: first, mobile communication technology serves as a transmission tool for information flow of goods in the logistics transportation process; second, it serves as a bridge for data communication in the warehouse management platform; third, it serves as an important data transmission technology in the intelligent logistics supply chain. In summary, communication technology plays an important role in data transmission in the logistics industry.
[0003] In the logistics industry, the commonly used Modbus TCP protocol can be well applied on the stacker robot, but it cannot achieve the communication efficiency we need on the multi-layer shuttle. The stacker 1 single machine directly interfaces with the WCS / WMS system or edge computer, and the polling time in the middle is 200ms, which is acceptable in actual application. However, if there are 100 multi-layer shuttles, the WCS / WMS system or edge computer cannot be directly connected. Direct connection may cause the software part to be dragged down. We add a layer of PLC part or an edge computer in the middle to improve the stability of the entire system. For example, each 10 PLCs are connected to an upper layer PLC, and then the actual software part only connects to 10 PLCs, reducing the pressure on the software part. Then the 10 PLCs are connected to 10 bottom layer PLCs respectively. If all are polling scanning, the efficiency will be very low. SUMMARY
[0004] The embodiment of the present application provides a logistics robot PLC controller communication optimization method and system based on TCP / IP protocol. The technical scheme is as follows:
[0005] In one aspect, a logistics robot PLC controller communication optimization method based on a TCP / IP protocol is provided. The method is implemented by a logistics robot PLC controller communication optimization system based on a TCP / IP protocol. The system includes a TCPClient end and a TCP Server end. Both the TCPClient end and the TCP Server end are communicated by a PLC.
[0006] The method includes:
[0007] S1, the TCP Client end and the TCP Server end establish a communication connection based on a TCP / IP protocol;
[0008] S2, the TCP Client end sends a request data sending instruction to the TCP Server end;
[0009] S3, when the TCP Server end receives the request data sending instruction, the TCP Server end generates verification data and sends the verification data to the TCP Client end;
[0010] S4, the TCP Client end receives the verification data, processes the verification data, and sends feedback information to the TCP Server end;
[0011] S5, the TCP Server end processes the established communication connection according to the feedback information.
[0012] Optionally, the TCP Client end is a lifting machine or a shuttle vehicle, and the TCP Server end is an edge computer.
[0013] Optionally, the TCP Server end generates verification data, including:
[0014] The TCP Server end generates a string of unique code, current time, authentication token, task type, service message, library layer number, interface line body layer number, interface line body number, container number, container counter, container width, container length, and container height.
[0015] The TCP Server end concatenates the generated string, and determines the concatenated string as the verification data.
[0016] Optionally, in S4, the TCP Client end receives the verification data, processes the verification data, and sends feedback information to the TCP Server end, including:
[0017] The TCP Client receives the authentication data, saves the string in the authentication data in an array, and sends the string to the TCP Server;
[0018] The TCP Client receives the authentication data, saves the string in the authentication data in an array, and sends the string to the TCP Server;
[0019] The TCP Client receives the authentication data, saves the string in the authentication data in an array, and sends the string to the TCP Server;
[0020] The TCP Client receives the authentication data, saves the string in the authentication data in an array, and sends the string to the TCP Server.
[0021] Optionally, the method further comprises: the PC real-time detects the communication status between the TCP Server and the TCP Client;
[0022] When the communication problem between the TCP Server and the TCP Client is detected, the type of the communication problem is determined;
[0023] If the type of the communication problem is disconnection, the PC sends a reconnection notification to the TCP Server and the TCP Client respectively, so that the TCP Server and the TCP Client are automatically reconnected;
[0024] If the type of the communication problem is online error, the PC sends an online error notification to the TCP Server and the TCP Client respectively, so that the two devices are disconnected.
[0025] On the other hand, a logistics robot PLC controller communication optimization system based on TCP / IP protocol is provided, which is used to realize a logistics robot PLC controller communication optimization method based on TCP / IP protocol. The system comprises a TCP Client and a TCP Server, and the TCP Client and the TCP Server are communicated by PLC; wherein:
[0026] The TCP Server is used to establish a communication connection with the TCP Client, receive a request data sending instruction, generate authentication data, send the authentication data to the TCP Client, and process the established communication connection according to feedback information;
[0027] The TCP Client is configured to establish a communication connection with the TCP Server, send a data sending instruction to the TCP Server, receive verification data, perform data processing on the verification data, and send feedback information to the TCP Server.
[0028] Optionally, the TCP Client is a hoist or a shuttle vehicle, and the TCP Server is an edge computer.
[0029] Optionally, the TCP Server is further configured to:
[0030] The TCP Server generates a string of unique code, current time, authentication token, task type, service message, library layer number, interface line body layer number, interface line body number, container number, container counter, container width, container length, and container height.
[0031] The TCP Server performs string splicing on the generated string, and determines the spliced string as verification data.
[0032] Optionally, the TCP Client is further configured to:
[0033] After receiving the verification data, the TCP Client saves the string in the verification data in an array.
[0034] All information in the string is separated and stored in a string array.
[0035] Task strings of the same layer applied to the warehouse are stored in an array according to the library layer number in the string, and the number of tasks received by each layer is counted.
[0036] The unique code is sent to the TCP Server as feedback data.
[0037] Optionally, the system further comprises a PC.
[0038] The PC is configured to:
[0039] The PC is configured to:
[0040] When a communication problem is detected between the TCP Server and the TCP Client, the type of the communication problem is determined.
[0041] If the communication problem type is disconnection, the PC sends a reconnection notification to the TCP Server end and the TCP Client end respectively, so that the TCP Server end and the TCP Client end are automatically reconnected;
[0042] If the communication problem type is online error, the PC sends an online error notification to the TCP Server end and the TCP Client end respectively, so that the two devices are disconnected.
[0043] The technical scheme provided by the embodiment of the application has at least the following beneficial effects:
[0044] In the embodiment of the application, the communication time of the PLC on the multi-layer shuttle vehicle of the logistics robot is shortened, and the functions of data sending, data receiving, data processing and data retransmission are solved, so that the communication efficiency is improved. At the same time, the TCP Client can be reconnected after disconnection, and the connection can be reestablished after online error, so that the stability of the communication is improved. The cost of the comprehensive system level, the function implementation of the single machine, the stability of the network, whether the software part is easy to implement and other problems are considered to ensure the real-time performance of the data, and the data amount of single communication is expanded. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical scheme in the embodiment of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0046] Figure 1 It is a flow chart of a logistics robot PLC controller communication optimization method based on a TCP / IP protocol provided by the embodiment of the application;
[0047] Figure 2 It is a code framework diagram of a logistics robot PLC controller communication optimization method based on a TCP / IP protocol provided by the embodiment of the application;
[0048] Figure 3 It is a communication device diagram of an experiment provided by the embodiment of the application;
[0049] Figure 4 It is an experimental physical diagram provided by the embodiment of the application;
[0050] Figure 5 It is a PC real-time online communication monitoring result interface diagram provided by the embodiment of the application;
[0051] Figure 6This is a diagram of a PC real-time online communication monitoring result interface provided in an embodiment of the present invention;
[0052] Figure 7 This is a diagram of a PC real-time online communication monitoring result interface provided in an embodiment of the present invention;
[0053] Figure 8 This is a diagram of a PC real-time online communication monitoring result interface provided in an embodiment of the present invention;
[0054] Figure 9 This is a system architecture diagram of a logistics robot PLC controller communication optimization system based on TCP / IP protocol provided in an embodiment of the present invention;
[0055] Figure 10 This is an architecture diagram of a logistics warehousing system based on a communication optimization method for a logistics robot PLC controller, provided in an embodiment of the present invention.
[0056] Figure 11 This is a flowchart of a logistics warehousing method using a logistics robot PLC controller communication optimization method provided in an embodiment of the present invention. Detailed Implementation
[0057] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0058] This invention provides a communication optimization method for a logistics robot PLC controller based on the TCP / IP protocol. This method is implemented by a logistics robot PLC controller communication optimization system based on the TCP / IP protocol. This system includes a TCP Client and a TCP Server, both of which communicate with the PLC. Figure 1 The flowchart shown is a communication optimization method for a logistics robot PLC controller based on the TCP / IP protocol. The processing flow of this method may include the following steps:
[0059] S11. The TCP Client and TCP Server establish a communication connection based on the TCP / IP protocol.
[0060] In one feasible implementation, the TCP server starts first, followed by the TCP client. The TCP server waits for the TCP client to send a connection, and the TCP client establishes a connection with the TCP server.
[0061] like Figure 2The code framework diagram shows that the fbTCP Server is started first and the fbTCP Client is started later. Fb refers to FUNCTION BLOCK, which means that the program units that are repeatedly used in the program are modularized so that the function blocks can be called repeatedly in the program. It can be understood as a small "PLC".
[0062] S12, the TCP Client sends a request data sending instruction to the TCP Server.
[0063] In a possible implementation, the TCP Client sends the request data to the TCP Server, so that the TCP Client is in a data reading state.
[0064] S13, when the TCP Server receives the request data sending instruction, the TCP Server generates verification data and sends the verification data to the TCP Client.
[0065] In a possible implementation, after receiving the request data sending instruction, the TCP Server enters a writing state and generates the verification data. The step of generating the data can be as follows:
[0066] S131, the TCP Server generates a string of unique code, current time, authentication token, task type, service message, library layer number, interface line body layer number, interface line body number, container number, container counter, container width, container length and container height.
[0067] S132, the TCP Server performs string splicing on the generated string, and determines the spliced string as the verification data.
[0068] The following is an example of a possible code segment for the TCP Server to establish a connection and send data:
[0069] fbTcpServer(xEnable:=TRUE,itfIPAddress:=192.168.188.5,uiPort:=5555);
[0070] fbTcpWrite(xExecute:=xWrite,itfConnection:=fbTcpConnection.itfConnection,udiSize:=len(strCmdTmp),pData:=ADR(strCmdTmp));
[0071] S14, the TCP Client receives the verification data, processes the verification data, and sends feedback information to the TCP Server.
[0072] Optionally, the specific steps of S14 can include the following steps S141-S144:
[0073] S141, after the TCP Client receives the verification data, the string in the verification data is saved in an array.
[0074] S142, after all the information in the string is separated, it is stored in the string array.
[0075] S143, according to the library layer number in the string, the task string of the same layer application stored in the library is stored in an array, and the number of tasks received by each layer is counted.
[0076] In a feasible implementation, this can distinguish the tasks of different library layers, and is convenient for counting.
[0077] S144, send the unique code to the TCP Server as feedback data.
[0078] In a feasible implementation, the TCP Client sends the unique code to the TCP Server, which is used to inform that the information has been received by the TCP Client.
[0079] The following is an example of a feasible code segment for the TCP Client to establish a connection and receive data:
[0080] fbTCP_Client(xEnable:=xConnectToServer,ipAddr:=192.168.188.10,uiPort:=5555);
[0081] fbTCP_Read(hConnection:=hClient,szSize:=SIZEOF(strReadVar),pData:=ADR(strReadVar),szCount=>diReadSizeVar,xReady=>xNewDataRead);
[0082] fbTCP_Write(xExecute:=write,hConnection:=hClient,szSize:=diWriteSizeVar,pData:=ADR(bankId[0]));
[0083] S15. The TCP Server processes the established communication connection based on the feedback information.
[0084] In one feasible implementation, after the TCP server receives the feedback information of the unique code, the TCP server actively closes the connection.
[0085] S16. The PC monitors the communication status between the TCP Server and the TCP Client in real time.
[0086] When a communication problem is detected between the TCP server and the TCP client, determine the type of communication problem.
[0087] If the communication problem type is disconnection, the PC sends a reconnection notification to both the TCP Server and the TCP Client, causing the TCP Server and the TCP Client to automatically reconnect.
[0088] If the communication problem type is an online error, the PC sends an online error notification to both the TCP Server and the TCP Client, causing the connection between the two devices to be broken.
[0089] Below is a feasible code snippet for reconnecting after a disconnection:
[0090]
[0091]
[0092] In this embodiment of the invention, the communication time of the PLC on the multi-level shuttle of the logistics robot is shortened, and functions such as data sending, data receiving, data processing, and data feedback are solved, thereby improving communication efficiency. Simultaneously, functions such as TCP Client disconnection reconnection and reconnection after connection errors are implemented, improving communication stability. Considering factors such as overall system cost, single-machine functionality, network stability, and the ease of software implementation, the invention ensures real-time data transmission while increasing the data volume of a single communication.
[0093] To experiment with the above methods, the system can be built in the laboratory based on the Codesys V3.5SP17Patch 5 experimental platform, using libraries such as Net Base Services, SysTypes2 interfaces, SysTimeRtc, and Util, and the application is written in ST language.
[0094] like Figure 3 The diagram of the communication equipment shown and Figure 4The experimental physical diagram shows that the hardware platform needs two PC machines, a Raspberry Pi, a Hekew HCQ1-1300-D3, an Ethernet switch and an Ethernet cable. The two PC machines are connected with the Raspberry Pi and the Hekew HCQ1-1300-D3 respectively, and are used for real-time detection of the communication condition between PLCs, such as Figures 5-8 The PC machine is used for real-time online communication monitoring. The Raspberry Pi is used as a TCP Client end, and the Hekew HCQ1-1300-D3 is used as a TCP Server end. The two ends are connected and communicate with each other. The Ethernet switch realizes the connection between the Raspberry Pi and the Hekew HCQ1-1300-D3. The above is a communication task in a cycle. The experiment tests 9999 cycles, and the communication time of 9000 cycles is counted to calculate the communication time of a single cycle.
[0095]
[0096] The experiment proves that the single communication cycle of the TCP / IP communication mode is shortened to about 34 ms, which is greatly improved compared with the commonly used Modbus TCP protocol of 100 ms. Moreover, the number of characters received and sent in a single communication is no longer limited to 100, and the number of characters received and sent in a single communication in the experiment is about 300.
[0097] In the embodiment of the application, the communication time of the PLC on the multi-layer shuttle vehicle of the logistics robot is shortened, the functions of data sending, data receiving, data processing and data retransmission are solved, and the communication efficiency is improved. At the same time, the TCP Client can be reconnected, and the connection can be reestablished after an online error, so that the stability of the communication is improved. The cost of the comprehensive system, the function realization of the single machine, the stability of the network, whether the software part is easy to realize and other problems are considered to ensure the real-time performance of the data, and the data amount of a single communication is expanded.
[0098] The embodiment of the application provides a logistics robot PLC controller communication optimization system based on a TCP / IP protocol, which is used for realizing a logistics robot PLC controller communication optimization method based on a TCP / IP protocol. As shown in the figure, Figure 9 The system includes a TCP Server end 910 and a TCP Client end 920, and the TCP Client end 920 and the TCP Server end 910 are communicated by a PLC. Wherein:
[0099] The TCP Server end 910 is used for establishing a communication connection with the TCP Client end 920, receiving a data sending instruction, generating verification data, sending the verification data to the TCP Client end 920, and processing the established communication connection according to feedback information;
[0100] The TCP Client 920 is configured to establish a communication connection with the TCP Server 910, send a data sending instruction to the TCP Server 910, receive verification data, perform data processing on the verification data, and send feedback information to the TCP Server 910.
[0101] Optionally, the TCP Client 920 is a hoist or a shuttle vehicle, and the TCP Server 910 is an edge computer.
[0102] Optionally, the TCP Server 910 is further configured to:
[0103] The TCP Server 910 generates a string of the unique code, the current time, the authentication token, the task type, the service message, the library layer number, the interface line body layer number, the interface line body number, the container number, the container counter, the container width, the container length, and the container height.
[0104] The TCP Server 910 performs string splicing on the generated string, and determines the spliced string as the verification data.
[0105] Optionally, the TCP Client 920 is further configured to:
[0106] After receiving the verification data, the TCP Client 920 saves the string in the verification data in an array.
[0107] All information in the string is separated and stored in a string array.
[0108] Task strings of the same layer are stored in an array according to the library layer number in the string, and the number of received tasks of each layer is counted.
[0109] The unique code is sent to the TCP Server 910 as feedback data.
[0110] Optionally, the system further includes a PC 930.
[0111] The PC 930 is configured to:
[0112] The PC 930 is configured to:
[0113] When a communication problem is detected between the TCP Server 910 and the TCP Client 920, the type of the communication problem is determined.
[0114] If the communication problem type is disconnection, the PC 930 sends a reconnection notification to the TCP Server end 910 and the TCP Client end 920 respectively, so that the TCP Server end 910 and the TCP Client end 920 are automatically reconnected.
[0115] If the communication problem type is online error, the PC 930 sends an online error notification to the TCP Server end 910 and the TCP Client end 920 respectively, so that the two devices are disconnected.
[0116] In the embodiment of the application, the communication time of the PLC on the multi-layer shuttle vehicle of the logistics robot is shortened, the functions of data sending, data receiving, data processing and data retransmission are solved, and the communication efficiency is improved. At the same time, the TCP Client can be reconnected after disconnection, and the system can be reconnected after online error, so that the stability of the communication is improved. The cost of the comprehensive system level, the function implementation of the single machine, the stability of the network, whether the software part is easy to implement and other problems are considered to ensure the real-time performance of the data, and the data amount of single communication is expanded.
[0117] The embodiment of the application provides a logistics warehousing system based on the above logistics robot PLC controller communication optimization method, and the whole system adopts a network architecture of TCP / IP for communication. Figure 10 As shown in the figure, the system comprises a conveying line, an edge computer, a rack buffer conveying line, an elevator, a multi-layer shuttle vehicle and a PC.
[0118] The conveying line is used for obtaining material information of the material box when the material box is received, and feeding back the material information to the edge computer.
[0119] The edge computer is used for sending a warehousing task notification to the elevator through a TCP / IP protocol when a warehousing request of the material box is received, and sending a material taking notification to the multi-layer shuttle vehicle after receiving a buffer arrival notification sent by the elevator and the rack buffer conveying line.
[0120] The rack buffer conveying line is used for receiving the material box and sending a buffer arrival notification to the edge computer.
[0121] The elevator is used for extracting the material box from the conveying line according to the warehousing task notification, and recording information of the material box, conveying the material box to the rack buffer conveying line, and sending a buffer arrival notification to the edge computer.
[0122] The multi-layer shuttle vehicle is used for conveying the material box to the inside of the rack according to the material taking notification.
[0123] The PC is used for detecting the communication status between the devices of the system in real time.
[0124] A method for logistics warehousing using the logistics robot PLC controller communication optimization method is provided below. The method is based on the logistics warehousing system implementation as shown in Figure 11 A method flowchart for logistics warehousing using the logistics robot PLC controller communication optimization method is shown. The processing flow of the method can include the following steps:
[0125] S21, when receiving the bin, the conveying line obtains the material information of the bin and feeds back the material information to the edge computer.
[0126] Optionally, the material information of the bin is basic information for identifying the bin, which can include container number, container counter, container width, container length, and container height.
[0127] In a feasible implementation, when multiple bins are transported to the logistics warehouse, the staff sorts the bins and places them on the conveying line. While the conveying line is transporting the bins, it extracts the material information of the bins. The extraction method can be to take a picture of the bin through the camera of the conveying line and extract the material information, or a staff can manually input the material information of the bin.
[0128] After the processor of the conveying line receives the material information of the bin, it sends the material information to the edge computer through the TCP / IP protocol. In the TCP / IP protocol architecture, the conveying line can be referred to as the TCP Client end, and the edge computer can be referred to as the TCP Server end. The communication establishment and information interaction between the TCP Client end and the TCP Server end can refer to the above steps S11-S15, which will not be repeated here.
[0129] S22, when receiving the warehousing request of the bin, the edge computer sends a warehousing task notification to the elevator through the TCP / IP protocol.
[0130] Optionally, S22 can specifically include the following steps S221-S226:
[0131] S221, the FB block of the edge computer randomly generates verification information.
[0132] The verification information includes a unique code, a current time, an authentication token, a task type, a service message, a library layer number, an interface line body layer number, an interface line body number, a container number, a container counter, a container width, a container length, and a container height string.
[0133] In a feasible implementation, the randomly generated verification information mentioned in this step is only one of the possible ways to generate verification information. In actual implementation, users can generate verification information according to their own needs.
[0134] S222, the edge computer concatenates the verification information.
[0135] S223, the edge computer sends the verification information to the hoist.
[0136] In a feasible implementation, in the TCP / IP protocol architecture, the hoist can be referred to as a TCP Client end, the edge computer can be referred to as a TCP Server end, and the TCP / IP communication process between the hoist and the edge computer can refer to the communication process in steps S11-S15 described above, which will not be repeated here.
[0137] S224, when the hoist receives the verification information, the verification information is processed, and a unique code is sent to the edge computer.
[0138] In a feasible implementation, when the hoist receives the verification information, the string of the verification information is saved in an array, and all information such as the unique code, the current time, and the authentication token is separated and stored in the string array. The task strings of the same layer of the warehousing application are stored in an array according to the bank layer number bankId, the number of tasks received by each layer is counted, so as to distinguish the tasks of 1-9 layers. Furthermore, the unique code guid is sent back to the edge computer to inform that the information has been received by the hoist.
[0139] S225, the edge computer receives the unique code and sends a warehousing task notification to the hoist.
[0140] The following several feasible pseudo codes are used to illustrate the definition of verification information, random generation of verification information, string concatenation, and the like:
[0141] 1, define the verification information
[0142] {"guid":"cfd58ccc40d542829aeea931199e0c71","currentTime":"2021-12-0109:18:44","token":"123456","taskType":"SAWT","taskJson":"{\
[0143] "taskType":"SAWT","taskId":"","bankId":"6","interfaceLineLayerId":"1","interfaceLineId":"30000","containerCode":"00008859093102712357","countNumber":12,"containerWidth":224,"containerLength":296,"containerHeigth":205}"}
[0144] 2、FB block random generation information fbRandomCreator:
[0145] udiSeed := udiSeed + 1;
[0146] fbRndI_Range.Init(udiSeed, diMin, diMax);
[0147] fbRndI_Range.Advance();
[0148] diGetCur := fbRndI_Range.GetCur();
[0149] 3、Randomly generate unique code and other information:
[0150] guid := RPC.UUIDGenerator.CreateUUID();
[0151] currentTime := TO_STRING(ReadSysTime.dtNow);
[0152] taskId := TO_STRING(fbRandomCreator.diGetCur);
[0153] bankId := TO_STRING(fbRandomCreator.diGetCur); ...
[0155] 4、String concatenation:
[0156] StrConcatA(ADR('guid:'), ADR(strCmdTmp), 1000);
[0157] StrConcatA(ADR(guid),ADR(strCmdTmp),1000); ......
[0159] S23, the hoist extracts the bin from the conveying line according to the storage task notification, and records the information of the bin.
[0160] S24, the hoist transports the bin to the rack buffer conveying line, and the hoist and the rack buffer conveying line respectively send buffer arrival notifications to the edge computer.
[0161] S25, when the edge computer receives the buffer arrival notifications sent by the hoist and the rack buffer conveying line, sends a material taking notification to the multi-layer shuttle vehicle.
[0162] In a feasible implementation, in the TCP / IP protocol architecture, the multi-layer shuttle vehicle can be referred to as a TCP Client end, the edge computer can be referred to as a TCP Server end, and the TCP / IP communication process between the multi-layer shuttle vehicle and the edge computer can refer to the communication process between the edge computer and the conveying line in step S1, which is not described here.
[0163] S26, the multi-layer shuttle vehicle transports the bin to the inside of the rack according to the material taking notification.
[0164] S27, the PC real-time detects the communication status between the devices of the system.
[0165] In a feasible implementation, when detecting that there is a communication problem between any two devices, the type of the communication problem between the two devices is judged; if the type of the communication problem between the two devices is disconnection, the PC sends a reconnection notification to the two devices respectively, so that the two devices are automatically reconnected; if the type of the communication problem between the two devices is online error, the PC sends an online error notification to the two devices respectively, so that the two devices are disconnected.
[0166] In this way, the functions of TCP Client reconnection after disconnection, reconnection after online error, etc. can be realized, and the stability of communication is enhanced.
[0167] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be instructed by a program to complete related hardware, and the program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk or an optical disk, etc.
[0168] The above only describes the preferred embodiments of the present application, and is not intended to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A TCP / IP protocol-based logistics robot PLC controller communication optimization method, characterized in that, The method is realized by a logistics robot PLC controller communication optimization system based on a TCP / IP protocol, the system comprises a TCP Client end and a TCP Server end, and the TCP Client end and the TCP Server end are communicated by a PLC; The method comprises: S1, the TCP Client end and the TCP Server end establish a communication connection based on a TCP / IP protocol; S2, the TCP Client end sends a request data sending instruction to the TCP Server end; S3, when the TCP Server end receives the request data sending instruction, the TCP Server end generates verification data and sends the verification data to the TCP Client end; S4, the TCP Client end receives the verification data, processes the verification data, and sends feedback information to the TCP Server end; S5, the TCP Server end processes the established communication connection according to the feedback information; Wherein, the TCP Client end is a hoist or a shuttle vehicle, and the TCP Server end is an edge computer; Wherein, the TCP Server end generates verification data, comprising: The TCP Server end generates a unique code, a current time, an authentication token, a task type, a service message, a library layer number, an interface line body layer number, an interface line body number, a container number, a container counter, a container width, a container length and a container height string; The TCP Server end splices the generated string, and determines the spliced string as the verification data; Wherein, the TCP Client end receives the verification data, processes the verification data, and sends feedback information to the TCP Server end in S4, comprising: After receiving the verification data, the TCP Client end saves the string in the verification data in an array; All information in the string is stored in a string array after being separated; According to the library layer number in the string, the task string of the same layer applied to the warehouse is stored in an array, and the number of tasks received by each layer is counted; The unique code is sent to the TCP Server end as feedback data; Wherein, the method further comprises: a PC real-time detects the communication status between the TCP Server end and the TCP Client end; When detecting that there is a communication problem between the TCP Server end and the TCP Client end, determine the communication problem type; If the communication problem type is disconnection, the PC sends a reconnection notification to the TCP Server end and the TCP Client end respectively, so that the TCP Server end and the TCP Client end are automatically reconnected; If the communication problem type is an online error, the PC sends an online error notification to the TCP Server and the TCP Client, respectively, so as to disconnect the two devices.
2. A logistics robot PLC controller communication optimization system based on TCP / IP protocol, characterized in that, The system is used to implement the TCP / IP protocol-based logistics robot PLC controller communication optimization method, and comprises a TCP Client and a TCP Server, both of which are communicated by a PLC. The TCP Server is configured to establish a communication connection with the TCP Client, receive a request data sending instruction, generate verification data, send the verification data to the TCP Client, and process the established communication connection according to feedback information. The TCP Client is configured to establish a communication connection with the TCP Server, send a request data sending instruction to the TCP Server, receive verification data, process the verification data, and send feedback information to the TCP Server.
3. The system of claim 2, wherein, The TCP Client is a lifting machine or a shuttle vehicle, and the TCP Server is an edge computer.
4. The system of claim 2, wherein, The TCP Server is further configured to: The TCP Server generates a string of unique code, current time, authentication token, task type, service message, library layer number, interface line body layer number, interface line body number, container number, container counter, container width, container length, and container height. The TCP Server performs string splicing on the generated string, and determines the spliced string as verification data.
5. The system of claim 4, wherein, The TCP Client is further configured to: After receiving the verification data, the TCP Client saves the string in the verification data in an array. All information in the string is separated and stored in a string array. Task strings of the same layer are stored in an array according to the library layer number in the string, and the number of received tasks of each layer is counted. The unique code is sent to the TCP Server as feedback data.
6. The system of claim 2, wherein, The system further comprises a PC. The PC is configured to: real-time detect the communication status between the TCP Server and the TCP Client; when detecting a communication problem between the TCP Server and the TCP Client, determine the communication problem type; if the communication problem type is disconnection, the PC sends a reconnection notification to the TCP Server and the TCP Client, respectively, so that the TCP Server and the TCP Client are automatically reconnected. If the communication problem type is an online error, the PC sends an online error notification to the TCP Server and the TCP Client, respectively, so as to disconnect the two devices.
Citation Information
Patent Citations
Material double-route warehouse entering and exiting controlling method and system
CN109941660A
Heterogeneous PLC cooperative control system, method, device, equipment and medium
CN114675594A