CN115314370A - Communication method, device, system, electronic equipment and storage medium - Google Patents

Communication method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN115314370A
CN115314370A CN202210746640.1A CN202210746640A CN115314370A CN 115314370 A CN115314370 A CN 115314370A CN 202210746640 A CN202210746640 A CN 202210746640A CN 115314370 A CN115314370 A CN 115314370A
Authority
CN
China
Prior art keywords
instruction
configuration information
executed
slave device
slave
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.)
Pending
Application number
CN202210746640.1A
Other languages
Chinese (zh)
Inventor
邱佳抚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinmao Cloud Technology Service Beijing Co ltd
Original Assignee
Jinmao Cloud Technology Service Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinmao Cloud Technology Service Beijing Co ltd filed Critical Jinmao Cloud Technology Service Beijing Co ltd
Priority to CN202210746640.1A priority Critical patent/CN115314370A/en
Publication of CN115314370A publication Critical patent/CN115314370A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides a communication method, a device, a system, electronic equipment and a storage medium, wherein the method is applied to main equipment, the main equipment is connected with at least one piece of slave equipment, and the method comprises the following steps: acquiring a fixed address of the slave device; sending a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device; generating an instruction to be executed; sending the instruction to be executed to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed. The embodiment of the invention can realize that the master device and the slave device obtain the configuration information through interaction in the earlier stage, and can automatically read the device information of the slave device according to the configuration information.

Description

