Bus cascading method, device, equipment and medium
By introducing a bus cascade method in the platen status monitoring system, the slave address is automatically allocated by signal lines, and the problems of complex installation and debugging in the prior art are solved, and the effect of simplifying wiring and reducing the main machine volume is achieved.
Patent Information
- Application Number
- CN202411633213.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-14
AI Technical Summary
The communication methods of existing platen status monitoring devices are mainly one-main and multiple slave bus modes and one-to-one point-to-point modes, resulting in large installation and debugging workloads, large host size, high material cost and complex wiring.
A bus cascade method is proposed. By adding a signal line outside the communication bus, the host leads out the signal line, and connects all slaves in series in sequence. The signal line of each stage is output from the previous stage and input from the next stage. The signal line has only two states: 0 and 1. The host automatically allocates the slave address by connecting the switch.
It realizes automatic allocation of slave addresses, simplifies the wiring process, reduces the demand for debuggers to the site, reduces the volume and material costs of the host, and improves installation efficiency.
Smart Images

Figure CN119628993A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of platen status detection, and in particular to a bus cascading method, device, equipment and medium. Background Art
[0002] In the prior art, the main communication modes of the pressure plate status monitoring device are a one-master-multiple-slave bus mode and a one-to-one point-to-point mode. However, the one-master-multiple-slave bus mode requires on-site address assembly, and the workload of installation and debugging is large; the one-to-one point-to-point mode requires the host to lead out multiple communication interfaces, resulting in a larger host size, higher material cost and more complicated wiring. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a bus cascading method, device, equipment and medium, which can automatically allocate addresses, have a relatively simple wiring process and do not require debugging personnel to go to the site for debugging.
[0004] In a first aspect, an embodiment of the present invention provides a bus cascading method, characterized in that it is applied to a platen status monitoring system, the platen status monitoring system includes a host and at least two slaves, and the bus cascading method includes:
[0005] The host and the slaves are connected via a communication bus, each of the slaves is connected to the same configuration instruction, a signal line is drawn from the host, and each of the slaves is cascade-connected via the signal line;
[0006] Powering on the host, so that the host outputs level pulses to the slaves through the connection switch, and starts all the slaves;
[0007] When the plurality of slaves are turned on, the host allocates a corresponding broadcast instruction to the first slave, wherein the broadcast instruction includes address information;
[0008] The slave configures the address information as its own communication address, sends a low level pulse to the slave of the next level of the first slave, and sends a response signal to the host;
[0009] After receiving the response signal, the host allocates the corresponding broadcast instruction to the slaves at the next level until the host completes the address allocation of all the slaves.
[0010] In some embodiments of the present invention, the host allocates a corresponding broadcast instruction to the first slave, including:
[0011] Determining a first communication state and a second communication state of the signal line, and an input port and an output port of the slave;
[0012] When the signal line is in the first communication state, the input port converts the high level signal into the low level signal through the connection switch;
[0013] When the signal line is in the second communication state, the communication signal output by the signal line is input to the slave of the next stage through the input port and the output port.
[0014] In some embodiments of the present invention, the allocating the corresponding broadcast instruction to the next-level slave includes:
[0015] Entering the platen function and platen name into the host;
[0016] Obtaining a cascade sequence between the host and the plurality of slaves, and an address sequence of the plurality of slaves, and confirming whether the cascade sequence is the same as the address sequence;
[0017] When the cascade sequence is the same as the address sequence, the pressure plate function and the pressure plate name corresponding to the address sequence are entered.
[0018] In some embodiments of the present invention, after sending a response signal to the host, the method further includes:
[0019] confirming whether the host successfully receives the response signal;
[0020] When the host fails to successfully receive the response signal, the host stops allocating the broadcast command.
[0021] In some embodiments of the present invention, the slave configures the address information as its own communication address, including:
[0022] Performing first numbering on the address information of the plurality of slaves, wherein the first numbering of the slaves increases step by step;
[0023] The broadcast instruction of the host is obtained and second-numbered, and the first number is compared with the second number. When the first number matches the second number, the slave responds to the broadcast instruction of the host.
[0024] In some embodiments of the present invention, the platen status monitoring system is further provided with an alarm device, and the alarm device is respectively connected to the host and the slave. After the host completes the address allocation of all the slaves, the method further includes:
[0025] Acquire a first communication cycle between the host and the slave;
[0026] The alarm module compares the first communication cycle with the preset second communication cycle;
[0027] When the first communication cycle matches the second communication cycle, the alarm module continuously monitors the host and the slave;
[0028] When the first communication cycle and the second communication cycle fail to match successfully, the alarm module issues an alarm reminder.
[0029] In some embodiments of the present invention, the connection switch is provided with a first connection switch and a second connection switch, the first connection switch is connected to the host and the first slave respectively, the second switch is connected in series between the plurality of slaves, and the host assigns a corresponding broadcast instruction to the first slave, including:
[0030] Acquire quantity information of the broadcast instruction, as well as a first conduction number of the first connection switch and a second conduction number of the second connection switch;
[0031] The host confirms the cascade level of the slave according to the quantity information, the first conduction number and the second conduction number;
[0032] When all the slaves complete the address allocation, each of the slaves saves its own communication address according to the cascade level, and the host records the total number of the slaves.
[0033] In a second aspect, an embodiment of the present invention provides a bus cascading device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the bus cascading method described in the first aspect above.
[0034] In a third aspect, an embodiment of the present invention provides an electronic device, comprising the bus cascade device as described in the second aspect above.
[0035] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the bus cascading method as described in the first aspect above.
[0036] The bus cascading method according to the embodiment of the present invention has at least the following beneficial effects:
[0037] The host and the slave are connected through a communication bus, each slave is connected to the same configuration instruction, a signal line is drawn from the host, and each slave is cascaded through the signal line; the host is powered on so that the host outputs a level pulse to the slave through a connection switch and starts all the slaves; when multiple slaves are turned on, the host assigns a corresponding broadcast instruction to the first slave, wherein the broadcast instruction includes address information; the slave configures the address information as its own communication address, and sends a low level pulse to the next level slave of the first slave, and sends a response signal to the host; after receiving the response signal, the corresponding broadcast instruction is assigned to the next level slave until the host completes the address assignment of all slaves. According to the technical solution of this embodiment, the address can be automatically assigned, the wiring process is relatively simple, and there is no need for the debugging personnel to go to the site for debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flow chart of a bus cascading method provided by an embodiment of the present invention;
[0039] Figure 2 is a flowchart of a host distributing a corresponding broadcast instruction to a first slave provided by an embodiment of the present invention;
[0040] Figure 3 This is a flow chart after the corresponding broadcast instruction is allocated to the next-level slave machine according to an embodiment of the present invention;
[0041] Figure 4 This is a flow chart after sending a response signal to the host according to an embodiment of the present invention;
[0042] Figure 5 is a flowchart of a slave configuring address information as its own communication address provided by an embodiment of the present invention;
[0043] Figure 6 This is a flow chart provided by an embodiment of the present invention until the host completes address allocation for all slaves;
[0044] Figure 7 is a flowchart of a host distributing a corresponding broadcast instruction to a first slave provided by an embodiment of the present invention;
[0045] Figure 8 It is a structural diagram of a bus cascade device provided in another embodiment of the present invention. DETAILED DESCRIPTION
[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0047] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0048] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0049] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0050] The embodiment of the present invention provides a platen status monitoring system, which includes a host, at least two slaves, an alarm device, a first connection switch and a second connection switch, wherein the alarm device is connected to the host and the slave respectively, and the first connection switch and the communication bus are connected between the host and the first slave connected to the host, and the second connection switch connects multiple slaves in series through a signal line. In this embodiment, a signal line is added outside the communication bus, and the signal line is led out by the host, and all the slaves are connected in series in sequence through multiple second connection switches. The signal line of each level is output by the previous level and input by the next level. The signal line has only two states, 0 and 1. When a slave of a certain level reads a low-level pulse, it receives a broadcast instruction from the host, and the broadcast instruction contains address information. The slave configures the address information as its own communication address, and so on and so forth, and the address is automatically allocated step by step.
[0051] By way of example, the bus includes but is not limited to an RS485 bus, a LIN bus, and a CAN bus, etc., and this embodiment does not impose any specific limitation thereto.
[0052] The control method of the embodiment of the present invention is further described below based on the accompanying drawings.
[0053] Reference Figure 1 , Figure 1 A flowchart of a bus cascading method provided in an embodiment of the present invention, the bus cascading method includes but is not limited to the following steps:
[0054] Step S11, the host and the slave are connected via a communication bus, each slave is connected to the same configuration instruction, a signal line is drawn from the host, and each slave is cascaded via the signal line;
[0055] It should be noted that in the platen status monitoring system, the host serves as the control center and communicates with multiple slave vectors through a communication bus. Each slave is connected to the signal line drawn from the host to form a cascade connection. In the cascade connection, each slave receives signals from the host as a node for signal transmission. At the same time, each slave can also send signals to the host to report the platen status or other related information. The host sends unified configuration instructions to the slave through the signal line to ensure that the host can maintain consistent monitoring standards and behaviors among multiple slaves.
[0056] Step S12, powering on the host, so that the host outputs a level pulse to the slaves through the connection switch, and starts all the slaves;
[0057] It should be noted that, when the host is powered on, since the host is connected in series with all slaves through signal lines, all slaves are powered on at the same time, and the link switch between the host and the slaves and the connection switch between the slaves are high level pulses. In addition, during the transmission of the level pulse signal, the host can monitor the status and integrity of the signal in real time. When the platen status monitoring system has signal abnormality or loss, the host can immediately take measures to detect and recover the fault to ensure the normal operation of the platen status monitoring system.
[0058] Step S13, when multiple slaves are turned on, the host assigns a corresponding broadcast instruction to the first slave, wherein the broadcast instruction includes address information;
[0059] It should be noted that when the platen status monitoring system is powered on for the first time, the host outputs a low-level pulse to the first slave connected to the host through the connection switch, so that the host assigns a broadcast instruction to the first slave. In addition, the address information contained in the broadcast instruction can ensure accurate communication between the host and the slave. The broadcast instruction issued by the host can point to the characteristic slave. After the slave receives the broadcast instruction, it can be configured according to the address information.
[0060] Step S14, the slave configures the address information as its own communication address, and sends a low level pulse to the slave of the next level of the first slave, and sends a response signal to the host;
[0061] It should be noted that the host sends a broadcast command to configure address No. 1 for the first slave. The first slave responds to the broadcast command and configures its own communication address according to the address information preset in the broadcast command. It then outputs a low-level pulse through the connection switch connected to the second slave. In addition, the first slave also sends a response signal to the host to allow the host to confirm that the communication address configuration of the first slave is complete.
[0062] Furthermore, the slave configures the address information as its own communication address, ensuring that when the slave receives the host's instruction, it can accurately identify whether the instruction is what it needs to execute, and the slave sends a response signal to the host, so that the host can obtain the status and address configuration of the slave in real time, thereby reducing unnecessary communication overhead and redundant information, and there is no need for relevant staff to go to the site to configure the address of the pressure plate status monitoring device.
[0063] Step S15, after receiving the response signal, the host allocates the corresponding broadcast instruction to the next level slave until the host completes the address allocation of all slaves.
[0064] It should be noted that, after the host receives the response signal sent by the first slave, it sends a second frame broadcast command through the communication line to configure the communication address of the second slave. The second slave configures its own communication address to 2 according to the address information in the broadcast command, and outputs a low-level pulse to the third slave through the link switch, and sends a response signal to the host. And so on, until the address configuration of all n slave nodes is completed, until the corresponding response signal cannot be received after the n+1th broadcast command is issued, it is determined that the communication address configuration of all slaves is completed, and there are n slave nodes in total.
[0065] It should be noted that in the platen status monitoring system, the host represents the platen collector, and the slave represents the platen sensor. Each platen sensor can monitor the opening and closing states of 1 to 16 platens. Each platen collector can be connected to 1 to 255 platen sensors. In this embodiment, the number of platen sensors ranges from 1 to 12. Specifically, in this embodiment, an additional signal line is added outside the communication bus, and all slaves are connected in series with the host through a connecting switch. The host directly sends a broadcast instruction, and the slave responds to the broadcast instruction and configures the address information of the broadcast instruction as its own configuration information, so that the bus mode of the platen status monitoring device does not require relevant staff to go to the site for configuration, thereby reducing the workload of installation and debugging. In addition, in this embodiment, since the signal line is directly led out to connect multiple slaves in series, the host does not need to lead out multiple communication interfaces, thereby reducing the size of the host, material cost and wiring complexity.
[0066] In addition, in one embodiment, referring to Figure 2 ,exist Figure 1Step S15 of the illustrated embodiment also includes but is not limited to the following steps:
[0067] Step S21, determining a first communication state and a second communication state of the signal line, and an input port and an output port of the slave;
[0068] Step S22, when the signal line is in the first communication state, the input port converts the high level signal into a low level signal through the connection switch;
[0069] Step S23, when the signal line is in the second communication state, the communication signal output by the signal line is input to the slave of the next stage through the input port and the output port.
[0070] It should be noted that each slave is provided with an MCU, a first communication bus interface (input port) and a second communication bus interface (output port), and the MCUs of multiple slaves are connected in series through the communication bus. When the signal line is in the first communication state, the input port of the slave detects the low-level signal output by the connection switch, and responds to the low-level signal and the broadcast instruction through the MCU. When the host needs to pass the broadcast instruction to the next-level slave, the output port will pass the low-level signal to the next-level slave through the connection switch. When the signal line is in the second communication state, the output port will pass the signal to the next-level slave when the input port detects a high-level signal. In the present embodiment, by clearly distinguishing the first communication state and the second communication state, it can be ensured that the signal will not be misread or misunderstood during the transmission process, thereby improving the communication reliability between the host and multiple slaves. The input port and output port of the slave can be configured as different level signals as needed to adapt to different communication protocols and equipment requirements.
[0071] Specifically, the signal line in this embodiment has only two states, 0 and 1, and a slave at a certain level will receive the broadcast instruction sent by the host only when it reads a low-level pulse.
[0072] In addition, in one embodiment, referring to Figure 3 ,exist Figure 1 Step S15 of the illustrated embodiment further includes but is not limited to the following steps:
[0073] Step S31, inputting the pressing plate function and pressing plate name into the host;
[0074] Step S32, obtaining the cascade sequence between the host and the multiple slaves, and the address sequence of the multiple slaves, and confirming whether the cascade sequence is the same as the address sequence;
[0075] Step S33, when the cascade sequence is the same as the address sequence, the platen function and platen name corresponding to the address sequence are entered.
[0076] It should be noted that by clearly entering the platen function, platen name and address sequence of multiple slaves, it is ensured that each slave can correctly configure the corresponding platen information. When the cascade sequence is the same as the address sequence, the platen status monitoring system can communicate and transmit data as expected. For example, when the platen information needs to be updated or modified, the corresponding slave can be found directly according to the address sequence for operation. In addition, when the system fails, it can be quickly located according to the cascade sequence and address sequence. In this embodiment, the host can automatically obtain the cascade sequence of multiple slaves during the automatic address allocation process, and then according to the address sequence of the slaves entered in advance through the PC-side host computer and the corresponding platen function and name, the platen status monitoring system obtains the slave cascade sequence and the address sequence and platen name entered by the PC-side. One-to-one correspondence.
[0077] In addition, in one embodiment, referring to Figure 4 ,exist Figure 1 After step S14 in the illustrated embodiment, the following steps are also included but not limited to:
[0078] Step S41, confirming whether the host successfully receives the response signal;
[0079] Step S42, when the host fails to successfully receive the response signal, the host stops allocating the broadcast command.
[0080] It should be noted that the confirmation response signal is used to enable the pressure plate status monitoring system to verify whether the data broadcast instruction is successfully transmitted. If the host does not receive the response signal sent by the slave, it means that all slaves have completed address allocation. After the address allocation is completed, each slave will store its own address, and the host only needs to record the total number of slaves. Compared with the traditional address allocation method, it will not generate any redundant information, so as to prevent information redundancy from occurring within the pressure plate status monitoring system.
[0081] In addition, in one embodiment, referring to Figure 5 ,exist Figure 1 Step S14 of the illustrated embodiment also includes but is not limited to the following steps:
[0082] Step S51, performing first numbering on address information of a plurality of slaves, wherein the first numbering of the slaves increases step by step;
[0083] Step S52, obtaining the broadcast instruction of the host and performing a second numbering, comparing the first number with the second number, and when the first number matches the second number, the slave responds to the broadcast instruction of the host.
[0084] It should be noted that, through number matching, it can be ensured that only the slaves that receive the broadcast command will respond to the host's broadcast command, which can avoid the mistransmission of address information in the broadcast command and the occurrence of misoperation. In addition, the number operation allows the host to send instructions directly to the slaves without sending the broadcast command to all slaves and waiting for multiple slaves to respond one by one, reducing unnecessary communication overhead and improving communication efficiency.
[0085] Exemplarily, in this embodiment, the slave addresses are incremented in sequence, such as the address of slave No. 1 is set to 1, the address of slave No. 2 is 2, and the address of slave No. 3 is 3, and all slave addresses are not repeated. By allocating them step by step, the working efficiency of the host is guaranteed and information redundancy is avoided.
[0086] In addition, in one embodiment, referring to Figure 6 ,exist Figure 1 After step S15 in the illustrated embodiment, the following steps are also included but not limited to:
[0087] Step S61, obtaining the first communication cycle between the master and the slave;
[0088] Step S62, the alarm module compares the preset second communication cycle with the first communication cycle;
[0089] Step S63, when the first communication cycle matches the second communication cycle, the alarm module continuously monitors the master and the slave;
[0090] Step S64: When the first communication cycle and the second communication cycle fail to match successfully, the alarm module issues an alarm reminder.
[0091] It should be noted that by continuously monitoring the communication cycle, the system can take preventive measures before a communication failure occurs. Exemplarily, when the communication cycle between the host and the slave fluctuates abnormally or is unstable, an early warning or alarm is issued through the alarm module so that the pressure plate status online monitoring system can adjust the communication parameters or take other remedial measures in time to avoid the occurrence of communication failures. Further, when the first communication cycle matches the second communication cycle, the alarm module continuously monitors the host and the slave to ensure that the system can monitor the communication status in real time and promptly discover and solve potential communication problems between the host and the slave. When the first communication cycle does not successfully match the second communication cycle, the alarm module immediately issues an alarm reminder. Ensure that the system can quickly obtain information about communication anomalies and take corresponding measures, and the alarm reminder makes system maintenance more efficient. Relevant personnel can quickly locate the problem based on the alarm information, thereby shortening the fault recovery time and improving the efficiency of system maintenance.
[0092] In addition, in one embodiment, referring to Figure 7 ,exist Figure 1 Step S13 of the illustrated embodiment also includes but is not limited to the following steps:
[0093] Step S71, acquiring the number information of the broadcast instruction, as well as the first conduction number of the first connection switch and the second conduction number of the second connection switch;
[0094] Step S72, the host determines the cascade level of the slave according to the quantity information, the first conduction number and the second conduction number;
[0095] Step S73, when all slaves have completed address allocation, each slave saves its own communication address according to the cascade level, and the host records the total number of slaves.
[0096] It should be noted that by monitoring the number of broadcast instructions and the number of times the connection switch is turned on, the host can automatically determine the cascade level of the slave according to the quantity information, the first number of times the connection switch is turned on, and the second number of times the connection switch is turned on, and the communication address is assigned to the slave according to the cascade level. The tedious process of manually configuring the address is avoided, and the degree of automation of the pressure plate state monitoring system is improved. By monitoring the number of broadcast instructions and the number of times the connection switch is turned on, the host can automatically determine the cascade level of the slave, and assign the communication address to the slave accordingly. Since the address allocation is based on the high and low level states of the broadcast instructions and the connection switch output, the occurrence of address conflicts or configuration errors caused by manual input errors is reduced.
[0097] like Figure 8 As shown, Figure 8 : is a structural diagram of a bus cascade device provided by an embodiment of the present invention. The present invention also provides a bus cascade device, including:
[0098] The processor 801 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0099] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the bus cascading method of the embodiment of this application;
[0100] Input / output interface 803, used to implement information input and output;
[0101] The communication interface 804 is used to realize the communication interaction between the present apparatus and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0102] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0103] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0104] An embodiment of the present application also provides an electronic device, comprising the bus cascading device as described above.
[0105] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned bus cascading method is implemented.
[0106] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0107] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0108] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A bus cascading method, characterized in that: Applied in a platen status monitoring system, the platen status monitoring system includes a host and at least two slaves, and the bus cascading method includes: The host and the slaves are connected via a communication bus, each of the slaves is connected to the same configuration instruction, a signal line is drawn from the host, and each of the slaves is cascade-connected via the signal line; Powering on the host, so that the host outputs level pulses to the slaves through the connection switch, and starts all the slaves; When the plurality of slaves are turned on, the host allocates a corresponding broadcast instruction to the first slave, wherein the broadcast instruction includes address information; The slave configures the address information as its own communication address, sends a low level pulse to the slave of the next level of the first slave, and sends a response signal to the host; After receiving the response signal, the host allocates the corresponding broadcast instruction to the slaves at the next level until the host completes the address allocation of all the slaves.
2. The bus cascading method according to claim 1, characterized in that: The host allocates a corresponding broadcast instruction to the first slave, including: Determining a first communication state and a second communication state of the signal line, and an input port and an output port of the slave; When the signal line is in the first communication state, the input port converts the high level signal into the low level signal through the connection switch; When the signal line is in the second communication state, the communication signal output by the signal line is input to the slave of the next stage through the input port and the output port.
3. The bus cascading method according to claim 1, characterized in that: The allocating the corresponding broadcast instruction to the next-level slave includes: Entering the platen function and platen name into the host; Obtaining a cascade sequence between the host and the plurality of slaves, and an address sequence of the plurality of slaves, and confirming whether the cascade sequence is the same as the address sequence; When the cascade sequence is the same as the address sequence, the pressure plate function and the pressure plate name corresponding to the address sequence are entered.
4. The bus cascading method according to claim 1, characterized in that: After sending a response signal to the host, the method further comprises: confirming whether the host successfully receives the response signal; When the host fails to successfully receive the response signal, the host stops allocating the broadcast command.
5. The bus cascading method according to claim 1, characterized in that: The slave configures the address information as its own communication address, including: Performing first numbering on the address information of the plurality of slaves, wherein the first numbering of the slaves increases step by step; The broadcast instruction of the host is obtained and second-numbered, and the first number is compared with the second number. When the first number matches the second number, the slave responds to the broadcast instruction of the host.
6. The bus cascading method according to claim 1, characterized in that: The platen status monitoring system is also provided with an alarm device, which is connected to the host and the slave respectively. After the host completes the address allocation of all the slaves, the method further includes: Acquire a first communication cycle between the host and the slave; The alarm module compares the first communication cycle with the preset second communication cycle; When the first communication cycle matches the second communication cycle, the alarm module continuously monitors the host and the slave; When the first communication cycle and the second communication cycle fail to match successfully, the alarm module issues an alarm reminder.
7. The bus cascading method according to claim 1, characterized in that: The connection switch is provided with a first connection switch and a second connection switch, the first connection switch is connected to the host and the first slave respectively, the second switch is connected in series between the plurality of slaves, and the host assigns a corresponding broadcast instruction to the first slave, including: Acquire quantity information of the broadcast instruction, as well as a first conduction number of the first connection switch and a second conduction number of the second connection switch; The host confirms the cascade level of the slave according to the quantity information, the first conduction number and the second conduction number; When all the slaves complete the address allocation, each of the slaves saves its own communication address according to the cascade level, and the host records the total number of the slaves.
8. A bus cascade device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the bus cascading method as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: It includes the bus cascade device as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the bus cascading method according to any one of claims 1 to 7.