Communication conversion module for connecting field bus master station and servo press controller
By designing a communication conversion module, the servo press controller is connected through Ethernet and converted to support ProfiNet, EtherNet/IP or EtherCat protocols, the difficulty of data communication interaction between the servo press controller and the PLC master station is solved, and the effective control and data interaction of the servo press by the PLC master station is realized, and the requirements of production line design are met.
Patent Information
- Application Number
- CN202411687124.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
AI Technical Summary
There are difficulties in data communication interaction between the servo press controller and the customer PLC main station, especially in production line design, the PLC is the control core and does not allow the existence of the servo press controller as the main station in the same bus communication loop.
Design a communication conversion module to connect to the servo controller through Ethernet, and convert the Ethernet protocol to support ProfiNet, EtherNet/IP or EtherCat bus communication protocols, thereby realizing the control and data interaction of the servo press by the PLC master station.
It realizes effective data communication between the PLC main station and the servo press controller, meets the requirements of production line design for PLC as the control core, and improves the applicability of the communication system.
Smart Images

Figure CN119603099A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electronic data processing, and in particular relates to a communication conversion module connecting a field bus master station and a servo press controller. Background Art
[0002] During the use of the servo press, it is usually necessary to control and exchange data between the customer's PLC and the servo press through a communication bus. Common communication bus methods on the market, such as ProfiNet, EtherNet / IP, EtherCat, etc., all use PLC as the master station and the controlled device as a slave station. During the research and development of our company's new servo press, it was found that the servo press controller used by our company also exists as a master station. Since the servo press is part of a set of production stations or production lines designed by the customer, the production line design requires that the PLC must be used as the production line control core and is not allowed to exist in the same bus communication loop. Therefore, the data communication interaction between the servo press controller and the customer's PLC master station is a problem that needs to be solved by the present invention. The servo controller is connected to the Ethernet, and the Ethernet protocol is converted into a slave station that supports the ProfiNet, EtherNet / IP or EtherCat bus communication protocol, so as to achieve the purpose of allowing the PLC master station to control the servo press and exchange data;
[0003] In order to solve the problem in the background technology, the present application designs a communication conversion module connecting a field bus master station and a servo press controller. Summary of the invention
[0004] In view of the problems in the background technology, the present invention proposes a communication conversion module connecting a field bus master station and a servo press controller.
[0005] To achieve the above object, the present invention provides the following technical solution: a communication conversion module connecting a field bus master station and a servo press controller, which includes the following specific modules:
[0006] The servo press controller is used to receive instructions from the CPU to control the servo press and collect data from the servo press;
[0007] Network chip, used to receive data from the servo press controller and transmit it to the CPU;
[0008] CPU, used for communication sorting and then communication conversion and transmission to the field bus communication chip;
[0009] Communication module, used to transmit the control data processed by the CPU to the PLC master station;
[0010] The PLC master station is used to output PLC control instructions based on the obtained control data.
[0011] As a preferred technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the communication conversion transmission includes the following specific steps:
[0012] S11, initialize two SPI interfaces;
[0013] S12, initialize the network chip to IodbusTCP client mode, read the server IP address stored in the EEPROM, connect to the server, and proceed to S13 if the connection is successful. If the connection fails, return to S11;
[0014] S13, the connection is successful, and a command to read the number of slave stations is sent to the ModbusTCP server at a frequency of 1Hz;
[0015] S14, ModbusTCP server replies, where the last byte indicates the number of slaves;
[0016] S15, CPU initializes the data area length of AnybusB40 module according to the number of slave stations read previously. One slave station corresponds to 48 bytes, two slave stations correspond to 96 bytes, and so on.
[0017] S16, entering the data interaction stage, the CPU sends a 0x10 write command to the ModbusTCP server at an interval of 100ms, and the content written is the data received by the AnybusB40 module;
[0018] S17, wait for the MlodbusTCP server to reply to the 0x10 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S18.
[0019] S18, after receiving the reply of 0x10 command, send 0x03 read command to ModbusTCP server;
[0020] S19, wait for the ModbusTCP server to reply to the 0x03 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S20.
[0021] S20, after receiving the reply of the 0x03 command, puts the received data into the sending buffer of AnyBusB40.
[0022] As a preferred technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the communication sequencing includes the following specific contents:
[0023] S31, extracting the amount of data transmitted from the slave station to the master station at the time of historical data transmission and the set of devices historically connected to the slave station, and bringing them into the transmission data amount estimation strategy to estimate the amount of data at the time of slave station data transmission;
[0024] S32, importing the device set connected in real time to the slave station and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave station;
[0025] S33, the data volume at the time of slave station data transmission and the importance of the slave station are imported into the priority value calculation strategy to calculate the priority value of the slave station;
[0026] S34, the priority values of the plurality of slave stations are arranged in descending order, and the master station communicates with the slave stations in the order of arrangement;
[0027] In this way, by configuring the interface parameters of the communication interface and performing data conversion, two devices with different communication interfaces can be assisted to communicate; at the same time, due to the addition of communication sorting, the data transmission rates of different communication interfaces can be matched, thereby improving the applicability of the communication system;
[0028] Mainly engaged in the design, production and sales of servo presses. During the use of the servo press, it is usually necessary to control and exchange data between the customer's PLC and the servo press through a communication bus. Common communication bus methods on the market, such as ProfiNet, EtherNet / IP, EtherCat, etc., all work in the form of PLC as the master station and the controlled equipment as the slave station. During the research and development of the new servo press, it was found that the servo press controller used by our company also exists as a master station. Since the servo press is part of a complete set of production stations or production lines designed by the customer, the production line design requires that the PLC must be the control core of the production line and is not allowed to exist in the same bus communication loop. Therefore, the data communication interaction between the servo press controller and the customer's PLC master station is the problem that the present invention needs to solve. The servo controller is connected to the Ethernet, and the Ethernet protocol is converted into a slave station that supports the ProfiNet, EtherNet / IP or EtherCat bus communication protocol, so as to achieve the purpose of allowing the PLC master station to control the servo press and exchange data;
[0029] As a preferred technical solution for connecting the communication conversion module of the fieldbus master station and the servo press controller, the construction of the environmental analysis model and the importation of environmental data into the environmental analysis model for operating environment data analysis also include the following specific contents:
[0030] S31, obtaining the collected ambient temperature and ambient humidity data inside the mechanical actuator;
[0031] S32, substituting the obtained ambient temperature and ambient humidity data into the ambient abnormality analysis value calculation formula to calculate the ambient abnormality analysis value, wherein the ambient abnormality analysis value calculation formula is: Wherein, exp() is the power of e, Ts is the ambient temperature value, Tm is the median value of the ambient temperature safety range, Tmax is the maximum value of the ambient temperature safety range, Tmin is the minimum value of the ambient temperature safety range, czs is the ambient humidity value, czm is the median value of the ambient humidity safety range, czmax is the maximum value of the ambient humidity safety range, and czmin is the minimum value of the ambient humidity safety range;
[0032] S33, obtaining the calculated real-time environmental abnormality analysis value;
[0033] As an optimal technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the method of extracting the amount of data transmitted to the master station at the historical data transmission time of the slave station and the set of devices historically connected to the slave station, and bringing them into the transmission data amount estimation strategy to estimate the amount of data at the slave station data transmission time also includes the following specific contents:
[0034] S311, extract the amount of data transmitted from the slave station to the master station during the historical data transmission time, extract the amount of data transmitted at the next data transmission time corresponding to the daily calculation time, and extract the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station, and import the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station into a similarity calculation formula, and calculate the similarity between the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station, wherein the similarity calculation formula is: A i is the i-th item of the running data set of the management connection corresponding to the next data transmission moment at the historical calculation time, B i is the i-th item of the operation data set of the device connected to the real-time slave management obtained, and m is the total number of data items in the operation data set;
[0035] S312, extracting the transmission data volume at the corresponding time with the greatest similarity as the data volume at the slave station data transmission time.
[0036] As a preferred technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the method of importing the device set connected in real time from the slave station and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave station includes the following specific contents:
[0037] S41, extracting the real-time slave station management connected device operation data set and the real-time data storage margin Q of the storage y ;
[0038] S42, the real-time data storage margin Q of the storage y The amount of data transmitted to the slave station at the same time Substitute the data storage margin after communication into the calculation formula to calculate the data storage margin after communication. The calculation formula for data storage margin after communication is: Where Q Z is the total storage capacity of the storage;
[0039] S43, extracting the operation data set of the device connected to the real-time slave station management, substituting each data in the operation data set into the fault value calculation formula to calculate the fault value. The fault value calculation formula is: Among them B imax is the maximum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management, B imin is the minimum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management, B im For B imax and B imin The median value of
[0040] S44, extract the calculated fault value and the data storage margin after communication and import them into the importance calculation formula to calculate the importance of the slave station. The importance calculation formula is:
[0041] As a preferred technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the method of importing the amount of data at the time of slave station data transmission and the importance of the slave station into a priority value calculation strategy to calculate the priority value of the slave station includes the following specific contents:
[0042] The data volume at the slave station data transmission time and the slave station importance are extracted and imported into the priority value calculation formula to calculate the slave station priority value F. The calculation formula of the slave station priority value is: Where c1 is the data volume ratio, c2 is the importance ratio, Q p is the set data volume standard value;
[0043] As a preferred technical solution for a communication conversion module connecting a fieldbus master station and a servo press controller, the CPU model is STM32F103CT6, the network chip model is W5500, and the communication module model is Anybus B40;
[0044] Main CPU model: STM32F103CT6 Brand: ST;
[0045] Ethernet communication chip model: W5500 Brand: Wiznet;
[0046] Fieldbus communication chip: Anybus B40 Brand: Anybus;
[0047] Special note: Fieldbus communication chip B40 can burn different internal firmware to directly replace EtherCAT, EtherNet / IP, and Profinet communication protocols while the hardware pins are fully compatible;
[0048] The W5500 has one RJ45 network port as its external interface, and the Anybus B40 has two RJ45 ports as its external interface, so the entire module has three RJ45 network ports in total.
[0049] An electronic device comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0050] The processor executes the above-mentioned communication conversion module connecting the field bus master station and the servo press controller by calling the computer program stored in the memory.
[0051] A computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes a communication conversion module for connecting a field bus master station and a servo press controller as described above.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] The present invention can assist two devices with different communication interfaces to communicate by configuring the interface parameters of the communication interface and performing data conversion; at the same time, due to the addition of communication sorting, the data transmission rates of different communication interfaces can be matched, thereby improving the applicability of the communication system;
[0054] Mainly engaged in the design, production and sales of servo presses. During the use of the servo press, it is usually necessary to control and exchange data between the customer's PLC and the servo press through a communication bus. Common communication bus methods on the market, such as ProfiNet, EtherNet / IP, EtherCat, etc., all use PLC as the master station and the controlled equipment as a slave station. During the research and development of the new servo press, it was found that the servo press controller used by our company also exists as a master station. Since the servo press is part of a complete set of production stations or production lines designed by the customer, the production line design requires that the PLC must be the control core of the production line and is not allowed to exist in the same bus communication loop. Therefore, the data communication interaction between the servo press controller and the customer's PLC master station is a problem that needs to be solved by the present invention. The servo controller is connected to the Ethernet, and the Ethernet protocol is converted into a slave station that supports the ProfiNet, EtherNet / IP or EtherCat bus communication protocol, so as to achieve the purpose of allowing the PLC master station to control the servo press and exchange data. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0056] Figure 1 It is a schematic diagram of an overall model of a communication conversion module connecting a field bus master station and a servo press controller according to the present invention;
[0057] Figure 2 It is a schematic diagram of the principle of data conversion process in a communication conversion module connecting a field bus master station and a servo press controller of the present invention; DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0060] Example 1
[0061] See also Figure 1-Figure 2 , an embodiment provided by the present invention: the technical problem solved by this embodiment is: data communication interaction between the servo press controller and the customer PLC master station;
[0062] A communication conversion module connecting a fieldbus master station and a servo press controller comprises the following specific steps:
[0063] The servo press controller is used to receive instructions from the CPU to control the servo press and collect data from the servo press;
[0064] Network chip, used to receive data from the servo press controller and transmit it to the CPU;
[0065] CPU, used for communication sorting and then communication conversion and transmission to the field bus communication chip;
[0066] Communication module, used to transmit the control data processed by the CPU to the PLC master station;
[0067] The PLC master station is used to output PLC control instructions based on the obtained control data.
[0068] In one embodiment, the communication conversion transmission includes the following specific steps:
[0069] S11, initialize two SPI interfaces;
[0070] S12, initialize the network chip to IodbusTCP client mode, read the server IP address stored in the EEPROM, connect to the server, and proceed to S13 if the connection is successful. If the connection fails, return to S11;
[0071] S13, the connection is successful, and a command to read the number of slave stations is sent to the ModbusTCP server at a frequency of 1Hz;
[0072] S14, ModbusTCP server replies, where the last byte indicates the number of slaves;
[0073] S15, CPU initializes the data area length of AnybusB40 module according to the number of slave stations read previously. One slave station corresponds to 48 bytes, two slave stations correspond to 96 bytes, and so on.
[0074] S16, entering the data interaction stage, the CPU sends a 0x10 write command to the ModbusTCP server at an interval of 100ms, and the content written is the data received by the AnybusB40 module;
[0075] S17, wait for the MlodbusTCP server to reply to the 0x10 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S18.
[0076] S18, after receiving the reply of 0x10 command, send 0x03 read command to ModbusTCP server;
[0077] S19, wait for the ModbusTCP server to reply to the 0x03 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S20.
[0078] S20, receiving the reply of 0x03 command, puts the received data into the sending buffer of AnyBusB40;
[0079] Here is a Python code to implement this process:
[0080] import spidev
[0081] import socket
[0082] import time
[0083] # Initialize the SPI interface
[0084] spi = spidev.SpiDev()
[0085] spi.open(0,0)#Assume that SPI device 0, channel 0 is used
[0086] #Initialize the network chip to Modbus TCP client mode
[0087] def initialize_network_chip():
[0088] try:
[0089] #Assume that the socket library is used to initialize the network chip
[0090] sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
[0091] sock.connect(('<server IP>',502))#Connect to the server, port 502 is the standard port for Modbus TCP
[0092] return True
[0093] except Exception as e:
[0094] print(f"Failed to connect to server:{e}")
[0095] return False
[0096] #Read the server IP address in EEPROM
[0097] def read_eeprom_ip_address():
[0098] #This should be the code to read the EEPROM, assuming that the server's IP address is returned
[0099] return '192.168.1.1'
[0100] #Connect to server
[0101] if not initialize_network_chip():
[0102] print("Failed to connect to the server, returning to ready state")
[0103] #Return to the initial state or try to reconnect
[0104] return
[0105] #Connection successful, read the number of slaves
[0106] def read_slave_count():
[0107] #Send the Modbus TCP command to read the number of slaves
[0108] command=b'\x01\x03\x00\x00\x00\x00'#Modbus TCP command, read the number of slaves
[0109] sock.sendall(command)
[0110] response = sock.recv(5) # Assume the server replies with 5 bytes of data
[0111] return response[-1]#Return the last byte, i.e. the number of slaves
[0112] #Initialize the data area length of the AnybusB40 module
[0113] slave_count=read_slave_count()
[0114] data_area_length=48*slave_count#Calculate the data area length based on the number of slave stations
[0115] #Data interaction stage
[0116] def data_interaction():
[0117] while True:
[0118] #Send 0x10 write command
[0119] command = b'\x01\x10\x00\x00\x00\x00' # construct 0x10 write command
[0120] sock.sendall(command)
[0121] #Wait for the reply of 0x10 command
[0122] response = sock.recv(10) # Assume the server replies with 10 bytes of data
[0123] #Send 0x03 read command
[0124] command = b'\x01\x03\x00\x00\x00\x00' # construct 0x03 read command
[0125] sock.sendall(command)
[0126] #Wait for the reply of 0x03 command
[0127] response = sock.recv(10) # Assume the server replies with 10 bytes of data
[0128] #Put the received data into the send buffer of AnyBusB40
[0129] #Here you need to process the received data according to the actual data format
[0130] process_received_data(response)
[0131] #Process the received data
[0132] def process_received_data(data):
[0133] #Here is the code to process the received data and put it into the AnyBusB40 buffer
[0134] #Assume that the data has been received in the correct format
[0135] pass
[0136] #Enter the data interaction loop
[0137] data_interaction()
[0138] #Close the socket
[0139] sock.close()
[0140] In one embodiment, the communication sequencing includes the following specific contents:
[0141] S31, extracting the amount of data transmitted from the slave station to the master station at the time of historical data transmission and the set of devices historically connected to the slave station, and bringing them into the transmission data amount estimation strategy to estimate the amount of data at the time of slave station data transmission;
[0142] S32, importing the device set connected in real time to the slave station and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave station;
[0143] S33, the data volume at the time of slave station data transmission and the importance of the slave station are imported into the priority value calculation strategy to calculate the priority value of the slave station;
[0144] S34, the priority values of the plurality of slave stations are arranged in descending order, and the master station communicates with the slave stations in the order of arrangement;
[0145] In one embodiment, the construction of the environment analysis model and the importation of the environment data into the environment analysis model for the operation environment data analysis further include the following specific contents:
[0146] S31, obtaining the collected ambient temperature and ambient humidity data inside the mechanical actuator;
[0147] S32, substituting the obtained ambient temperature and ambient humidity data into the ambient abnormality analysis value calculation formula to calculate the ambient abnormality analysis value, wherein the ambient abnormality analysis value calculation formula is: Wherein, exp() is the power of e, Ts is the ambient temperature value, Tm is the median value of the ambient temperature safety range, Tmax is the maximum value of the ambient temperature safety range, Tmin is the minimum value of the ambient temperature safety range, czs is the ambient humidity value, czm is the median value of the ambient humidity safety range, czmax is the maximum value of the ambient humidity safety range, and czmin is the minimum value of the ambient humidity safety range;
[0148] S33, obtaining the calculated real-time environmental abnormality analysis value;
[0149] In one embodiment, the extracting the amount of data transmitted from the slave station to the master station at the historical data transmission time and the set of devices historically connected to the slave station, and bringing them into the transmission data amount estimation strategy to estimate the data amount at the slave station data transmission time also includes the following specific contents:
[0150] S311, extract the amount of data transmitted from the slave station to the master station during the historical data transmission time, extract the amount of data transmitted at the next data transmission time corresponding to the daily calculation time, and extract the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station, and import the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station into a similarity calculation formula, and calculate the similarity between the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station, wherein the similarity calculation formula is: A i is the i-th item of the running data set of the management connection corresponding to the next data transmission moment at the historical calculation time, B i is the i-th item of the operation data set of the device connected to the real-time slave management obtained, and m is the total number of data items in the operation data set;
[0151] S312, extracting the transmission data volume at the corresponding time with the greatest similarity as the data volume at the slave station data transmission time.
[0152] In one embodiment, the step of importing the set of devices connected to the slave station in real time and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave station includes the following specific contents:
[0153] S41, extracting the real-time slave station management connected device operation data set and the real-time data storage margin Q of the storage y ;
[0154] S42, the real-time data storage margin Q of the storage y The amount of data transmitted to the slave station at the same time Substitute the data storage margin after communication into the calculation formula to calculate the data storage margin after communication. The calculation formula for data storage margin after communication is: Where Q Z is the total storage capacity of the storage;
[0155] S43, extracting the operation data set of the device connected to the real-time slave station management, substituting each data in the operation data set into the fault value calculation formula to calculate the fault value. The fault value calculation formula is: Among them B imax is the maximum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management, B imin is the minimum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management, B im For B imax and B imin The median value of
[0156] S44, extract the calculated fault value and the data storage margin after communication and import them into the importance calculation formula to calculate the importance of the slave station. The importance calculation formula is:
[0157] In one embodiment, the step of importing the amount of data at the time of slave station data transmission and the importance of the slave station into the priority value calculation strategy to calculate the priority value of the slave station includes the following specific contents:
[0158] The data volume at the slave station data transmission time and the slave station importance are extracted and imported into the priority value calculation formula to calculate the slave station priority value F. The calculation formula of the slave station priority value is: Where c1 is the data volume ratio, c2 is the importance ratio, Q p is the set data volume standard value;
[0159] In one of the embodiments, the CPU model is STM32F103CT6, the network chip model is W5500, and the communication module model is Anybus B40.
[0160] Example 2
[0161] This embodiment provides an electronic device, including: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0162] The processor executes the above-mentioned communication conversion module connecting the field bus master station and the servo press controller by calling the computer program stored in the memory.
[0163] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) and one or more memories, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement a communication conversion module connecting a field bus master station and a servo press controller provided in the above method embodiment.
[0164] It should be noted that a computer program corresponding to all steps of a communication conversion module connecting a field bus master station and a servo press controller can be implemented using C language, and at the same time, the data acquisition module, image abnormality analysis module, environmental abnormality analysis module, curing process abnormality analysis module, control module and curing process abnormality warning module are all controlled by a remote server.
[0165] Example 3
[0166] This embodiment provides a computer-readable storage medium having a rewritable computer program stored thereon;
[0167] When the computer program runs on the computer device, the computer device executes the above-mentioned communication conversion module for connecting the field bus master station and the servo press controller.
[0168] For example, the computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0169] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A communication conversion module connecting a fieldbus master station and a servo press controller, characterized in that: It includes the following specific modules: The servo press controller is used to receive instructions from the CPU to control the servo press and collect data from the servo press; Network chip, used to receive data from the servo press controller and transmit it to the CPU; CPU, used for communication sorting and then communication conversion and transmission to the field bus communication chip; Communication module, used to transmit the control data processed by the CPU to the PLC master station; The PLC master station is used to output PLC control instructions based on the obtained control data.
2. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 1, characterized in that: The communication conversion transmission includes the following specific steps: S11, initialize two SPI interfaces; S12, initialize the network chip to IodbusTCP client mode, read the server IP address stored in the EEPROM, connect to the server, and proceed to S13 if the connection is successful. If the connection fails, return to S11; S13, the connection is successful, and a command to read the number of slave stations is sent to the ModbusTCP server at a frequency of 1Hz; S14, ModbusTCP server replies, where the last byte indicates the number of slaves; S15, CPU initializes the data area length of AnybusB40 module according to the number of slave stations read previously. One slave station corresponds to 48 bytes, two slave stations correspond to 96 bytes, and so on. S16, entering the data interaction stage, the CPU sends a 0x10 write command to the ModbusTCP server at an interval of 100ms, and the content written is the data received by the AnybusB40 module; S17, wait for the MlodbusTCP server to reply to the 0x10 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S18. S18, after receiving the reply of 0x10 command, send 0x03 read command to ModbusTCP server; S19, wait for the ModbusTCP server to reply to the 0x03 command. If the waiting timeout occurs, proceed to S12. If the waiting timeout does not occur, proceed to S20. S20, after receiving the reply of the 0x03 command, puts the received data into the sending buffer of AnyBusB40.
3. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 2, characterized in that: The communication sorting includes the following specific contents: S31, extracting the amount of data transmitted from the slave station to the master station at the time of historical data transmission and the set of devices historically connected to the slave station, and bringing them into the transmission data amount estimation strategy to estimate the amount of data at the time of slave station data transmission; S32, importing the device set connected in real time to the slave station and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave station; S33, the data volume at the time of slave station data transmission and the importance of the slave station are imported into the priority value calculation strategy to calculate the priority value of the slave station; S34. The priority values of the plurality of slave stations are arranged in descending order, and the master station communicates with the slave stations in the order of the arrangement.
4. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 3, characterized in that: The extracting of the amount of data transmitted from the slave station to the master station at the time of historical data transmission and the set of devices connected to the slave station in history, and bringing them into the transmission data amount estimation strategy to estimate the amount of data at the time of slave station data transmission also includes the following specific contents: S311, extract the amount of data transmitted from the slave station to the master station during the historical data transmission time, extract the amount of data transmitted at the next data transmission time corresponding to the daily calculation time, and extract the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station, and import the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station into a similarity calculation formula, and calculate the similarity between the set of device model numbers and the set of device operation data that are managed and connected at the next data transmission time corresponding to the daily calculation time of the slave station and the acquired set of device model numbers and the set of device operation data that are managed and connected at the real-time slave station, wherein the similarity calculation formula is: A i is the i-th item of the running data set of the management connection corresponding to the next data transmission moment at the historical calculation time, B i is the i-th item of the operation data set of the device connected to the real-time slave management obtained, and m is the total number of data items in the operation data set; S312, extracting the transmission data volume at the corresponding time with the greatest similarity as the data volume at the slave station data transmission time.
5. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 4, characterized in that: The method of importing the set of devices connected to the slave in real time and the data storage margin of the storage into the importance calculation strategy to calculate the importance of the slave includes the following specific contents: S41, extracting the operation data set of the device connected to the real-time slave management and the real-time data storage margin Qy of the storage; S42, the real-time data storage margin Qy of the memory and the data volume at the slave station data transmission time Substitute the data storage margin after communication into the calculation formula to calculate the data storage margin after communication. The calculation formula for data storage margin after communication is: Where Q Z is the total storage capacity of the storage; S43, extracting the operation data set of the device connected to the real-time slave station management, substituting each data in the operation data set into the fault value calculation formula to calculate the fault value. The fault value calculation formula is: Where Bimax is the maximum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management, and B imin is the minimum value of the safety range of the ith item of data in the operating data set of the device connected to the real-time slave management. Bim is the sum of Bimax and B imin The median value of S44, extract the calculated fault value and the data storage margin after communication and import them into the importance calculation formula to calculate the importance of the slave station. The importance calculation formula is:
6. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 5, characterized in that: The method of importing the amount of data at the time of slave station data transmission and the importance of the slave station into the priority value calculation strategy to calculate the priority value of the slave station includes the following specific contents: The data volume at the slave station data transmission time and the slave station importance are extracted and imported into the priority value calculation formula to calculate the slave station priority value F. The calculation formula of the slave station priority value is: Where c1 is the data volume ratio, c2 is the importance ratio, Q p The standard value for the set data volume.
7. A communication conversion module for connecting a field bus master station and a servo press controller as claimed in claim 6, characterized in that: The CPU model is STM32F103CT6, the network chip model is W5500, and the communication module model is AnybusB40.
Citation Information
Cited By
Communication conversion method for connecting field bus master station and servo press controller
CN121691475A