Communication method, device, system, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of industrial control, in particular to a communication method, a communication device, a communication system, electronic equipment and a storage medium.
Background
At present, with the rapid development of industry, equipment in the field of industrial control is updated and iterated, more and more data of a Modbus protocol are transmitted through a Universal Asynchronous Receiver/Transmitter (UART), and how to obtain specific information of the Modbus protocol becomes a problem. In the industrial control field, communication between devices is very common, but due to iteration of one device, communication between two devices is likely to be abnormal. Or access to new devices, can present such problems. At present, it is common practice for the master to take the protocol of the slave and then for the developer to develop the docking. And calling a Modbus protocol to read and write data. The development time is long, and the labor cost is high.
Disclosure of Invention
Embodiments of the present invention provide a communication method, apparatus, system, electronic device, and storage medium, so as to solve the problem in the prior art that communication between two devices is abnormal due to device iteration or new device access.
In order to solve the above problem, an embodiment of the present invention discloses a communication method, which is applied to a master device, where the master device is connected to at least one slave device, and the method includes:
acquiring a fixed address of the slave device;
sending a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
generating an instruction to be executed;
sending the instruction to be executed to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
Optionally, the configuration information includes a read-write mode, a data type, and address information, where the address information includes one or more of a read-only address, a readable and writable start address, and an end address.
Optionally, the step of sending the instruction to be executed to the slave device based on the configuration information includes:
determining a target address according to the configuration information; the target address is at least one of the address information;
and sending the instruction to be executed by adopting the target address so as to send the instruction to be executed to the slave equipment.
Optionally, the device information includes at least one of operation data and intrinsic property data.
Optionally, the master device and the slave device are connected through a serial port;
the instruction to be executed comprises at least one of a read instruction and a write instruction.
Optionally, the preset register includes: at least one of a coil register, a discrete input register, a hold register, and an input register.
The embodiment of the invention also discloses a communication device, which is positioned on the master equipment, wherein the master equipment is connected with at least one slave equipment, and the device comprises:
the fixed address acquisition module is used for acquiring a fixed address of the slave device;
a configuration information reading instruction sending module, configured to send a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
the to-be-executed instruction generating module is used for generating an instruction to be executed;
a to-be-executed instruction sending module, configured to send the to-be-executed instruction to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
The embodiment of the invention also discloses a communication system, which comprises a master device and a slave device which are connected with each other;
the master device includes:
the fixed address acquisition module is used for acquiring a fixed address of the slave device;
the configuration information reading instruction sending module is used for sending a configuration information reading instruction according to the fixed address;
the slave device includes:
a configuration information reading instruction response module, configured to send, to the master device, configuration information corresponding to a register preset in the slave device in response to the configuration information reading instruction;
the master device further includes:
the to-be-executed instruction generating module is used for generating an to-be-executed instruction;
a to-be-executed instruction sending module, configured to send the to-be-executed instruction to the slave device based on the configuration information;
the slave device further comprises:
and the to-be-executed instruction response module feeds back equipment information to the main equipment according to the to-be-executed instruction.
The embodiment of the invention also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which computer program, when executed by the processor, carries out the steps of a communication method as claimed in any one of the preceding claims.
The embodiment of the present invention also discloses a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a communication method as described in any one of the above are implemented.
The embodiment of the invention has the following advantages:
sending a configuration information reading instruction according to the fixed address by acquiring the fixed address of the slave equipment; the slave device is used for responding to the configuration information reading instruction, sending configuration information corresponding to a register preset in the slave device to the master device, so that the master device can acquire the configuration information of the register of the slave device before performing control operation on the slave device, and generating an instruction to be executed; sending the instruction to be executed to the slave device based on the configuration information; the slave device feeds back device information to the master device according to the instruction to be executed, so that the master device can automatically read the device information of the slave device according to the configuration information obtained in advance.
Further, an interactive Modbus protocol is provided through the communication method, and protocol unification is realized: when the master device reads the data of the slave device, the corresponding development process which is complicated in the earlier stage is not needed, the field high efficiency is realized, the field device (including the master device and/or the slave device) is updated and iterated, and the problem that the data does not correspond is not needed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so that those skilled in the art will understand and read the present invention, and do not limit the conditions for implementing the present invention, so that the present invention has no technical essence, and any modifications of the structures, changes of the ratio relationships, or adjustments of the sizes, should still fall within the scope covered by the technical contents disclosed in the present invention without affecting the efficacy and the achievable purpose of the present invention.
FIG. 1 is a flowchart illustrating steps of a communication method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an example of communication between a master and a slave in a communication method according to an embodiment of the present invention;
fig. 3 is a block diagram of a communication device according to an embodiment of the present invention;
fig. 4 is a block diagram of a communication system according to an embodiment of the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
One of the core ideas of the embodiment of the invention is that the master device and the slave device interact to obtain the configuration information in the earlier stage, the master device can store the configuration information, and the device information of the slave device can be automatically read according to the configuration information during the subsequent mutual communication.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a communication method of the present invention is shown, applied to a master device connected to at least one slave device.
In the industrial control field, there are nodes that communicate with each other, and in the devices that are connected to each other, a control center is generally provided, which can control other devices that communicate with each other to perform operations.
The embodiment of the invention specifically comprises the following steps:
step 101, acquiring a fixed address of the slave device;
the fixed address is a preset address of the slave equipment, and can be set by a manufacturer or set by a slave equipment operator in a self-defined way.
The master device may be provided with an input component (e.g., a keyboard, a touch screen, a tablet, etc.), and the master device may obtain a fixed address of a designated slave device through the input component.
The master device can also be provided with a communication component, the communication component can carry out communication in a mode including but not limited to Bluetooth, ethernet, wireless network, mobile communication and the like, and the master device can also obtain the fixed address of the slave device through the communication component.
When the master device is connected to a plurality of slave devices, the slave devices correspond to the fixed addresses one to one.
102, sending a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
the master device may send a configuration information reading instruction for the fixed address, and the slave device can receive and recognize the configuration information reading instruction. Registers are provided in the slave devices for storing and running various information. The slave device can respond to the configuration information reading instruction, read the configuration information of the register set by the slave device, and send the configuration information to the master device.
The master device can receive and store the configuration information, and determine the communication mode of each register in the slave device by analyzing the configuration information.
Through the steps, the master device can interact with the slave device to obtain the configuration information of the register of the slave device.
Step 103, generating an instruction to be executed;
the master device is also capable of generating instructions to be executed that are recognizable and executable by the slave device.
In practical application, a corresponding instruction to be executed can be generated according to an actual job requirement, so that the slave device can feed back device information matched with the job requirement.
In an example, the instruction to be executed may be generated by the master device according to a preset job policy, for example: when the slave device is judged to be failed, a to-be-executed instruction for acquiring the slave device failure information is generated. Another example is: the instructions to be executed for periodically detecting the operating state of the slave device may be generated at a specified time each day.
In another example, the instruction to be executed may be generated by an operator of the host device operating the input component.
In yet another example, the instructions to be executed may also be generated from data received by the communication component described above.
The embodiment of the present invention does not limit the manner of generating the instruction to be executed.
104, sending the instruction to be executed to the slave equipment based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
And sending the instruction to be executed to the slave equipment according to the configuration information so as to enable the instruction to be executed to be sent to a register of the specified slave equipment, and further enabling the slave equipment to respond to the instruction to be executed and feed back equipment information, corresponding to the instruction to be executed, generated by the slave equipment to the master equipment.
In practical applications, the target register in the slave device may be determined, and then the instruction to be executed is sent to the slave device based on the configuration information of the target register.
In the embodiment of the invention, a configuration information reading instruction is sent according to a fixed address of the slave equipment by acquiring the fixed address; the slave device is used for responding to the configuration information reading instruction, sending configuration information corresponding to a register preset in the slave device to the master device, so that the master device can acquire the configuration information of the register of the slave device before performing control operation on the slave device, and generating an instruction to be executed; sending the instruction to be executed to the slave device based on the configuration information; the slave device feeds back device information to the master device according to the instruction to be executed, so that the master device can automatically read the device information of the slave device according to the configuration information obtained in advance.
Further, an interactive Modbus protocol is provided through the communication method, so that protocol unification is realized: when the master device reads the data of the slave device, the corresponding development process which is complicated in the earlier stage is not needed, the field high efficiency is realized, the field device (including the master device and/or the slave device) is updated and iterated, and the problem that the data does not correspond is not needed.
In an alternative embodiment of the present invention, the preset register includes: at least one of a coil register, a discrete input register, a hold register, and an input register.
The configuration information acquired by the master device corresponds to part or all of the registers in the slave device.
In an optional embodiment of the present invention, the configuration information includes a read-write mode, a data type, and address information, and the address information includes one or more of a read-only address, a read-writable start address, and an end address.
The data type may include at least one of integer type and floating point type.
The master device can analyze the obtained configuration information to obtain the read-write mode, the data type and the address information of each register, wherein one or more of a read-only address, a readable and writable start address and an end address can be obtained for different registers.
In one example, by parsing the configuration information, the readable and writable start and end addresses of the coil register and the holding register, and the readable addresses of the input register and the input register are discretized.
In practical applications, the configuration information may further include the number of registers and the address of the feature parameter, such as: address of the power on/off parameter.
In an alternative embodiment of the present invention, the step 104 includes: determining a target address according to the configuration information; the target address is at least one of the address information; and sending the instruction to be executed by adopting the target address so as to send the instruction to be executed to the slave equipment.
In practical application, a target address can be determined in configuration information by combining with job requirements, and the slave device can send the generated instruction to be executed to the target address, so that the slave device can meet the job requirements of the master device and the industrial control.
In an optional embodiment of the invention, the device information comprises at least one of operational data and intrinsic property data.
The operation data is related data in the operation process of the slave device, and the inherent attribute data is data of the slave device which is not changed along with the operation process of the slave device, such as: specification, brand, etc.
In an optional embodiment of the present invention, the master device and the slave device are connected via a serial port; the instruction to be executed comprises at least one of a read instruction and a write instruction.
The master device can send a read instruction to the slave device to cause the slave device to feed back device information corresponding to the read instruction. The master device can send a write instruction to the slave device, so that the slave device writes parameters contained in the write instruction in a register corresponding to the write instruction, and controls the slave device accordingly.
The following further describes embodiments of the present invention by way of an example.
Referring to fig. 2, a flow chart of an exemplary communication provided by the present invention is shown, which includes the following steps:
step 201, the master sends a command for reading configuration information to the slave fixed address. The host (master) sends an instruction for reading the configuration information to a fixed address of the slave (slave) in advance.
Step 202, the slave returns the configuration information of the register to the master. When the slave receives the instruction of reading the configuration information, the slave immediately returns information including the read-write mode, the data type, the starting address, the ending address and the like of various registers of the slave equipment, namely the configuration information.
Step 203, the configuration information is parsed. The host analyzes key configuration information (including readable address, readable and writable start address and end address) of the device data to be read from the fixed configuration information, and stores the configuration information for later-stage reading of the device information.
Step 204, the master sends read-write information to the register of the slave. And reading the detailed information of each memory type in the slave machine or writing the parameters of each writable register into the slave machine by sending read-write information.
And step 205, the slave machine returns the data corresponding to the read-write information of the master machine.
Through the processes of the steps 201 to 205, an interactive Modbus protocol is realized.
In practical applications, various data structures may be set in the host to ensure the execution of the interactive Modbus protocol.
In one example, the following interfaces are provided in the host:
and the Modbusread interface is used for bringing the address of the read configuration information and the identification of the read configuration information into the local variable.
And the modbusreceive interface is used for receiving the slave return data and comprises the configuration information of the register.
And a data analysis interface for processing the data included in the configuration information to analyze the information of the start and end addresses and the number of registers in the configuration information of each of the discrete input register, the coil register, the input register, the holding register, and the like.
The reading interface (including modbus _ read _ bits, modbus _ read _ input _ bits, modbus _ read _ registers, and modbus _ read _ input _ registers) is used for calling the detailed device information for reading each register type from the slave.
And the write interface (comprising a modbus _ write _ bit, a modbus _ write _ register, a modbus _ write _ bits, a modbus _ write _ registers and a modbus _ write _ and _ read _ registers) is used for writing corresponding parameters of each register type into the slave.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a communication apparatus according to an embodiment of the present invention is shown, and the communication apparatus is located in a master device 310, where the master device is connected to at least one slave device, and the embodiment of the present invention may specifically include the following modules:
a fixed address obtaining module 311, configured to obtain a fixed address of the slave device;
a configuration information reading instruction sending module 312, configured to send a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
a to-be-executed instruction generating module 313, configured to generate an instruction to be executed;
a to-be-executed instruction sending module 314, configured to send the to-be-executed instruction to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
In an optional embodiment of the present invention, the configuration information includes a read-write mode, a data type, and address information, and the address information includes one or more of a read-only address, a read-writable start address, and an end address.
In an optional embodiment of the present invention, the to-be-executed instruction sending module 314 includes:
the target address determining submodule is used for determining a target address according to the configuration information; the target address is at least one of the address information;
and the sending submodule is used for sending the instruction to be executed by adopting the target address so as to send the instruction to be executed to the slave equipment.
In an optional embodiment of the invention, the device information comprises at least one of operational data and intrinsic property data.
In an optional embodiment of the present invention, the master device and the slave device are connected via a serial port;
the instruction to be executed comprises at least one of a read instruction and a write instruction.
In an alternative embodiment of the present invention, the preset register includes: at least one of a coil register, a discrete input register, a hold register, and an input register.
Referring to fig. 4, there is shown a block diagram of an embodiment of a communication system of the present invention, which includes a master device 310 and a slave device 320 connected to each other;
the master device 310 includes:
a fixed address obtaining module 311, configured to obtain a fixed address of the slave device;
a configuration information reading instruction sending module 312, configured to send a configuration information reading instruction according to the fixed address;
the slave device 320 includes:
a configuration information reading instruction response module 321, configured to respond to the configuration information reading instruction, and send configuration information corresponding to a register preset in the slave device to the master device;
the master device further includes:
a to-be-executed instruction generating module 313, configured to generate an instruction to be executed;
a to-be-executed instruction sending module 314, configured to send the to-be-executed instruction to the slave device based on the configuration information;
the slave device 320 further comprises:
and a to-be-executed instruction response module 322, configured to feed back device information to the master device according to the to-be-executed instruction.
For the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
An embodiment of the present invention further provides an electronic device, including: the communication method comprises a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the communication method embodiment is realized, the same technical effect can be achieved, and the details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the communication method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The communication method, apparatus, system, electronic device and storage medium provided by the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A communication method applied to a master device, the master device being connected to at least one slave device, the method comprising:
acquiring a fixed address of the slave device;
sending a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
generating an instruction to be executed;
sending the instruction to be executed to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
2. A communication method according to claim 1, wherein the configuration information includes a read-write mode, a data type, and address information, and the address information includes one or more of a read-only address, a read-writable start address, and an end address.
3. The communication method of claim 2, wherein sending the instruction to be executed to the slave device based on the configuration information comprises:
determining a target address according to the configuration information; the target address is at least one of the address information;
and sending the instruction to be executed by adopting the target address so as to send the instruction to be executed to the slave equipment.
4. A communication method according to claim 3, wherein the device information includes at least one of operation data and inherent attribute data.
5. A communication method according to claim 1, wherein the master device and the slave device are connected via a serial port; the instruction to be executed comprises at least one of a read instruction and a write instruction.
6. A communication method according to claim 1, wherein said preset register comprises: at least one of a coil register, a discrete input register, a hold register, and an input register.
7. A communication apparatus, located at a master device, the master device being connected to at least one slave device, the apparatus comprising:
a fixed address obtaining module, configured to obtain a fixed address of the slave device;
the configuration information reading instruction sending module is used for sending a configuration information reading instruction according to the fixed address; the slave device is used for responding to the configuration information reading instruction and sending configuration information corresponding to a register preset in the slave device to the master device;
the to-be-executed instruction generating module is used for generating an to-be-executed instruction;
a to-be-executed instruction sending module, configured to send the to-be-executed instruction to the slave device based on the configuration information; and the slave equipment feeds back equipment information to the master equipment aiming at the instruction to be executed.
8. A communication system comprising a master device and a slave device connected to each other;
the master device includes:
the fixed address acquisition module is used for acquiring a fixed address of the slave device;
the configuration information reading instruction sending module is used for sending a configuration information reading instruction according to the fixed address;
the slave device includes:
a configuration information reading instruction response module, configured to respond to the configuration information reading instruction, and send configuration information corresponding to a register preset in the slave device to the master device;
the master device further includes:
the to-be-executed instruction generating module is used for generating an to-be-executed instruction;
a to-be-executed instruction sending module, configured to send the to-be-executed instruction to the slave device based on the configuration information;
the slave device further comprises:
and the to-be-executed instruction response module feeds back equipment information to the main equipment according to the to-be-executed instruction.
9. An electronic device, comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of a communication method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a communication method according to any one of claims 1 to 6.
CN202210746640.1A 2022-06-29 2022-06-29 Communication method, device, system, electronic equipment and storage medium Pending CN115314370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210746640.1A CN115314370A (en) 2022-06-29 2022-06-29 Communication method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210746640.1A CN115314370A (en) 2022-06-29 2022-06-29 Communication method, device, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115314370A true CN115314370A (en) 2022-11-08

