CN115277290A - Automatic sequential numbering circuit and method for devices connected to field bus - Google Patents

Automatic sequential numbering circuit and method for devices connected to field bus Download PDF

Info

Publication number
CN115277290A
CN115277290A CN202210834826.2A CN202210834826A CN115277290A CN 115277290 A CN115277290 A CN 115277290A CN 202210834826 A CN202210834826 A CN 202210834826A CN 115277290 A CN115277290 A CN 115277290A
Authority
CN
China
Prior art keywords
slave
equipment
interface
detection
bus
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
CN202210834826.2A
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.)
Super Synchronization Co ltd
Original Assignee
Super Synchronization 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 Super Synchronization Co ltd filed Critical Super Synchronization Co ltd
Priority to CN202210834826.2A priority Critical patent/CN115277290A/en
Publication of CN115277290A publication Critical patent/CN115277290A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • 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
    • 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
    • H04L41/0886Fully automatic configuration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The application provides a circuit and a method for automatically numbering devices connected to a field bus in sequence, wherein the method comprises the following steps: detecting the signal state of a detection interface of the main control equipment; and if the signal state of the detection interface of the main control equipment is determined to be a low level state, sequentially configuring serial numbers according to the cascade sequence of the slave equipment to obtain the equipment serial numbers of the slave equipment, wherein the serial numbers of the slave equipment are sequentially increased or sequentially decreased. According to the method and the device, the equipment connected to the field bus can be automatically numbered, so that the equipment numbering sequence is not influenced when the equipment is replaced, and the error rate of information transmission is reduced.

Description

