WO2023279910A1 - 一种主从机控制方法、控制系统及血液柜 - Google Patents

一种主从机控制方法、控制系统及血液柜 Download PDF

Info

Publication number
WO2023279910A1
WO2023279910A1 PCT/CN2022/097795 CN2022097795W WO2023279910A1 WO 2023279910 A1 WO2023279910 A1 WO 2023279910A1 CN 2022097795 W CN2022097795 W CN 2022097795W WO 2023279910 A1 WO2023279910 A1 WO 2023279910A1
Authority
WO
WIPO (PCT)
Prior art keywords
bus
slave
signal
host
port
Prior art date
Application number
PCT/CN2022/097795
Other languages
English (en)
French (fr)
Inventor
闻中华
陈海涛
唐先双
鄢建洋
黄朋
王路
Original Assignee
青岛海尔生物医疗科技有限公司
青岛海尔生物医疗股份有限公司
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 青岛海尔生物医疗科技有限公司, 青岛海尔生物医疗股份有限公司 filed Critical 青岛海尔生物医疗科技有限公司
Publication of WO2023279910A1 publication Critical patent/WO2023279910A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/0723Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips the record carrier comprising an arrangement for non-contact communication, e.g. wireless communication circuits on transponder cards, non-contact smart cards or RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092

Definitions

  • the invention belongs to the technical field of master-slave machine control, and in particular relates to a master-slave machine control method, a control system and a blood cabinet.
  • RS485 bus communication has a semi-duplex feature, that is, data cannot be received in the state of sending data, and cannot be sent in the state of receiving data.
  • the RS485 bus communication method has the following two disadvantages:
  • each antenna board When each antenna board is triggered to read RFID tags, it will actively upload data to the 485 bus.
  • the traditional method is to perform bus arbitration and delay transmission when data conflicts; but when data conflicts, the bus is in a short-circuit state, which is easy to damage electronic components. device; and it is difficult to recover after a conflict, and it must be powered off and then powered on again, which is a poor experience.
  • Each antenna board is in an unknown address state, and the traditional RS485 bus must be manually configured to communicate with the address, which is inconvenient to operate.
  • the invention provides a master-slave machine control method, which automatically acquires the address of the slave machine and solves the problem of data conflict on the RS485 bus.
  • the present invention adopts the following technical solutions to achieve:
  • a master-slave control method the 485 port of the master and the 485 port of each slave are respectively connected to the RS485 bus; the IO port of the master is connected to the IO port of one of the slaves, and the IO port of the slave is connected to the other slaves
  • the IO ports are serially connected in sequence;
  • control methods include:
  • the host sends a registration signal to the RS485 bus, and the IO port of the host sends a trigger signal;
  • the slave machine When the slave machine receives the trigger signal and the registration signal, it sends the registration reply signal to the RS485 bus, and the registration reply signal contains the address of the slave machine; and sends the trigger signal through its IO port;
  • the master parses the received registration reply signal, parses out the address of the slave and saves it.
  • control method also includes:
  • the host assigns different serial numbers to the slaves that send the registration reply signal. Different serial numbers correspond to different delay times; the host sends the serial numbers to the corresponding slaves through the RS485 bus;
  • the slave machine When the slave machine receives the signal with broadcast mode from the RS485 bus, it will reply after delaying the corresponding time according to the serial number.
  • the master sorts the slaves according to the sequence of the registration reply signals received, and assigns different serial numbers.
  • the method further includes:
  • the host After the host sends the registration signal, if no registration reply signal is received within the first set time, the host will analyze the received registration reply signal, and the host will output the slave that sends the registration reply signal.
  • the host sends a query signal to the RS485 bus;
  • the slave machine When the slave machine receives the query signal from the RS485 bus, if there is a change in the slave machine, it will send the corresponding change information to the RS485 bus; if there is no change in the slave machine, it will send no change information to the RS485 bus.
  • a master-slave machine control system comprising:
  • Host which has a 485 port and an IO port; the 485 port of the host is connected to the RS485 bus;
  • each of the slaves has 485 ports and IO ports; the 485 ports of the slaves are connected to the RS485 bus; the IO ports of one of the slaves are connected to the IO port of the host, and the IO ports of the slaves The port is serially connected with the IO ports of other slaves;
  • the host computer is used to send the registration signal to the RS485 bus, and sends a trigger signal through its IO port; and is used to receive the registration reply signal from the RS485 bus, and analyze the received registration reply signal to resolve the slave address and save;
  • the slave machine is used to send a registration reply signal to the RS485 bus when receiving the trigger signal and the registration signal, and the registration reply signal includes the address of the slave machine; and sends the trigger signal through its IO port.
  • the host is also used to assign different serial numbers to the slaves sending the registration reply signal, the serial numbers are different, and the corresponding delay times are different; and the serial numbers are sent to the corresponding slaves through the RS485 bus;
  • the slave is also used to respond after delaying a corresponding time according to the serial number when receiving a signal with a broadcast mode from the RS485 bus.
  • the master is also used to sort the slaves according to the order of the received registration reply signals, and assign different serial numbers.
  • the host is also used to send a query signal to the RS485 bus;
  • the slave is also used to send corresponding change information to the RS485 bus if there is a change when receiving the query signal from the RS485 bus; if there is no change, send no change information to the RS485 bus.
  • the present invention also proposes a blood cabinet, including the master-slave control system, wherein the master in the master-slave control system is a control board, and the master-slave The slave machine in the machine control system is an RFID reader.
  • the advantages and positive effects of the present invention are: the master-slave machine control method, control system and blood cabinet of the present invention, the host machine sends a sign-up signal to the RS485 bus, and the IO port of the host machine sends a trigger signal; When receiving the trigger signal and the registration signal, send the registration reply signal to the RS485 bus, and the registration reply signal contains the address of the slave machine; and send the trigger signal through its IO port; the host will analyze the received registration reply signal, and parse out the slave machine address.
  • the address is saved and the address of the slave is automatically obtained; when the host needs to communicate with the target slave, the host sends a command containing the address of the target slave to the RS485 bus, and the target slave responds according to the command, and the other slaves do not respond. Avoid data conflicts on the RS485 bus; therefore, the master-slave control method of this embodiment realizes automatic acquisition of slave addresses, which is simple and convenient; and avoids data conflicts on the RS485 bus, ensuring smooth communication on the RS485 bus.
  • Fig. 1 is a structural block diagram of an embodiment of the master-slave control system proposed by the present invention
  • Fig. 2 is a flowchart of an embodiment of the master-slave machine control method proposed by the present invention.
  • connection should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. connected, or integrally connected. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations. In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in an appropriate manner.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
  • the present invention proposes a master-slave control method, a control system and a blood cabinet to automatically identify the slave address, which solves the problem of data conflicts.
  • This embodiment proposes a master-slave control method, wherein the 485 ports of the master and the 485 ports of each slave are respectively connected to the RS485 bus; the IO port of the master is connected to the IO port of one of the slaves, and the slave The IO ports of the slave are connected in series with the IO ports of other slaves.
  • the IO ports of the host include input IO ports and output IO ports.
  • the IO ports of the slave include input IO ports and output IO ports. Assuming that a master is connected to N slaves, the connection relationship is shown in Figure 1.
  • the 485 port of the master and the 485 ports of each slave are connected to the RS485 bus.
  • the output IO port of the master is connected to the input IO port of slave 1;
  • the output IO port of slave 1 is connected to the input IO port of slave 2;
  • the output IO port of slave 2 is connected to the input IO port of slave 3;
  • the output IO port of slave 3 is connected to the input IO port of slave 4;
  • the output IO port of the slave machine N-1 is connected to the input IO port of the slave machine N.
  • the master and N slaves are connected in parallel on the RS485 bus; the master and N slaves are serially connected in series through the input IO port and the output IO port.
  • the master-slave machine control method in this embodiment specifically includes the following steps, as shown in FIG. 2 .
  • Step S1 The host sends a registration signal to the RS485 bus, and the IO port of the host sends a trigger signal.
  • the host sends the registration signal to the RS485 bus through its 485 port. After the host sends the registration signal, it immediately enters the receiving state, and within a certain period of time the host sends a trigger signal through its IO port (specifically refers to the output IO port) (the trigger signal is level or Pulse signal).
  • Step S2 When the slave machine receives the trigger signal and registration signal, it sends a registration reply signal to the RS485 bus.
  • the registration reply signal contains the address of the slave machine; and sends a trigger signal through its IO port (specifically, the output IO port).
  • the slave connected to the RS485 bus After receiving the registration signal sent by the master, the slave connected to the RS485 bus performs state switching and switches to the registration state.
  • slave 1 When the input IO port of slave 1 receives the trigger signal sent by the output IO port of the master, slave 1 sends a registration reply signal to the RS485 bus through its 485 port, and the registration reply signal contains the address of slave 1; slave 1 After sending the registration reply signal, it immediately enters the command receiving state, and sends a trigger signal through its output IO port within a certain period of time.
  • the slave machine 2 When the input IO port of the slave machine 2 receives the trigger signal sent by the output IO port of the slave machine 1, the slave machine 2 sends a registration reply signal to the RS485 bus through its 485 port, and the registration reply signal contains the address of the slave machine 2; Machine 2 enters the command receiving state immediately after sending the registration reply signal, and sends a trigger signal through its output IO port within a certain period of time.
  • the slave machine N When the input IO port of the slave machine N receives the trigger signal from the output IO port of the slave machine N-1, the slave machine N sends a registration reply signal to the RS485 bus through its 485 port, and the registration reply signal contains the address of the slave machine 1 ; The slave machine N immediately enters the command receiving state after sending the registration reply signal, and sends a trigger signal through its output IO port within a certain period of time.
  • Step S3 The master parses the received registration reply signal, parses out the address of the slave, and saves it.
  • the master parses all received registration reply signals, parses out each slave address and saves it.
  • the method further includes: after the host sends the sign-up signal, if no sign-up reply signal is received within the first set time, it is determined that the sign-up is over, and the host will All the received registration reply signals are analyzed, and the host outputs the slave that sent the registration reply signal, that is, outputs (such as prints out) the slaves that have successfully registered (such as the address of the slave), which is used for manual troubleshooting, so that it is easy to find out that there is no sending Register the slave that replies to the signal.
  • the host After registration, when the host needs to communicate with the target slave, the host sends a command containing the address of the target slave to the RS485 bus, the target slave responds according to the command, and the other slaves do not respond.
  • the host When the host needs to communicate with a certain slave, the host sends an instruction to the RS485 bus, which contains the address of the target slave.
  • the slave connected to the RS485 bus will analyze the address of the slave after receiving the command. If the resolved slave address is consistent with its own address, the slave is the target slave. It will respond according to the command and send the response signal Send to the RS485 bus; if the parsed slave address is inconsistent with its own address, the slave is not the target slave and no response is required, thereby preventing data conflicts on the RS485 bus.
  • the host computer sends the registration signal to the RS485 bus, and the IO port of the host computer sends a trigger signal; when the slave machine receives the trigger signal and the registration signal, it sends a registration reply signal to the RS485 bus, and the registration reply signal Contains the slave address; and sends a trigger signal through its IO port; the host parses the received registration reply signal, parses out the slave address and saves it, and realizes automatic acquisition of the slave address; when the host needs to communicate with the target slave , the host sends an instruction that includes the address of the target slave to the RS485 bus, the target slave responds according to the instruction, and the rest of the slaves do not respond to avoid data conflicts on the RS485 bus; therefore, the master-slave control method of this embodiment realizes In order to automatically obtain the slave address, it is simple and convenient; and avoids data conflicts on the RS485 bus, ensuring smooth communication on the RS485 bus.
  • the master assigns different serial numbers to the slaves sending the registration reply signal, the serial numbers are different, and the corresponding delay times are different, and the serial number and the corresponding delay time are saved; the master assigns the serial number and the corresponding delay time The time is sent to the corresponding slave through the RS485 bus.
  • the slave receives a signal with broadcast mode from the RS485 bus, it will respond after a corresponding time delay according to the serial number. Since the sequence numbers of each slave are different, the delay time is also different, so the response time of each slave is also different, so as to avoid data conflicts on the RS485 bus and ensure the normal communication of the RS485 bus.
  • the serial number of slave 1 is 1, and the corresponding delay time is T1; the serial number of slave 2 is 2, and the corresponding delay time is T2; ..., the serial number of slave N is N, and the corresponding delay time is TN.
  • the master sends the command including the slave 1 address, serial number 1, and delay time T1 to the slave 1 through the RS485 bus, and the slave 1 receives the command, parses out the serial number 1 and the delay time T1, and saves it.
  • the master sends the instruction including the address of the slave 2, the serial number 2, and the delay time T2 to the slave 2 through the RS485 bus, and the slave 2 receives the instruction, parses out the serial number 2 and the delay time T2, and saves it.
  • the master sends the command including the address of the slave N, the serial number N, and the delay time TN to the slave N through the RS485 bus, and the slave N receives the command, parses out the serial number N and the delay time TN, and saves it.
  • the host sends a signal with broadcast mode to the RS485 bus;
  • slave 1 When slave 1 receives a signal with broadcast mode from the RS485 bus, it delays T1 and then responds;
  • the slave 2 When the slave 2 receives a signal with broadcast mode from the RS485 bus, it delays T2 and then responds;
  • the slave N When the slave N receives a signal with broadcast mode from the RS485 bus, it delays TN and then responds;
  • T1, T2, T3, ..., TN are different, so the response time of slave 1, slave 2, ..., slave N is different, to prevent data conflicts on the RS485 bus.
  • the master sorts the slaves according to the sequence of the registration reply signals received, and assigns different serial numbers, so that sorting is simple, convenient, and easy to implement.
  • the state or data of the slave may change, and if there is a change, the change flag is temporarily stored.
  • the master sends a query signal to the RS485 bus; when the slave receives the query signal from the RS485 bus, if there is a change in the slave, it sends the corresponding change information to the RS485 bus; if there is no change in the slave, it sends no change information to the RS485 bus .
  • the host When the host needs to know whether the slave has changed, including status changes and data changes, the host sends a query signal to the RS485 bus.
  • the slave machine receives the query signal from the RS485 bus, if the slave machine changes (the state changes or the data changes), the slave machine sends the corresponding change information to the RS485 bus; change), then send no change information to the RS485 bus.
  • the master can know the status of the slave conveniently and timely by sending a query signal to the RS485 bus.
  • the host can query the status of the slaves one by one in a certain order according to the stored slave addresses. Therefore, the query signal contains the address of the target slave. After the target slave receives the query signal, Send corresponding change information or no change information to RS485 bus. For example, first, the host sends an inquiry signal containing the address of slave 1 to the RS485 bus, and slave 1 responds; then, the host sends an inquiry signal including the address of slave 2 to the RS485 bus, and slave 2 responds; ... until the host sends All successfully registered slaves send query signals to obtain the changes of all successfully registered slaves. The master can query the status of the slaves one by one at regular intervals.
  • the query signal can also be in the broadcast mode.
  • each slave machine receives the query signal in the broadcast mode, it delays the response for a different time, so as to prevent data conflicts.
  • the master-slave control method of the present embodiment can automatically obtain the slave address on the RS485 bus; it can obtain the state and data changes of the slave on the RS485 bus; it can solve the data conflict problem on the RS485 bus and protect the slaves on the RS485 bus. hardware equipment.
  • the host computer when the host computer sends the registration signal to the RS485 bus, it enters the registration operation, that is, steps S1 and S2 are executed; When the registration reply signal is received, it is determined that the registration is completed, and step S3 is executed.
  • the master sends a query signal to the RS485 bus
  • the slave sends corresponding change information or no change information to the RS485 bus.
  • the host receives the control command, the query operation is suspended, and the query operation is performed after the control command is completed first.
  • the second embodiment also proposes a master-slave control system, including a master and multiple slaves, as shown in FIG. 1 .
  • the host has a 485 port and an IO port; the 485 port of the host is connected to the RS485 bus.
  • Each slave has a 485 port and an IO port; the 485 port of the slave is connected to the RS485 bus; the IO port of one of the slaves is connected to the IO port of the master, and the IO port of the slave is connected to the IO ports of other slaves in sequence in series.
  • the IO ports of the host include input IO ports and output IO ports.
  • the IO ports of the slave include input IO ports and output IO ports. Assuming that the master-slave control system includes a master and N slaves, the connection relationship is shown in Figure 1.
  • the 485 port of the master and the 485 ports of each slave are connected to the RS485 bus.
  • the output IO port of the master is connected to the input IO port of slave 1;
  • the output IO port of slave 1 is connected to the input IO port of slave 2;
  • the output IO port of slave 2 is connected to the input IO port of slave 3;
  • the output IO port of slave 3 is connected to the input IO port of slave 4;
  • the output IO port of the slave machine N-1 is connected to the input IO port of the slave machine N.
  • the master and N slaves are connected in parallel on the RS485 bus; the master and N slaves are serially connected in series through the input IO port and the output IO port.
  • the host is used to send the registration signal to the RS485 bus, and send a trigger signal through its IO port (specifically the output IO port); and is used to receive the registration reply signal from the RS485 bus, and analyze the received registration reply signal. Output the slave address and save it.
  • the slave machine is used to send the registration reply signal to the RS485 bus when receiving the trigger signal and the registration signal.
  • the registration reply signal contains the address of the slave device; and sends the trigger signal through its IO port (specifically refers to the output IO port).
  • the host After registration, when the host needs to communicate with the target slave, the host sends a command containing the address of the target slave to the RS485 bus, the target slave responds according to the command, and the other slaves do not respond.
  • the host When the host needs to communicate with a certain slave, the host sends an instruction to the RS485 bus, which contains the address of the target slave.
  • the slave connected to the RS485 bus will analyze the address of the slave after receiving the command. If the resolved slave address is consistent with its own address, the slave is the target slave. It will respond according to the command and send the response signal Send to the RS485 bus; if the parsed slave address is inconsistent with its own address, the slave is not the target slave and no response is required, thereby preventing data conflicts on the RS485 bus.
  • the host computer sends the registration signal to the RS485 bus, and the IO port of the host computer sends a trigger signal; when the slave machine receives the trigger signal and the registration signal, it sends a registration reply signal to the RS485 bus, and the registration reply signal Contains the slave address; and sends a trigger signal through its IO port; the host parses the received registration reply signal, parses out the slave address and saves it, and realizes automatic acquisition of the slave address; when the host needs to communicate with the target slave , the host sends an instruction that includes the address of the target slave to the RS485 bus, the target slave responds according to the instruction, and the rest of the slaves do not respond to avoid data conflicts on the RS485 bus; therefore, the master-slave control method of this embodiment realizes In order to automatically obtain the slave address, it is simple and convenient; and avoids data conflicts on the RS485 bus, ensuring smooth communication on the RS485 bus.
  • the host is also used to assign different serial numbers to the slaves sending the registration reply signal.
  • the serial numbers are different, and the corresponding delay times are different, and the serial numbers and corresponding delay times are saved; the host computer assigns the serial numbers and The corresponding delay time is sent to the corresponding slave through the RS485 bus.
  • the slave machine is also used to receive a signal with broadcast mode from the RS485 bus, and then respond after a corresponding time delay according to the serial number. Since the response time of each slave machine is different, data conflicts on the RS485 bus can be avoided and the normality of the RS485 bus can be guaranteed. communication.
  • the master is also used to sort the slaves according to the order of the received registration reply signals, and assign different serial numbers, so that the sorting is simple, convenient and easy to implement.
  • the host is also used to send a query signal to the RS485 bus.
  • the slave is also used to receive the query signal from the RS485 bus. If the slave changes (the state changes or the data changes), the slave sends the corresponding change information to the RS485 bus; if the slave does not change (the state and No data change), then send no change information to the RS485 bus.
  • the master can know the status of the slave conveniently and timely by sending a query signal to the RS485 bus.
  • the query signal may contain the address of the target slave. After receiving the query signal, the target slave sends corresponding change information or no change information to the RS485 bus.
  • the query signal can also be in broadcast mode. When each slave machine receives the query signal in broadcast mode, it will delay the response for different times to prevent data conflicts.
  • Embodiment 3 proposes a blood cabinet, including the master-slave control system in Embodiment 2, wherein the master in the master-slave control system is a control board, and the slave in the master-slave control system is RFID reading and writing The RFID reader is used to read the RFID tags in the blood cabinet.
  • Each RFID reader communicates with the RFID electronic tag within its communication range, and can obtain the information stored in the RFID electronic tag, and can also write to the RFID electronic tag.
  • the blood cabinet of this embodiment realizes automatic acquisition of the RFID reader address by setting the master-slave control system, which is simple and convenient; and avoids data conflicts on the RS485 bus, ensures smooth communication on the RS485 bus, and ensures the normal operation of the blood cabinet run.