Family

ID=83854379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210746640.1A Pending CN115314370A (en) 2022-06-29 2022-06-29 Communication method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115314370A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639694A (en) * 2009-07-13 2010-02-03 大连理工计算机控制工程有限公司 Control system based on EPA standard and management method thereof
US20180120796A1 (en) * 2016-10-31 2018-05-03 Schneider Electric Systems Usa, Inc. Multi-protocol gateway with control in a process control system
CN111245633A (en) * 2018-11-29 2020-06-05 北京天诚同创电气有限公司 Configuration file of microgrid main equipment and operation method thereof
CN211630177U (en) * 2019-12-18 2020-10-02 珠海格力电器股份有限公司 Equipment data acquisition system
US20210208571A1 (en) * 2020-01-06 2021-07-08 Rockwell Automation Technologies, Inc. Industrial data services platform
CN113645086A (en) * 2021-10-18 2021-11-12 四川旷谷信息工程有限公司 Data communication method, apparatus and medium for controlling device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639694A (en) * 2009-07-13 2010-02-03 大连理工计算机控制工程有限公司 Control system based on EPA standard and management method thereof
US20180120796A1 (en) * 2016-10-31 2018-05-03 Schneider Electric Systems Usa, Inc. Multi-protocol gateway with control in a process control system
CN111245633A (en) * 2018-11-29 2020-06-05 北京天诚同创电气有限公司 Configuration file of microgrid main equipment and operation method thereof
CN211630177U (en) * 2019-12-18 2020-10-02 珠海格力电器股份有限公司 Equipment data acquisition system
US20210208571A1 (en) * 2020-01-06 2021-07-08 Rockwell Automation Technologies, Inc. Industrial data services platform
CN113645086A (en) * 2021-10-18 2021-11-12 四川旷谷信息工程有限公司 Data communication method, apparatus and medium for controlling device