Automatic sequential numbering circuit and method for devices connected to field bus
Technical Field
The application relates to the field of field bus communication, in particular to an automatic sequential numbering circuit and method for equipment connected to a field bus.
Background
With the development of science and technology, the rise of field bus technology opens up the new world of factory underlying network and promotes the rapid development of enterprise network. The digital communication method mainly solves the problems of digital communication among intelligent instruments, controllers, actuating mechanisms and other devices in an industrial field and information transmission between field control devices and a high-level control system.
The fieldbus is a mature communication application technology, and in practical applications, a communication configuration link is usually established at the beginning of application design, and each device connected to the fieldbus is manually numbered according to the design principle. The mode of usual numbering is the mode of adopting dial switch, by artifical manual setting, can appear setting for the condition of irregularity usually at its in-process, when changing equipment, because equipment station number is inconsistent with original design, leads to the problem such as system can not normally work, has improved information transmission's error rate.
Disclosure of Invention
The application provides an automatic sequential numbering circuit, a method and related equipment of equipment connected with a field bus, so that when the equipment is replaced, the error rate of information transmission is reduced.
A first aspect of the present application provides a device automatic sequence numbering circuit connected to a fieldbus, the device automatic sequence numbering circuit connected to the fieldbus comprising a master device, a plurality of slave devices, and the fieldbus, wherein:
the main control equipment is provided with a detection interface, a detection interface and a bus interface;
each slave device is provided with a first detection interface, a second detection interface, a detection interface and a bus interface;
the bus interface of the master control device is connected with the bus interfaces of the plurality of slave devices through the field bus;
the detection interface of the master control device is connected with the detection interfaces of the plurality of slave devices;
the first detection interface of the first slave device is connected with the detection interface of the master control device, the second detection interface is connected with the first detection interface of the second slave device through a connecting line, the second detection interface of the second slave device is connected with the first detection interface of the third slave device, and the rest slave devices are connected in a cascade mode through the mode.
By adopting the technical scheme, the detection interfaces of the master control equipment are connected with the detection interfaces of the slave equipment in a cascade manner through the connecting lines, and the serial number configuration can be carried out on the slave equipment through the cascade order; the master control equipment bus interface is connected with each slave equipment bus interface through a field bus and can synchronously transmit data; the detection interface of the slave device feeds back a signal to the detection interface of the master control device, and whether all the slave devices are configured can be judged by detecting the detection interface of the master control device.
A second aspect of the present application provides a method for automatically numbering devices connected to a fieldbus, which is applied to a master device in an automatic sequence numbering circuit for devices connected to a fieldbus, and includes:
detecting the signal state of a detection interface of the main control equipment;
and if the signal state of the detection interface of the main control equipment is determined to be a low level state, sequentially configuring serial numbers according to the cascade sequence of the slave equipment to obtain the equipment serial numbers of the slave equipment, wherein the serial numbers of the slave equipment are sequentially increased or sequentially decreased.
By adopting the technical scheme, whether the configuration of all slave equipment is completed or not is judged by detecting the signal state of the interface, and if the configuration is not completed, the numbering configuration is automatically carried out according to the ascending or descending sequence. And the configuration slave equipment is numbered in sequence by adopting an automatic numbering mode, so that the numbering sequence of the slave equipment is not influenced when the equipment is replaced, and the error rate of information transmission is reduced.
Optionally, the sequentially numbering according to the cascade order of the slave devices to obtain the device number of each slave device includes:
sending a first detection signal to the first slave device through the detection interface, so that after the first slave device receives the first detection signal, first device identification information is sent to the field bus through the bus interface;
and receiving the first device identification information through the bus interface, generating a data packet comprising a device number based on the first device identification information, and sending the data packet to the field bus through the bus interface to configure the device number of the first slave device.
And configuring the next slave device according to the above manner until all the slave devices are configured, and obtaining the device number of each slave device.
According to the technical scheme, the main equipment sends a detection signal to the detection interface, the slave equipment which is not configured returns identification information to the main equipment after receiving the detection signal of the main equipment, and the main equipment generates a data packet according to the identification information and returns the data packet to the slave equipment and carries out identity numbering on the data packet. The accuracy of sequence numbering is improved through information interaction between the master equipment and the slave equipment.
Optionally, the generating a data packet including a device number based on the first device identification information and sending the data packet to the fieldbus through a bus interface to configure the device number of the first slave device includes:
generating a data packet including a device number based on the first device identification information and transmitting the data packet to the field bus through a bus interface;
and receiving a positive acknowledgement signal sent by the first slave device based on the data packet to confirm that the numbering configuration of the first slave device is completed.
Through the technical scheme, the master device sends the data packet which is generated based on the first device information and comprises the device number to the slave device through the field bus, the slave device sends the acknowledgement signal to the master device after receiving the data packet, and the master device determines that the configuration of the first slave device is completed after receiving the acknowledgement signal. The accuracy of sequence numbering is improved through information interaction between the master equipment and the slave equipment.
Optionally, the method for automatically numbering devices connected to the fieldbus in sequence further includes:
and correspondingly storing the equipment identification information and the equipment number of the slave equipment into a preset module list every time one slave equipment is configured.
By adopting the technical scheme, the identification information and the serial number of the slave equipment are stored in the module list every time one slave equipment is configured, so that the information can be conveniently stored and called in time.
Optionally, the detecting, by the master control device, the information state of the detection interface includes:
receiving detection signals sent by the detection interfaces of the plurality of slave devices through the detection interface of the master control device;
and judging the detection signals, marking a position 1 if the detection signals are all high-level signals, and marking a position 0 if the detection signals are not high-level signals.
Optionally, the method for automatically numbering devices connected to a fieldbus in sequence further includes:
and if the flag position is 1, confirming that the signal state is a configuration completion state, stopping configuration, and if the flag position is 0, confirming that the signal state is a non-configuration completion state, and continuing configuration.
By adopting the technical scheme, whether all slave devices are configured or not is judged by detecting signals, and the accuracy of sequence numbering is improved.
In a second aspect of the present application, an automatic serial numbering device for devices connected to a field bus is provided, which adopts the following technical solutions:
the signal detection module is used for detecting the signal state of a detection interface of the main control equipment;
and the equipment numbering module is used for sequentially carrying out numbering configuration according to the cascade sequence of the slave equipment to obtain the equipment numbers of the slave equipment if the signal state of the detection interface of the master control equipment is determined to be a low level state, and the equipment numbers are sequentially increased or sequentially decreased.
By adopting the technical scheme, whether the configuration of all the equipment is finished or not is judged by detecting the signal state of the interface, and if the configuration is not finished, the numbering configuration is automatically carried out according to the ascending or descending sequence. The configuration equipment is numbered in sequence by adopting an automatic numbering mode, so that the numbering sequence of the equipment is not influenced when the equipment is replaced, and the error rate of information transmission is reduced.
In a third aspect of the present application, a computer storage medium is provided, which stores a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect of the application, there is provided an electronic device comprising a processor, a memory for storing instructions, and a transceiver for communicating with other devices, the processor being configured to execute the instructions stored in the memory to cause the electronic device to perform the method steps described above.
In summary, the present application includes at least one of the following benefits:
1. the configuration equipment is numbered in sequence by adopting an automatic numbering mode, so that the numbering sequence of the equipment is not influenced when the equipment is replaced, and the error rate of information transmission is reduced.
2. In the numbering process, whether all slave devices are configured is judged through information interaction between the master device and the slave devices and detection signals, and the accuracy of the sequence numbering is improved.
Drawings
FIG. 1 is a schematic diagram of an automatic serial numbering circuit connected to a fieldbus device in the present application;
FIG. 2 is a flow chart illustrating an automatic serial number method coupled to a Fieldbus device according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram illustrating a method for automatic serial number connection to a Fieldbus device according to another embodiment of the present application;
FIG. 4 is a block diagram of an automatic serial numbering device connected to a field bus device in the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Description of reference numerals: a and B, bus interface; C. a detection interface; D. detecting an interface; E. a first detection interface; F. a second detection interface, G and a master control device; I. a field bus; H. a slave device; 1000. an electronic device; 1001. a processor; 1002. a communication bus; 1003. a user interface; 1004. a network interface; 1005. A memory.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The embodiment of the application provides an automatic sequence numbering circuit connected to field bus I equipment, which comprises a master control device G, a plurality of slave devices H and a field bus, wherein: the master control equipment G is provided with a detection interface C, a detection interface D and bus interfaces A and B; each slave device H is provided with a first detection interface E, a second detection interface F, a detection interface D and bus interfaces A and B; the bus interfaces A and B of the master control device G are connected with the bus interfaces A and B of the plurality of slave devices H through a field bus I; the detection interface D of the master control device G is connected with the detection interfaces D of the plurality of slave devices H; the first detection interface E of the first slave device H is connected to the detection interface C of the master control device G, the second detection interface F is connected to the first detection interface E of the second slave device H through a connection line, the second detection interface F of the second slave device H is connected to the first detection interface E of the third slave device H, and the rest of the slave devices H are connected in cascade in the above manner.
The master control device G is a device that obtains control of the field bus I.
The slave H refers to a device accessed by the master G and can respond to various fieldbus commands from the master G.
And the detection interface D is mainly used for detecting whether the configuration of all the slave devices H is completed.
And the detection interface C is mainly used for sending detection signals.
And the bus interfaces A and B are mainly used for data transmission between the master control device G and the slave device H.
The bus is a group of common information transmission lines which can be shared by a plurality of components in a time sharing way, the sharing means that the bus can be connected with a plurality of components, the information exchanged among the components can be shared in a time sharing way through the group of lines, the time sharing means that only one component is allowed to send information to the bus at the same time, and if a plurality of components exist in the system, the components can only send information to the bus in a time sharing way.
The field bus I is an industrial data bus which has been rapidly developed in recent years, and mainly solves the problems of digital communication between field devices such as intelligent instruments, controllers, actuators and the like in an industrial field and information transmission between the field control devices and a high-level control system. The fieldbus has a series of outstanding advantages of simplicity, reliability, economy, practicality, etc., and thus has received high attention from many standards bodies and computer manufacturers.
The bus may carry program instructions, specific data for arithmetic processing, control words for the devices, status words, specific data for transfer between the devices, etc. Each module in the system exchanges information through the system bus, ensures that data can be reliably transmitted on the bus at high speed, and is the basic task of the system bus. The time for completing one data transmission of the bus is one bus cycle, and one bus cycle can be divided into four phases: (1) applying for bus occupation phase: the bus master control equipment is required to be used for proposing a request for occupying the bus to the bus arbitration mechanism, the request is judged by the bus arbitration mechanism, if the request meets the response condition, a response signal is sent out, and the bus control right of the next bus transmission cycle is granted to an applicant; (2) an addressing stage: the bus master control equipment which obtains the bus control right sends out addresses of the memory and the data port which are accessed for the second time through the address bus, and the accessed module is selected by address decoding to start data conversion; and (3) a data transmission stage: the bus master control equipment is also called as a master module, and the accessed equipment is called as a slave module. The operation between the master module and the slave module is controlled by the master module to carry out data transmission between the two slave modules through a data bus; (4) end stage: the information of the master module and the slave module is withdrawn from the bus, and the bus is made free for other master modules to use.
According to different data transmission modules and devices, buses have different data transmission modes: synchronous transmission, asynchronous transmission, semi-synchronous transmission, and split transmission.
The synchronous transmission is characterized in that: the transmission cycle is fixed, and signals are sent out and corresponding actions are carried out according to the specified time strictly in the transmission cycle.
Asynchronous transmission: synchronous transmission has high speed requirements on modules and equipment connected with a bus, in order to realize the connection of the modules and the equipment with different speeds, two state lines for seeking conditions and responding are required to be added between a master module and a slave module for connection communication, and an asynchronous transmission mode is a query transmission mode in essence.
Semi-synchronous transmission: the semi-synchronous transmission mode is a compromise mode of synchronous transmission and asynchronous transmission, and is characterized in that the sending time of addresses, commands and data is strictly identified by the back edge of a system clock pulse according to the leading edge time of the system clock pulse. If the width of the system clock exceeds the signal change and the transmission delay time, the transmission period can be prolonged because the transmission condition is not met when the signals are judged, and because the address, the command and the data are sent out at the front edge of the system clock pulse, the whole transmission process is in a system clock synchronous semi-synchronous transmission mode, so that the whole transmission process can be coordinated with peripheral equipment with different speeds, a 'waiting' or 'ready' control signal line is additionally arranged, and the data transmission of high-speed equipment can be carried out like synchronous transmission, and the address, the data and the command are transmitted according to the preset time; for the low-speed device, the main control device is delayed to wait by virtue of a ready signal line, so that the aim of speed matching is fulfilled. In a computer, a semi-synchronous transmission mode is used for data transmission between a central processing unit and peripheral equipment.
In the three bus transmission modes, the main module finishes the transmission of the data from the sending address in a continuous time, and the performance of the system is reduced when the peripheral speed is low or the data needs to be randomly transmitted to the peripheral. The split bus transmission divides a reading cycle into two split sub-cycles, in the first sub-cycle, the main module sends the address, the command, the serial number of the main module and the like to the system bus together, and the address, the command, the serial number of the main module and the like are received by corresponding peripheral equipment after the bus transmission; after receiving the command from the master module, the peripheral prepares the data, makes a request to the bus, and transfers the data to be transferred to the bus to be read by the master module, which is the second transfer cycle. Therefore, each transmission sub-period only has one-way information flow, and the main module does not need to wait for the second sub-period (other instructions can be executed) after the first sub-period, so that the efficiency of the system is improved. For the read-write process needing to transmit a plurality of continuous addresses in batches, the master module only needs to transmit address information once, and the subsequent addresses can be generated by increasing or decreasing the addresses by the slave module, so that the write cycle of transmitting a plurality of addresses is saved, and the transmission efficiency is improved.
The embodiment of the application discloses an automatic sequence numbering method connected with field bus equipment, which is applied to an automatic sequence numbering circuit connected with the field bus equipment and used for detecting the signal state of a detection interface D of a main control device G; and if the signal state of the detection interface D of the main control device G is determined to be a low level state, sequentially performing numbering configuration according to the cascade sequence of the slave devices to obtain the device numbers of the slave devices H, wherein the device numbers are sequentially increased or sequentially decreased.
The embodiment of the application discloses an automatic sequence numbering method connected to field bus equipment, which comprises the following steps:
s100: and detecting the signal state of a detection interface of the main control equipment.
Specifically, the master control device detects that the interface D is configured with a floating input, that is, an input pin of the interface D is not connected to a high level or a low level, and then, the interface D is in a high level state when receiving the high level and in a low level state when receiving the low level. And the detection interface D of the master control device G is connected with the detection interface D of each slave device, and signals of the detection interface D of each slave device are transmitted to the detection interface D of the master control device after realizing the line and the function. The master control device G determines whether all the slave devices are configured according to the received high and low levels, wherein if the master control device G receives the high level, it is determined that all the slave devices H are configured, and if the master control device G receives the low level, it is determined that the slave devices H are not configured.
S200: and if the signal state of the detection interface of the main control equipment is determined to be a low level state, sequentially configuring the serial numbers according to the cascade sequence of the slave equipment to obtain the equipment serial numbers of the slave equipment, and sequentially increasing or decreasing the serial numbers of the slave equipment according to the sequence.
Specifically, the unconfigured slave detects the interface D, and sets the output signal to a low state. The detection interface D of the master control device G is connected to each slave device H and implements a line and function, i.e., if one slave device is not configured and transmits a low level signal, the signal received by the detection interface D of the master control device G is a low level signal.
And the master control equipment G sequentially performs numbering configuration on the slave equipment H according to the cascading sequence, wherein the numbering configuration meets the numbering rule. The numbering rule comprises that each slave device number only represents one slave device H, and two slave devices are not allowed to adopt one number; the number is to reflect the type of slave device explicitly; the device and the position of the slave equipment can be clearly reflected; numbering the slave devices H of the same type according to the process sequence, namely, the numbering of the slave devices H of the same type is different from that of the conventional method; the numbering should be as simple as possible and satisfy the order of increasing or decreasing.
Optionally, referring to fig. 2, in S200, the method includes:
s210: and sending a first detection signal to the first slave device through the detection interface, so that after the first slave device receives the first detection signal, first device identification information is sent to the field bus through the bus interface.
Specifically, the identification information, which is used to uniquely identify the slave H, may include one or more of a name of the slave H, a model number described in the slave H, a number corresponding to the slave H, a number obtained from the factory of the slave H, a time when the slave H is produced, a time when the slave H is put into use, and a unit in which the slave H is used today.
Specifically, since the probing interfaces C between the master device G and the slave devices H are cascade-connected one by one, only the slave devices H adjacent to the master device G can receive the first probing signal. In the configuration process, the detection signal acts on the slave device H which is not configured, and the slave device H which is not configured responds after receiving the detection signal and transmits the identification information of the slave device H to the master control device G. The detection interface C of the master control device G sends a first detection signal, the first identification information is received by the slave device H which is adjacent to the master control device and is not configured, and then the slave device H responds, and the slave device H transmits the identification information of the slave device H to the master control device G through the bus interfaces A and B and the field bus I.
S220: and receiving the first device identification information through the bus interfaces A and B, generating a data packet comprising a device number based on the first device identification information, and sending the data packet to the field bus through the bus interfaces A and B to configure the device number of the first slave device.
S230: and configuring the next slave device according to the mode until all the slave devices are configured, and obtaining the device number of each slave device.
Specifically, the data packet is a unit of data in transmission, and any one master device G can transmit a data packet having any source address. The master control device G receives the first slave device identification information through the bus interfaces A and B, generates a data packet comprising a device number based on the identification information of the first device, sends the data packet to the field bus through the bus interfaces A and B to configure the device number of the first slave device H, and repeats the configuration until all the slave devices H are configured, so as to configure the device number of each slave device H.
Optionally, in S220, the method includes:
s221: the method comprises the steps of receiving first equipment identification information through a bus interface, generating a data packet comprising an equipment number based on the first equipment identification information, and sending the data packet to a field bus through the bus interface.
S222: and receiving a positive acknowledgement signal sent by the first slave device based on the data packet to confirm that the numbering configuration of the first slave device is completed.
Specifically, when configuring the device number of the first slave device H, the master device G receives the identification information of the first device through the bus interfaces a and B, generates a packet including the device number based on the identification information of the first device, transmits the packet to the field bus I through the bus interfaces a and B to configure the device number of the first slave device H, and transmits an acknowledgement signal to the field bus I through the bus interfaces a and B after receiving the packet to confirm that the configuration of the number of the first slave device H is completed.
Optionally, an automatic sequential numbering method connected to a fieldbus device, further includes:
s240: and correspondingly storing the equipment identification information and the equipment number of the slave equipment into a preset module list every time one slave equipment is configured.
Specifically, the module list refers to a region opened up in the memory space of the master device G to store data. In the process of configuring the slave device H, the identification information and the device number of the slave device H are stored in the module list of the master control device G, so as to be convenient for calling and reading at any time. For example, the master device G obtains device configuration lists [1] el1008, [2] el1108, [3] el3004, [4] el2008, [5] el4002 of all slave nodes, so that the device numbers are sequentially set to 1, 2, 3, 4 and 5 according to the configuration arrangement order, and the device numbers and the configuration can be guaranteed to be consistent each time the system is started. If 4 ELs 1008 are accessed, assuming that the serial numbers are out-of-order 8, 9, 7 and 5, the design of the electrical principle causes disorder and increases the risk of error, and the problem that the serial numbers are inconsistent each time the equipment groups are fixed and the serial numbers are electrified due to the fact that the serial numbers are numbered based on the response time measurement mode can occur, so that the design of the electrical control program is influenced.
Optionally, in S100, the method includes:
s110: and receiving detection signals sent by the detection interfaces of the plurality of slave devices through the detection interface of the master control device.
S120: and judging a plurality of detection signals, marking the position 1 if the detection signals are all high-level signals, and marking the position 0 if the detection signals are not high-level signals.
S130: if the flag position is 1, the signal state is confirmed to be the configuration completion state, the configuration is stopped, and if the flag position is 0, the signal state is confirmed to be the non-configuration completion state, and the configuration is continued.
Specifically, the detection interface D of the master control device G receives a plurality of detection signals sent from the detection interface D of the slave device H, determines the plurality of detection signals, sets the flag bit to 1 if the plurality of detection signals are all high-level signals, and sets the flag bit to 0 if the plurality of detection signals are otherwise high-level signals. If the mark position is 1, it indicates that all the slave devices H have been configured and the configuration is stopped to continue, and if the mark position is 0, it indicates that there are still slave devices H without configuration, and it is necessary to continue to send probe signals to continue completing the configuration of the slave devices H without configuration.
The embodiment of the present application further discloses an automatic serial number device for devices connected to a field bus, please refer to fig. 4, the device includes the following modules:
the signal detection module is used for detecting the signal state of a detection interface of the main control equipment;
and the equipment numbering module is used for sequentially numbering and configuring according to the cascade sequence of the slave equipment to obtain the equipment numbers of the slave equipment if the signal state of the detection interface of the master control equipment is determined to be a low level state, and the equipment numbers are sequentially increased or sequentially decreased according to the sequence.
Please refer to fig. 5, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
The communication bus 1002 is used to implement connection communication among these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. The processor 1001 interfaces various components throughout the electronic device 1000 using various interfaces and lines to perform various functions of the electronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005 and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 5, the memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program of an automatic serial number method connected to the fieldbus device.
It should be noted that: in the above embodiment, when the device implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments, which are not described herein again.
In the electronic device 1000 shown in fig. 5, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke an application in the memory 1005 that stores an automatic sequential numbering method coupled to the fieldbus device, which when executed by the one or more processors, causes the electronic device to perform the method as described in one or more of the above embodiments.
An electronic device readable storage medium having instructions stored thereon. When executed by one or more processors, cause an electronic device to perform a method as described in one or more of the above embodiments.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE Gate Array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some service interfaces, indirect coupling or communication connection of devices or units, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, and the memory may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. It is intended that all equivalent variations and modifications made in accordance with the teachings of the present disclosure be covered thereby. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A device automatic sequence numbering circuit connected to a fieldbus comprising a master device, a plurality of slave devices and the fieldbus, wherein:
the main control equipment is provided with a detection interface, a detection interface and a bus interface;
each slave device is provided with a first detection interface, a second detection interface, a detection interface and a bus interface;
the bus interface of the master control device is connected with the bus interfaces of the plurality of slave devices through the field bus;
the detection interface of the master control device is connected with the detection interfaces of the plurality of slave devices;
the first detection interface of the first slave device is connected with the detection interface of the master control device, the second detection interface is connected with the first detection interface of the second slave device through a connecting line, the second detection interface of the second slave device is connected with the first detection interface of the third slave device, and the rest slave devices are connected in a cascade manner through the above mode.
2. A method for automatically numbering devices connected to a field bus in sequence, applied to the master control device of claim 1, comprising:
detecting the signal state of a detection interface of the main control equipment;
and if the signal state of the detection interface of the main control equipment is determined to be a low level state, sequentially configuring serial numbers according to the cascade sequence of the slave equipment to obtain the equipment serial numbers of the slave equipment, wherein the serial numbers of the slave equipment are sequentially increased or sequentially decreased.
3. The method for automatically numbering devices connected to a field bus according to claim 2, wherein the sequentially numbering the devices according to the cascade order of the slave devices to obtain the device numbers of the slave devices comprises:
sending a first detection signal to the first slave device through the detection interface, so that after the first slave device receives the first detection signal, first device identification information is sent to the field bus through the bus interface;
receiving the first device identification information through the bus interface, generating a data packet including a device number based on the first device identification information, and sending the data packet to the field bus through the bus interface to configure the device number of the first slave device;
and configuring the next slave device according to the above manner until all the slave devices are configured, and obtaining the device number of each slave device.
4. The method according to claim 3, wherein the generating a packet including a device number based on the first device identification information and transmitting the packet to the fieldbus via a bus interface to configure the device number of the first slave device comprises:
generating a data packet including a device number based on the first device identification information and transmitting the data packet to the field bus through a bus interface;
and receiving a positive acknowledgement signal sent by the first slave device based on the data packet to confirm that the numbering configuration of the first slave device is completed.
5. The method of claim 3, further comprising:
and correspondingly storing the equipment identification information and the equipment number of the slave equipment into a preset module list every time one slave equipment is configured.
6. The method according to claim 1, wherein the detecting the signal status of the probing interface by the master device comprises:
receiving detection signals sent by the detection interfaces of the plurality of slave devices through the detection interface of the master control device;
and judging the detection signals, marking the position 1 if the detection signals are all high-level signals, and marking the position 0 if the detection signals are not high-level signals.
7. The method of claim 6, further comprising:
and if the flag position is 1, confirming that the signal state is a configuration completion state, stopping configuration, and if the flag position is 0, confirming that the signal state is a non-configuration completion state, and continuing configuration.
8. An apparatus for automatic serial numbering of devices connected to a field bus, the apparatus comprising:
the signal detection module is used for detecting the signal state of a detection interface of the main control equipment;
and the equipment numbering module is used for sequentially numbering and configuring according to the cascade sequence of the slave equipment to obtain the equipment number of each slave equipment if the signal state of the detection interface of the master control equipment is determined to be a low level state, and the equipment numbers are sequentially increased or sequentially decreased according to the sequence.
9. A computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 2~7.
10. An electronic device, comprising: a processor and a memory; wherein the memory is configured to store instructions, the transceiver is configured to communicate with other devices, and the processor is configured to execute the instructions stored in the memory to cause the electronic device to perform the method of claim 2~7.
CN202210834826.2A 2022-07-16 2022-07-16 Automatic sequential numbering circuit and method for devices connected to field bus Pending CN115277290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210834826.2A CN115277290A (en) 2022-07-16 2022-07-16 Automatic sequential numbering circuit and method for devices connected to field bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210834826.2A CN115277290A (en) 2022-07-16 2022-07-16 Automatic sequential numbering circuit and method for devices connected to field bus