Abstract

本发明公开了一种主从机控制方法、控制系统及血液柜,通过主机发送报名信号至RS485总线,主机的IO端口发出触发信号;从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;主机将接收到的报名回复信号进行解析,解析出从机地址并保存,实现了自动获取从机地址;当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答,避免RS485总线上发生数据冲突;因此,本发明实现了自动获取从机地址,简单方便;而且避免了RS485总线上发生数据冲突,保证RS485总线上通信畅通。

Description

一种主从机控制方法、控制系统及血液柜 技术领域
本发明属于主从机控制技术领域,具体地说,是涉及一种主从机控制方法、控制系统及血液柜。
背景技术
目前RFID血液柜中,控制板(主机)与各天线板(从机)通常采用RS485总线进行通信。RS485总线通信具有半双功特性,即发送数据状态下不能接收数据,接收数据状态下不能发送。
技术问题
RS485总线通信方式具有以下两个缺点:
一、各天线板被触发读取RFID标签时,会主动上传数据至485总线,传统的方法是在数据冲突时进行总线仲裁延时发送;但在数据冲突时总线处于短路状态,容易损坏电子元器件;而且冲突后难以恢复,必须掉电后重新上电,体验差。
二、各天线板处于未知地址状态,传统RS485总线必须在人为配置地址的情况才能进行通信,操作不方便。
技术解决方案
本发明提供了一种主从机控制方法,自动获取从机地址,解决了RS485总线上数据冲突问题。
为解决上述技术问题,本发明采用下述技术方案予以实现:
一种主从机控制方法,主机的485端口以及每个从机的485端口分别与RS485总线连接;主机的IO端口与其中一个从机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联;
所述控制方法包括:
主机发送报名信号至RS485总线,主机的IO端口发出触发信号;
从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;
主机将接收到的报名回复信号进行解析,解析出从机地址并保存。
进一步的,所述控制方法还包括:
主机对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同;主机将序号通过RS485总线发送给相应的从机;
从机从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答。
又进一步的,主机根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号。
更进一步的,在所述主机将接收到的报名回复信号进行解析之前,所述方法还包括:
当主机发送完报名信号后,如果在第一设定时间内没有再接收到报名回复信号,则主机将接收到的报名回复信号进行解析,并且主机输出发送报名回复信号的从机。
再进一步的,主机发送查询信号至RS485总线;
从机从RS485总线上接收到查询信号时,如果从机有变化,则发送对应的变化信息至RS485总线;如果从机无变化,则发送无变化信息至RS485总线。
一种主从机控制系统,包括:
主机,其具有485端口、IO端口;所述主机的485端口与RS485总线连接;
多个从机,每个所述从机均具有485端口、IO端口;所述从机的485端口与RS485总线连接;其中一个从机的IO端口与主机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联;
其中,所述主机用于发送报名信号至RS485总线,且通过其IO端口发出触发信号;以及用于从RS485总线上接收报名回复信号,并对接收到的报名回复信号进行解析,解析出从机地址并保存;
所述从机用于在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;且通过其IO端口发送触发信号。
进一步的,所述主机还用于对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同;并将序号通过RS485总线发送给相应的从机;
所述从机还用于从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答。
又进一步的,所述主机还用于根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号。
更进一步的,所述主机还用于发送查询信号至RS485总线;
所述从机还用于从RS485总线上接收到查询信号时,如果有变化,则发送对应的变化信息至RS485总线;如果无变化,则发送无变化信息至RS485总线。
基于上述主从机控制系统的设计,本发明还提出了一种血液柜,包括所述的主从机控制系统,其中,所述主从机控制系统中的主机为控制板,所述主从机控制系统中的从机为RFID读写器。
有益效果
与现有技术相比,本发明的优点和积极效果是:本发明的主从机控制方法、控制系统及血液柜,主机发送报名信号至RS485总线,主机的IO端口发出触发信号;从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;主机将接收到的报名回复信号进行解析,解析出从机地址并保存,实现了自动获取从机地址;当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答,避免RS485总线上发生数据冲突;因此,本实施例的主从机控制方法,实现了自动获取从机地址,简单方便;而且避免了RS485总线上发生数据冲突,保证RS485总线上通信畅通。
附图说明
图1是本发明所提出的主从机控制系统的一个实施例的结构框图;
图2是本发明所提出的主从机控制方法的一个实施例的流程图。
本发明的实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。在上述实施方式的描述中,具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。
针对目前传统RS485总线必须在人为配置地址的情况才能进行通信,操作不方便,以及容易发生数据冲突的问题,本发明提出了一种主从机控制方法、控制系统及血液柜,自动识别从机地址,解决了数据冲突的问题。下面,对本发明的主从机控制方法、控制系统及血液柜进行具体说明。
实施例一、
本实施例提出了一种主从机控制方法,其中,主机的485端口以及每个从机的485端口分别与RS485总线连接;主机的IO端口与其中一个从机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联。
主机的IO端口包括输入IO端口和输出IO端口。从机的IO端口包括输入IO端口和输出IO端口。假设一个主机和N个从机进行连接,连接关系如图1所示。
主机的485端口以及每个从机的485端口均与RS485总线连接。
主机的输出IO端口连接从机1的输入IO端口;
从机1的输出IO端口连接从机2的输入IO端口;
从机2的输出IO端口连接从机3的输入IO端口;
从机3的输出IO端口连接从机4的输入IO端口;
……
从机N-1的输出IO端口连接从机N的输入IO端口。
因此,主机、N个从机并联在RS485总线上;主机、N个从机通过输入IO端口、输出IO端口依次串联在一起。
本实施例的主从机控制方法具体包括下述步骤,参见图2所示。
步骤S1:主机发送报名信号至RS485总线,主机的IO端口发出触发信号。
主机通过其485端口发送报名信号至RS485总线,主机发送完报名信号后立即进入接收状态,并在一定时间内主机通过其IO端口(具体指输出IO端口)发出触发信号(触发信号为电平或脉冲信号)。
步骤S2:从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口(具体指输出IO端口)发送触发信号。
连接在RS485总线上的从机在接收到主机发送的报名信号后,进行状态切换,切换到报名状态。
当从机1的输入IO端口接收到主机的输出IO端口发出的触发信号后,从机1通过其485端口发出报名回复信号至RS485总线,报名回复信号中包含从机1的地址;从机1发送完报名回复信号之后立即进入命令接收状态,并在一定时间内通过其输出IO端口发出触发信号。
当从机2的输入IO端口接收到从机1的输出IO端口发出的触发信号后,从机2通过其485端口发出报名回复信号至RS485总线,报名回复信号中包含从机2的地址;从机2发送完报名回复信号之后立即进入命令接收状态,并在一定时间内通过其输出IO端口发出触发信号。
……
当从机N的输入IO端口接收到从机N-1的输出IO端口发出的触发信号后,从机N通过其485端口发出报名回复信号至RS485总线,报名回复信号中包含从机1的地址;从机N发送完报名回复信号之后立即进入命令接收状态,并在一定时间内通过其输出IO端口发出触发信号。
步骤S3:主机将接收到的报名回复信号进行解析,解析出从机地址并保存。
主机解析所有接收到的报名回复信号,解析出各个从机地址并保存。
在主机将接收到的报名回复信号进行解析之前,所述方法还包括:当主机发送完报名信号后,如果在第一设定时间内没有再接收到报名回复信号,即判定报名结束,主机将所有接收到的报名回复信号进行解析,并且主机输出发送报名回复信号的从机,即输出(如打印出)报名成功的从机(如从机地址),供人为排查故障,便于排查出没有发出报名回复信号的从机。
报名结束后,当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答。
当主机需要与某个从机进行通信时,主机向RS485总线发出指令,指令中包含有目标从机的地址。连接在RS485总线上的从机在接收到的指令后,解析出从机地址,如果解析出的从机地址与自身地址一致,则该从机是目标从机,根据指令作出应答,将应答信号发送至RS485总线上;如果解析出的从机地址与自身地址不一致,则该从机不是目标从机,无需应答,从而防止RS485总线发生数据冲突。
本实施例的主从机控制方法,主机发送报名信号至RS485总线,主机的IO端口发出触发信号;从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;主机将接收到的报名回复信号进行解析,解析出从机地址并保存,实现了自动获取从机地址;当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答,避免RS485总线上发生数据冲突;因此,本实施例的主从机控制方法,实现了自动获取从机地址,简单方便;而且避免了RS485总线上发生数据冲突,保证RS485总线上通信畅通。
作为本实施例的一种优选设计方案,主机对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同,并保存序号和对应的延迟时间;主机将序号和对应的延迟时间通过RS485总线发送给相应的从机。当从机从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答。由于各个从机的序号不同,延迟时间也不同,因此各个从机的应答时间也不同,从而避免RS485总线上发生数据冲突,保证RS485总线的正常通信。
例如,从机1的序号为1,对应的延迟时间为T1;从机2的序号为2,对应的延迟时间为T2;……,从机N的序号为N,对应的延迟时间为TN。
主机将包含有从机1地址、序号1、延迟时间T1的指令通过RS485总线发送给从机1,从机1接收指令,解析出序号1和延迟时间T1,并保存。
主机将包含有从机2地址、序号2、延迟时间T2的指令通过RS485总线发送给从机2,从机2接收指令,解析出序号2和延迟时间T2,并保存。
……
主机将包含有从机N地址、序号N、延迟时间TN的指令通过RS485总线发送给从机N,从机N接收指令,解析出序号N和延迟时间TN,并保存。
主机向RS485总线上发出具有广播模式的信号;
从机1从RS485总线上接收到具有广播模式的信号时,延迟T1再应答;
从机2从RS485总线上接收到具有广播模式的信号时,延迟T2再应答;
……;
从机N从RS485总线上接收到具有广播模式的信号时,延迟TN再应答;
T1、T2、T3、……、TN各不相同,因此从机1、从机2、……、从机N的应答时间各不相同,防止RS485总线上发生数据冲突。
在本实施例中,主机根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号,这样排序简单方便,便于实现。
从机的状态或者数据有可能发生变化,如果有变化,则暂存变化标识。主机发送查询信号至RS485总线;从机从RS485总线上接收到查询信号时,如果从机有变化,则发送对应的变化信息至RS485总线;如果从机无变化,则发送无变化信息至RS485总线。
当主机需要获知从机是否发生变化时,包括状态变化和数据变化,主机发送查询信号至RS485总线。从机从RS485总线上接收到查询信号时,如果从机有变化(状态发生变化或数据发生变化),则从机发送对应的变化信息至RS485总线;如果从机无变化(状态和数据均无变化),则发送无变化信息至RS485总线。主机通过向RS485总线上发送查询信号可以方便及时地获知从机状态。
为防止发生数据冲突,在完成报名操作后,主机可以根据存储的从机地址,按照一定的顺序逐个地址查询从机状态,因此查询信号包含目标从机地址,目标从机接收到查询信号后,发送相应的变化信息或无变化信息至RS485总线。例如,首先,主机发送包含从机1地址的查询信号至RS485总线,从机1应答;然后,主机发送包含从机2地址的查询信号至RS485总线,从机2应答;……,直至主机向所有报名成功的从机发送查询信号,获得所有报名成功的从机的变化情况。主机可以每隔一定时间逐个查询从机状态。
当然,查询信号也可以是广播模式,各个从机接收到广播模式的查询信号时,分别延迟不同的时间再应答,防止发生数据冲突。
本实施例的主从机控制方法,可以自动获取RS485总线上的从机地址;可以获取RS485总线上的从机的状态和数据变化;可以解决RS485总线上的数据冲突问题,保护RS485总线上的硬件设备。
本实施例的主从机控制方法,当主机发送报名信号至RS485总线上时,进入报名操作,即执行步骤S1、S2;当主机发送完报名信号后,如果在第一设定时间内没有再接收到报名回复信号,即判定报名结束,执行步骤S3。当主机发送查询信号至RS485总线上时,从机发送对应的变化信息或无变化信息至RS485总线。当主机接收到控制命令时,暂停查询操作,先完成控制命令后,再执行查询操作。
实施例二、
基于上述实施例一的主从机控制方法,本实施例二还提出了一种主从机控制系统,包括主机和多个从机,参见图1所示。
主机,其具有485端口、IO端口;主机的485端口与RS485总线连接。
每个从机均具有485端口、IO端口;从机的485端口与RS485总线连接;其中一个从机的IO端口与主机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联。
主机的IO端口包括输入IO端口和输出IO端口。从机的IO端口包括输入IO端口和输出IO端口。假设主从机控制系统包括一个主机和N个从机,连接关系如图1所示。
主机的485端口以及每个从机的485端口均与RS485总线连接。
主机的输出IO端口连接从机1的输入IO端口;
从机1的输出IO端口连接从机2的输入IO端口;
从机2的输出IO端口连接从机3的输入IO端口;
从机3的输出IO端口连接从机4的输入IO端口;
……
从机N-1的输出IO端口连接从机N的输入IO端口。
因此,主机、N个从机并联在RS485总线上;主机、N个从机通过输入IO端口、输出IO端口依次串联在一起。
主机用于发送报名信号至RS485总线,且通过其IO端口(具体指输出IO端口)发出触发信号;以及用于从RS485总线上接收报名回复信号,并对接收到的报名回复信号进行解析,解析出从机地址并保存。
从机用于在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;且通过其IO端口(具体指输出IO端口)发送触发信号。
报名结束后,当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答。
当主机需要与某个从机进行通信时,主机向RS485总线发出指令,指令中包含有目标从机的地址。连接在RS485总线上的从机在接收到的指令后,解析出从机地址,如果解析出的从机地址与自身地址一致,则该从机是目标从机,根据指令作出应答,将应答信号发送至RS485总线上;如果解析出的从机地址与自身地址不一致,则该从机不是目标从机,无需应答,从而防止RS485总线发生数据冲突。
具体的主从机控制系统的工作过程,已经在上述主从机控制方法中详述,此处不予赘述。
本实施例的主从机控制系统,主机发送报名信号至RS485总线,主机的IO端口发出触发信号;从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;主机将接收到的报名回复信号进行解析,解析出从机地址并保存,实现了自动获取从机地址;当主机需要与目标从机通信时,主机发出包含有目标从机地址的指令至RS485总线,目标从机按照指令进行应答,其余从机不应答,避免RS485总线上发生数据冲突;因此,本实施例的主从机控制方法,实现了自动获取从机地址,简单方便;而且避免了RS485总线上发生数据冲突,保证RS485总线上通信畅通。
作为本实施例的一种优选设计方案,主机还用于对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同,并保存序号和对应的延迟时间;主机将序号和对应的延迟时间通过RS485总线发送给相应的从机。从机还用于从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答,由于各个从机的应答时间不同,避免RS485总线上发生数据冲突,保证RS485总线的正常通信。
本实施例中,主机还用于根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号,这样排序简单方便,便于实现。
本实施例中,主机还用于发送查询信号至RS485总线。从机还用于从RS485总线上接收到查询信号时,如果从机有变化(状态发生变化或数据发生变化),则从机发送对应的变化信息至RS485总线;如果从机无变化(状态和数据均无变化),则发送无变化信息至RS485总线。主机通过向RS485总线上发送查询信号可以方便及时地获知从机状态。
查询信号可以包含有目标从机地址,目标从机接收到查询信号后,发送相应的变化信息或无变化信息至RS485总线。查询信号也可以是广播模式,各个从机接收到广播模式的查询信号时,分别延迟不同的时间再应答,防止发生数据冲突。
实施例三、
本实施例三提出了一种血液柜,包括实施例二中的主从机控制系统,其中,主从机控制系统中的主机为控制板,主从机控制系统中的从机为RFID读写器,RFID读写器用于读取血液柜中的RFID标签。
血液柜内存储有多个血袋,每个血袋上均粘贴有RFID电子标签。每个RFID读写器与其通信范围内的RFID电子标签进行通信,可以获得RFID电子标签中存储的信息,也可以对RFID电子标签进行写操作。
本实施例的血液柜,通过设置主从机控制系统,实现了自动获取RFID读写器地址,简单方便;而且避免了RS485总线上发生数据冲突,保证RS485总线上通信畅通,保证血液柜的正常运行。
以上实施例仅用以说明本发明的技术方案,而非对其进行限制;尽管参照前述实施例对本发明进行了详细的说明,对于本领域的普通技术人员来说,依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明所要求保护的技术方案的精神和范围。