Similar Documents

Publication Publication Date Title
CN101305551B (en) Method, system, network node and device for the construction and execution of a distributed workflow in a communication system
CN104866383A (en) Interface calling method and device and terminal
CN112445729B (en) Operation address determination method, PCIe system, electronic device and storage medium
CN111399840B (en) Module development method and device
CN104881318A (en) Interface calling method and device and terminal
CN109614325B (en) Method and device for determining control attribute, electronic equipment and storage medium
CN105760289A (en) Debugging method and device of embedded system
CN112241311A (en) Firmware simulation method and device, electronic equipment and readable storage medium
CN113220660A (en) Data migration method, device and equipment and readable storage medium
CN114997101A (en) Signal control method, system, medium and device based on chip verification system
US20110307589A1 (en) Device commissioning and replacement
CN105245581A (en) Application program transmission method and device
CN115268879A (en) Code processing method and device, electronic equipment and storage medium
CN103379145B (en) The method, apparatus and system of information processing
CN104536884A (en) Code testing method and device
CN115314370A (en) Communication method, device, system, electronic equipment and storage medium
EP3005087A1 (en) Declarative configuration elements
EP3575966A1 (en) Method and system for handling engineering data in a multi- engineering system environment
US20220100174A1 (en) Streamlining the commission of network identifiers
CN101615112A (en) Command handling method, Apparatus and system
CN115687223A (en) Method and device for serial port communication of embedded equipment, embedded equipment and storage medium
JP2005044111A (en) Field bus system
CN105302853A (en) Data reconstruction method and apparatus
EP4354308A2 (en) Computer system and method for evaluating integrity and parsing of a file system and parsing implementation
CN108829308A (en) System parameter configuration method and device and mining raspberry dispatching system

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