Publications (1)

Publication Number Publication Date
CN115277290A true CN115277290A (en) 2022-11-01

Family

ID=83764851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210834826.2A Pending CN115277290A (en) 2022-07-16 2022-07-16 Automatic sequential numbering circuit and method for devices connected to field bus

Country Status (1)

Country Link
CN (1) CN115277290A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100052428A1 (en) * 2008-09-03 2010-03-04 Omron Corporation Multi-cell battery system, and management number numbering method
CN111541596A (en) * 2020-04-20 2020-08-14 广州致远电子有限公司 Relay response automatic numbering method, device, equipment and storage medium
CN111563055A (en) * 2019-02-14 2020-08-21 深圳市共济科技股份有限公司 IT equipment information acquisition method and device
CN112217702A (en) * 2019-07-11 2021-01-12 郑州宇通集团有限公司 Automatic addressing method for cascade master-slave module, master control module and slave control module
CN114553630A (en) * 2022-01-07 2022-05-27 如果新能源科技(江苏)股份有限公司 Bus terminal resistor automatic loading and ID self-distribution method and system, equipment, medium and product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100052428A1 (en) * 2008-09-03 2010-03-04 Omron Corporation Multi-cell battery system, and management number numbering method
CN111563055A (en) * 2019-02-14 2020-08-21 深圳市共济科技股份有限公司 IT equipment information acquisition method and device
CN112217702A (en) * 2019-07-11 2021-01-12 郑州宇通集团有限公司 Automatic addressing method for cascade master-slave module, master control module and slave control module
CN111541596A (en) * 2020-04-20 2020-08-14 广州致远电子有限公司 Relay response automatic numbering method, device, equipment and storage medium
CN114553630A (en) * 2022-01-07 2022-05-27 如果新能源科技(江苏)股份有限公司 Bus terminal resistor automatic loading and ID self-distribution method and system, equipment, medium and product