Claims (10)

  1. 一种主从机控制方法,其特征在于:主机的485端口以及每个从机的485端口分别与RS485总线连接;主机的IO端口与其中一个从机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联;
    所述控制方法包括:
    主机发送报名信号至RS485总线,主机的IO端口发出触发信号;
    从机在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;并通过其IO端口发送触发信号;
    主机将接收到的报名回复信号进行解析,解析出从机地址并保存。
  2. 根据权利要求1所述的方法,其特征在于:还包括:
    主机对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同;主机将序号通过RS485总线发送给相应的从机;
    从机从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答。
  3. 根据权利要求2所述的方法,其特征在于:主机根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号。
  4. 根据权利要求1所述的方法,其特征在于:在所述主机将接收到的报名回复信号进行解析之前,所述方法还包括:
    当主机发送完报名信号后,如果在第一设定时间内没有再接收到报名回复信号,则主机将接收到的报名回复信号进行解析,并且主机输出发送报名回复信号的从机。
  5. 根据权利要求1所述的方法,其特征在于:
    主机发送查询信号至RS485总线;
    从机从RS485总线上接收到查询信号时,如果从机有变化,则发送对应的变化信息至RS485总线;如果从机无变化,则发送无变化信息至RS485总线。
  6. 一种主从机控制系统,其特征在于:包括:
    主机,其具有485端口、IO端口;所述主机的485端口与RS485总线连接;
    多个从机,每个所述从机均具有485端口、IO端口;所述从机的485端口与RS485总线连接;其中一个从机的IO端口与主机的IO端口连接,该从机的IO端口与其他从机的IO端口依次串联;
    其中,所述主机用于发送报名信号至RS485总线,且通过其IO端口发出触发信号;以及用于从RS485总线上接收报名回复信号,并对接收到的报名回复信号进行解析,解析出从机地址并保存;
    所述从机用于在接收到触发信号和报名信号时,发送报名回复信号至RS485总线,报名回复信号中包含从机地址;且通过其IO端口发送触发信号。
  7. 根据权利要求6所述的系统,其特征在于:
    所述主机还用于对发送报名回复信号的从机分配不同的序号,序号不同,对应的延迟时间不同;并将序号通过RS485总线发送给相应的从机;
    所述从机还用于从RS485总线上接收到具有广播模式的信号时,根据序号延迟相应的时间后再应答。
  8. 根据权利要求7所述的系统,其特征在于:所述主机还用于根据接收到的报名回复信号的先后顺序对从机进行排序,分配不同的序号。
  9. 根据权利要求6所述的系统,其特征在于:
    所述主机还用于发送查询信号至RS485总线;
    所述从机还用于从RS485总线上接收到查询信号时,如果有变化,则发送对应的变化信息至RS485总线;如果无变化,则发送无变化信息至RS485总线。
  10. 一种血液柜,其特征在于:包括如权利要求6至9中任一项所述的控制系统,其中,所述控制系统中的主机为控制板,所述控制系统中的从机为RFID读写器。
PCT/CN2022/097795 2021-07-05 2022-06-09 一种主从机控制方法、控制系统及血液柜 WO2023279910A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110757152.6A CN115587065A (zh) 2021-07-05 2021-07-05 一种主从机控制方法、控制系统及血液柜
CN202110757152.6 2021-07-05

Publications (1)

Publication Number Publication Date
WO2023279910A1 true WO2023279910A1 (zh) 2023-01-12

Family

ID=84770940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097795 WO2023279910A1 (zh) 2021-07-05 2022-06-09 一种主从机控制方法、控制系统及血液柜

Country Status (2)

Country Link
CN (1) CN115587065A (zh)
WO (1) WO2023279910A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801494A (zh) * 2023-02-08 2023-03-14 浙江正泰物联技术有限公司 通讯系统及用于通讯系统的组网方法
CN115955460A (zh) * 2023-03-10 2023-04-11 中山大洋电机股份有限公司 一种多电机联网控制系统的地址分配方法
CN116132218A (zh) * 2023-03-30 2023-05-16 杭州协能科技股份有限公司 主机和多从机的通信系统及其通信方法
CN116644012A (zh) * 2023-07-26 2023-08-25 深圳市逸云天电子有限公司 一种总线通信方法、电子设备及计算机可读存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032451B (zh) * 2023-01-11 2023-06-06 深圳市深视智能科技有限公司 一种三线半双工多机通信系统及三线半双工多机通信方法
CN117614940B (zh) * 2024-01-24 2024-04-09 北京众谊越泰科技有限公司 一种串行通信设备地址自动配置的方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177823A1 (en) * 2008-01-04 2009-07-09 Hon Hai Precision Industry Co., Ltd. Method and system for setting data communication addresses
CN103454996A (zh) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 主从机系统及其控制方法
CN105847456A (zh) * 2015-01-13 2016-08-10 浙江大华技术股份有限公司 一种rs485自动分配地址方法、装置和系统
CN112235435A (zh) * 2020-10-21 2021-01-15 递易(上海)智能科技有限公司 一种用于快速编码的方法与设备
CN112929249A (zh) * 2019-12-05 2021-06-08 深圳市凯弦欣能科技有限公司 Rs-485总线多机通信地址自动分配方法、装置和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177823A1 (en) * 2008-01-04 2009-07-09 Hon Hai Precision Industry Co., Ltd. Method and system for setting data communication addresses
CN103454996A (zh) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 主从机系统及其控制方法
CN105847456A (zh) * 2015-01-13 2016-08-10 浙江大华技术股份有限公司 一种rs485自动分配地址方法、装置和系统
CN112929249A (zh) * 2019-12-05 2021-06-08 深圳市凯弦欣能科技有限公司 Rs-485总线多机通信地址自动分配方法、装置和系统
CN112235435A (zh) * 2020-10-21 2021-01-15 递易(上海)智能科技有限公司 一种用于快速编码的方法与设备

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801494A (zh) * 2023-02-08 2023-03-14 浙江正泰物联技术有限公司 通讯系统及用于通讯系统的组网方法
CN115955460A (zh) * 2023-03-10 2023-04-11 中山大洋电机股份有限公司 一种多电机联网控制系统的地址分配方法
CN116132218A (zh) * 2023-03-30 2023-05-16 杭州协能科技股份有限公司 主机和多从机的通信系统及其通信方法
CN116644012A (zh) * 2023-07-26 2023-08-25 深圳市逸云天电子有限公司 一种总线通信方法、电子设备及计算机可读存储介质
CN116644012B (zh) * 2023-07-26 2023-12-22 深圳市逸云天电子有限公司 一种总线通信方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN115587065A (zh) 2023-01-10