Similar Documents

Publication Publication Date Title
JPS6218949B2 (en)
US7934029B2 (en) Data transfer between devices within an integrated circuit
CA1123111A (en) System providing multiple fetch bus cycle operation
CN108984442A (en) A kind of acceleration-controlled system based on Binarization methods, chip and robot
CN112131176B (en) FPGA (field programmable Gate array) quick local reconstruction method based on PCIE (peripheral component interface express)
CN112463651A (en) QSPI controller, image processor and flash memory access method
JPH10293744A (en) Pci bus system
CN112100090A (en) Data access request processing method, device, medium and memory mapping controller
CN115470163A (en) Control method, control device, control equipment and storage medium for DMA transmission
CN115203092A (en) Single-master multi-slave single-wire communication method, device and equipment
JPH11126182A (en) Device and method for communications between computer buses
CN110795369A (en) Method and terminal for realizing MIDO slave function based on GPIO pin
CN106681948A (en) Logic control method and device of programmable logic device
US20070101032A1 (en) Bus arbitration circuit and bus arbitration method
CN116566761B (en) SPI dual-host sharing arbitration system and method
KR910001788B1 (en) Method and apparatus for interrupting transmission of multi processor system
CN115277290A (en) Automatic sequential numbering circuit and method for devices connected to field bus
JP2000293485A (en) Communication interface
CN110795373A (en) Method for converting I2C bus into parallel bus, terminal and storage medium
CN115858535A (en) Data processing method and device, storage medium and terminal
CN112559402B (en) PCI slave interface control circuit based on FPGA and FPGA
CN113326220A (en) Method and equipment for acquiring information of peripheral electronic tag
CN106326172A (en) APB bus slave interface expansion circuit and use method thereof
CN109976778B (en) Software updating method and system of vehicle electronic product, upper computer and storage medium
CN100419722C (en) Arbiter, a system and a method for generating a pseudo-grant signal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221101