Similar Documents

Publication Publication Date Title
WO2023279910A1 (zh) 一种主从机控制方法、控制系统及血液柜
CN107181659B (zh) 基于rs485总线的智能柜通信方法以及系统
US10437772B2 (en) Addressing of slave devices on a single wire communications bus through register map address selection
US7747804B2 (en) Method and system for setting addresses for slave devices in data communication
CN103248526A (zh) 实现带外监控管理的通信设备、方法及主从切换方法
CN107025203B (zh) 第一板卡、第二板卡及一种设备
CN105320624B (zh) 采用数据输入输出管理控制的电子装置
WO2013173122A1 (en) Tag-to tag (rfid) autoconnect detection, related methods, circuits and systems
CN103246628A (zh) Smi接口管理方法及可编程逻辑器件
CN106657115B (zh) 一种变频器控制系统及其协议转换卡
CN203706058U (zh) 一种基于can总线的多i/o板卡扩展结构
CN107643993B (zh) 总线转换接口、总线转换接口的工作方法和通信设备
CN108491337B (zh) 一种实现群组控制的方法
CN116303207A (zh) 一种总线传输方法、装置、设备及存储介质
CN104346310B (zh) 一种高性能i2c从机数据交换电路及方法
CN115913816A (zh) 一种主从设备间通讯的通讯转换装置及方法
US7783812B2 (en) Extended serial bus architecture and method
CN111858459B (zh) 处理器及计算机
CN113875162B (zh) Nfc读取器与双nfc接口应答器之间的数据交换装置
KR101857088B1 (ko) 리턴 회로를 갖는 리모트 입출력 장치 및 그의 내부 버스 통신 방법
CN113961496A (zh) 通信电路系统、方法、芯片以及存储介质
JP3365377B2 (ja) ログイン装置、被ログイン装置、及び装置間通信システム、ログイン制御方法、並びに記録媒体
CN116756078B (zh) pcie数据包的通知方法、装置及存储介质
CN117097814B (zh) 仿真模型与终端间的异步通信方法
CN212463236U (zh) Can总线数据采集卡自适应通信装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22836665

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE