WO2015109871A1 - 主从信息实时交互方法以及系统 - Google Patents

主从信息实时交互方法以及系统 Download PDF

Info

Publication number
WO2015109871A1
WO2015109871A1 PCT/CN2014/088181 CN2014088181W WO2015109871A1 WO 2015109871 A1 WO2015109871 A1 WO 2015109871A1 CN 2014088181 W CN2014088181 W CN 2014088181W WO 2015109871 A1 WO2015109871 A1 WO 2015109871A1
Authority
WO
WIPO (PCT)
Prior art keywords
mcu
slave
master
signal
sensor
Prior art date
Application number
PCT/CN2014/088181
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 广州广电运通信息科技有限公司
Priority to EP14879888.7A priority Critical patent/EP3098678B1/en
Priority to AU2014378796A priority patent/AU2014378796B2/en
Priority to US15/104,344 priority patent/US9823650B2/en
Publication of WO2015109871A1 publication Critical patent/WO2015109871A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by the network communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/12Plc mp multi processor system
    • G05B2219/1208Communication, exchange of control, I-O data between different plc
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/12Plc mp multi processor system
    • G05B2219/1215Master slave system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25032CAN, canbus, controller area network bus
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present invention relates to the field of communications, and in particular, to a real-time interaction method and system for master-slave information.
  • the sensor signal is an important input signal for detecting the position coordinates of the banknote, the width of the banknote, and the transmission trigger of the electric component.
  • a large number of sensors are distributed in the banknote trading system, and the control module (CPU for short) in the entire trading system often needs real-time. Know the sensor signals of each module so that real-time output control commands can be issued based on the position and status information of the banknotes.
  • a master control micro control unit MCU for short
  • multiple slave MCUs are used
  • the slave MCU is responsible for collecting sensor signals of respective modules and controlling signals of the motor components, and controlling the MCU and the slave controller.
  • the MCU completely realizes information interaction through communication.
  • the specific communication process is as follows:
  • the slave MCU1 sends a command to the master MCU to request to query the slave MCU2 sensor signal;
  • the master MCU sends a command to read the sensor signal of the slave MCU 2;
  • the slave MCU2 sends the sensor signal to the master MCU
  • the master MCU sends the sensor signal to the slave MCU1.
  • the embodiment of the invention provides a real-time interaction method and system for master-slave information, which can reduce redundant information interaction and improve communication efficiency, and can be applied to a real-time fast response occasion.
  • a real-time interaction method for master-slave information including:
  • N slave MCUs collect sensor signals of respective connected sensors
  • N slave MCUs feed the sensor signal back to the master MCU through the signal adapter board;
  • the master MCU When the sensor signal satisfies the preset condition, the master MCU issues a control command to the corresponding slave MCU according to the preset condition;
  • the sensor signal and the control command are transmitted between the master MCU and the slave MCU through the signal adapter board in the manner of an SP signal.
  • it also includes:
  • the master MCU collects sensor signals of sensors connected to the master MCU.
  • the master MCU sends a control instruction to the corresponding slave MCU according to the preset condition, which specifically includes:
  • the master MCU analyzes and processes the sensor signal to obtain an analysis result
  • the master MCU When the analysis result satisfies the preset condition, the master MCU issues a control instruction to the corresponding slave MCU according to the preset condition.
  • it also includes:
  • the master MCU When the sensor signal satisfies the preset condition, the master MCU issues an execution instruction to the corresponding motor component according to the preset condition, and the motor component is connected to the master MCU.
  • the method further includes:
  • the slave MCU issues an execution instruction to the electric component connected to the slave MCU according to the control instruction;
  • the electric component performs an associated operation in accordance with the execution instruction.
  • it also includes:
  • the slave MCU acquires, from the master MCU, a sensor signal of any one or more of the remaining N-1 slave MCUs, where the N is greater than or equal to 2.
  • it also includes:
  • the signal transfer board directly transmits the sensor signal collected by the slave MCU to any one of the remaining N-1 or the plurality of slave MCUs by using a preset transfer mode, where the N is greater than or equal to 2.
  • it also includes:
  • the corresponding electric component After receiving the sensor signal from any one of the remaining N-1 or the slave MCU, the corresponding electric component is controlled to perform an operation according to the sensor signal.
  • a master-slave information real-time interactive system comprising:
  • the slave MCU connects a plurality of sensors and/or controls a plurality of electric components
  • the main control MCU and the N slave MCUs are connected by a signal transfer board;
  • the master MCU is configured to: when the obtained sensor signal meets the preset condition, the master MCU issues a control instruction to the corresponding slave MCU according to the preset condition;
  • the slave MCU is configured to collect sensor signals of the connected sensors, and feed the sensor signals to the master MCU through the signal adapter board;
  • the sensor signal and the control command are transmitted between the master MCU and the slave MCU through the signal adapter board in the manner of an SP signal.
  • the master MCU connects a plurality of sensors and/or controls a plurality of electric components
  • the master MCU is further configured to collect a sensor signal of a sensor connected to the master MCU, and when the sensor signal satisfies a preset condition, the master MCU issues an execution instruction to the corresponding motor component according to the preset condition. .
  • the slave MCU is further configured to issue an execution instruction to the electric component connected to the slave MCU according to the control instruction, and acquire, by the master MCU, a sensor of any one or more of the remaining N-1 slave MCUs. Signal, the N being greater than or equal to two.
  • the slave MCU is connected to any one of the remaining N-1 or the slave MCUs through a preset transfer mode of the signal transfer board.
  • N slave MCUs collect sensor signals of the connected sensors; N slave MCUs feed the sensor signals through the signal adapter board to the master MCU; when the sensor signals meet preset conditions The master MCU sends the corresponding slave MCU according to the preset condition.
  • the control signal is issued; the sensor signal and the control command are transmitted between the master MCU and the slave MCU by using the signal converter board as an SP signal.
  • since the non-communication interaction is implemented between the master MCU and the slave MCU through the SP signal, real-time interaction between the master MCU and the slave MCU can be achieved, and redundant information interaction is reduced. Improve communication efficiency and can be applied to real-time and fast response occasions.
  • FIG. 1 is a flowchart of an embodiment of a real-time interaction method of master-slave information according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another embodiment of a real-time interaction method of master-slave information according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an embodiment of a real-time interaction method of master-slave information according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an embodiment of an SP signal in a real-time interaction method of a master-slave information according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an embodiment of ID allocation of a slave MCU in a real-time interaction method of a master-slave information according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an embodiment of a real-time interaction method of master-slave information according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of an embodiment of a real-time interactive system of master-slave information according to an embodiment of the present invention.
  • the embodiment of the invention provides a real-time interaction method and system for the master-slave information, which is used for reducing redundant information interaction and improving communication efficiency, and can be applied to a real-time fast response occasion.
  • an embodiment of a real-time interaction method for master-slave information in an embodiment of the present invention includes:
  • N slave MCUs acquire sensor signals of respective connected sensors
  • Each of the N slave MCUs has one or several sensors, and the N slave MCUs collect the sensor signals of the respective connected sensors.
  • the N slave MCUs feed the sensor signal to the master MCU through the signal adapter board.
  • the sensor signals After obtaining the corresponding sensor signals by the N slave MCUs, the sensor signals are fed back to the master MCU through the signal adapter board.
  • the master MCU determines whether the sensor signal meets the preset condition, and if yes, executes 104, and if not, continues to wait;
  • the master MCU After the master MCU obtains the sensor signal, the master MCU determines whether the sensor signal satisfies the preset condition, and if so, executes 104, and if not, continues to wait.
  • the master MCU issues a control command to the corresponding slave MCU according to the preset condition.
  • the master MCU determines that the sensor signal satisfies the preset condition
  • the master MCU issues a control command to the corresponding slave MCU according to the preset condition.
  • the sensor signal and the control command are transmitted between the master MCU and the slave MCU through the signal adapter board in the manner of the SP signal.
  • the N slave MCUs collect the sensor signals of the connected sensors; the N slave MCUs feed the sensor signals through the signal adapter board to the master MCU; when the sensor signals meet the preset conditions, the master The control MCU issues a control command to the corresponding slave MCU according to the preset condition; the sensor signal and the control command are transmitted between the master MCU and the slave MCU through the signal adapter board in the manner of the SP signal.
  • the non-communication interaction is implemented between the master MCU and the slave MCU through the SP signal, real-time interaction between the master MCU and the slave MCU can be achieved, and redundant information interaction is reduced. Improve communication efficiency, and it can be applied to real-time and fast response.
  • FIG. 2 another embodiment of the real-time interaction method of the master-slave information in the embodiment of the present invention includes:
  • the N slave MCUs collect sensor signals of the connected sensors.
  • Each of the N slave MCUs has one or several sensors, and the N slave MCUs collect the sensor signals of the respective connected sensors.
  • the master MCU collects a sensor signal of a sensor connected to the master MCU.
  • the master MCU can also be equipped with one or several sensors and collect the connected signals. Sensor signal of the sensor. It can be understood that the sensor signals of these sensors are directly obtained by the master MCU.
  • the N slave MCUs feed the sensor signal to the master MCU through the signal adapter board.
  • the sensor signals are fed back to the master MCU through the signal adapter board.
  • the signal transfer board can be free of any CPU or MCU, and is only responsible for the function of the transfer signal.
  • the sensor signal can be used as the SP signal in the master MCU and the slave MCU through the signal transfer board. Transfer between.
  • the SP signal can be a level signal, which is characterized by fast and simple transmission.
  • the master MCU analyzes and processes the sensor signal to obtain an analysis result.
  • the master MCU After obtaining the sensor signal, the master MCU analyzes and processes the sensor signal and obtains the analysis result. It can be understood that the analysis result is applicable to the judgment of the state of each sensor by the master MCU, so that the master MCU performs corresponding processing on the corresponding situation, which is not limited herein.
  • the master MCU determines whether the analysis result meets the preset condition, and if yes, executes 206, and if not, continues to wait;
  • the master MCU determines whether the analysis result satisfies the preset condition, and if so, executes 206, and if not, continues to wait. It can be understood that the preset condition can be specifically set according to the needs of actual use.
  • the master MCU determines the position of the electric component that executes the relevant command according to the preset condition, if the electric component is under the master MCU, execute 207, if the electric component is under a slave MCU, execute 208;
  • the master MCU After the analysis result satisfies the preset condition, the master MCU needs to determine which one or which of the electric components to perform the operation, and determine the positions of the electric components that need to perform the operation, thereby transmitting the relevant instructions. If the electric component is under the master MCU, then 207 is performed, and if the motor component is under a slave MCU, 208 is performed.
  • the main control MCU issues an execution instruction to the corresponding electric component
  • the master MCU When the corresponding motor component is under the master MCU, the master MCU issues an execution command to the corresponding motor component.
  • the master MCU issues a control command to the corresponding slave MCU.
  • the master MCU When the corresponding electric component is under the slave MCU, the master MCU goes to the corresponding slave MCU Control instructions. It can be understood that the control command may require the slave MCU to issue an execution command to the corresponding electric component under it.
  • the slave MCU issues an execution instruction to the electric component connected to the slave MCU according to the control instruction;
  • the slave MCU After the slave MCU receives the control command, the slave MCU issues an execution command to the electric component connected to the slave MCU according to the control command. It can be understood that the slave MCU can issue the execution instruction to each of the electric components under the slave MCU, and can also issue the execution command to the relevant electric component according to the control instruction, and the unrelated electric component does not. Need to be released.
  • the electric component performs an operation according to the execution instruction.
  • the motor component when the motor component receives the execution command, the motor component performs related operations according to the execution command.
  • the sensor signal and the control command are transmitted between the master MCU and the slave MCU through the signal adapter board in an SP signal manner to maintain real-time between the master MCU and the slave MCU. Interaction.
  • the slave MCU can obtain the sensor signals of any one or more of the remaining N-1 slave MCUs to the master MCU, and the signal adapter board passes the sensor signals collected by the slave MCU through the pre-
  • the set transfer mode can be directly transmitted to any one of the remaining N-1 or multiple slave MCUs, and the N is greater than or equal to 2. Therefore, after receiving the sensor signal from any one or more of the remaining N-1 slave control MCUs, the corresponding electric component can be controlled to perform an operation according to the sensor signal. This process enables signal sharing between the slave MCUs without the involvement of the master MCU, enabling faster response between certain special sensors and/or motor components.
  • the real-time monitoring sensor mode of the main control MCU is collected in real time by the main control MCU timer, and the sensor signal of the sensor on the slave MCU is collected by the slave MCU.
  • the SP signal and sensor signal transmission delay and banknote coordinate positioning delay are limited only by the command speed of the master MCU and the slave MCU and the time when the timer scan signal is configured.
  • the method can effectively reduce the number of communication interactions, and avoid the communication delay of timely control, and the efficiency is high.
  • N slave MCUs collect sensor signals of the connected sensors; N slave MCUs feed the sensor signals through the signal adapter board to the master MCU; the master MCU will The sensor signal is analyzed and processed to obtain an analysis result; when the analysis result satisfies the preset condition, the master MCU issues a control command to the corresponding slave MCU according to the preset condition; the sensor signal and the control command pass the signal.
  • the interposer board transmits between the master MCU and the slave MCU in the form of SP signals.
  • Class A sensors are main control MCUs, and multiple slave MCUs need special sensors for real-time monitoring. Class A sensors are used as output signals from slave MCUs to other slave MCUs and master MCUs;
  • Class B sensors are sensors that need to pass signals to each other between slave MCUs. After switching and filtering, it is output to other slave MCUs.
  • the input and output modes of Class B sensors are: single-point input and multi-point output;
  • Class C sensors are sensors that are independently monitored by the MCU and the slave MCU. Other MCUs do not require real-time detection.
  • the master MCU detects the Class A sensor in the main control area and the Class A sensor in the slave MCU area.
  • the four slave MCUs monitor and scan the Class A, Class B and Class C sensors in their own area.
  • the interface of the master MCU includes: a communication interaction interface, a real-time transmission interface of the class A sensor signal, and a master-slave SP signal interaction interface, and the communication interaction interface is used for a part of the signal between the master MCU and the slave MCU without real-time interaction. transmission.
  • the slave MCU is responsible for the power supply and initialization process of Class A, Class B, and Class C sensors in their respective areas after power-on, and the self-test and function self-test of the light source strength of some sensors, without the intervention of the master MCU. .
  • All sensor signals of Class A and Class B sensors need to be transferred through signal adapter board L deal with.
  • the sensor signal of the class A sensor is filtered and shaped by the signal adapter board L, and then transmitted to all the slave MCUs and the master MCU; the sensor signals of the class B sensors are filtered and shaped by the signal adapter board L, and then transmitted to the rest. All slave MCUs. After receiving the sensor signal, all MCUs need to determine whether the sensor signal satisfies the preset condition preset on the MCU. If yes, execute step g; if not, ignore it.
  • step g For the C-type sensor, it only needs to be monitored from the control MCU4. If the sensor signal of the C-type sensor satisfies the preset condition on the slave MCU4, step g is performed; if not, no need to pay attention.
  • the MCU that detects that the sensor signal meets the preset condition sends an execution instruction to the corresponding electric component according to the preset condition, and if the electric component is in the area where the MCU is located, the execution instruction is sent to the electric component between the MCU;
  • the MCU sends a control command to the MCU corresponding to the area where the electric component is located, and the corresponding MCU sends an execution command to the electric component.
  • the MCU2 detects that the sensor signal of the Class A sensor on the MCU4 satisfies the preset condition on the MCU2.
  • the preset condition setting requires that one of the MCU1 performs an operation, and the MCU2 sends a control command to the MCU1, the MCU1. After receiving the control command, the MCU 1 sends an execution instruction to the electric component such that the electric component performs a corresponding operation.
  • the control commands and sensor signals mentioned here are transmitted as SP signals.
  • h No communication interaction is required between the slave MCUs.
  • the real-time performance is not strong, the response time is not high, and the information volume is more interactive.
  • the CAN standard communication is used to realize the bus communication between the master MCU and the plurality of slave MCUs, and the communication cable connection is reduced.
  • Class A and Class B sensor signals with strong real-time performance adopt single-point input and multi-point output mode.
  • the SP signal of the master MCU is used to complete some of the real-time performance of the slave MCU with high operation timing. Real-time control of components.
  • an embodiment of the SP signal in the embodiment of the present invention includes:
  • the SP signal is a bidirectional signal, and the NPN transistor collector pull-up output is used.
  • the SP signal can be added to the SP signal by long-line transmission, and usually can be reversed or buffered.
  • the IC device is designed to protect the slave MCU.
  • the SP signal occupies two IO ports of the slave MCU, wherein GPIO3 is the control port of the SP signal, and the low level output is normally under normal conditions.
  • GPIO3 is the control port of the SP signal
  • the SP signal is pulled low to feed back the fast response state of the slave MCU executing the instruction.
  • the GPIO6 on the master MCU is the input port of the slave MCU.
  • the slave MCU uses the state of real-time scanning of the SP signal, follows up the effective agreement of the SP signal, and performs a series of actions.
  • the process of ID allocation is: after power-on, the master MCU uses the SP signal and the CAN bus communication protocol to first issue a broadcast communication, and each relatively independent slave MCU receives the broadcast communication and enters an interrupt receiving state. Detecting the SP signal sent by the master MCU. If the SP signal level is valid (usually the high level is a valid signal), the slave MCU receives the data sent by the CAN bus, and the data includes the communication identifier of the slave MCU. The controlling MCU can erase the address of the broadcast communication. If there are four slave MCUs, then the master MCU will send four broadcast communications, and identify the four slave MCUs as MCU1, MCU2, MCU3, and MCU4 respectively, and distinguish the address ID of the slave MCU by the physical signal of the SP signal.
  • the slave MCU When the slave MCU is abnormal or the slave MCU internal state is not ready for communication interaction, the slave MCU can actively change the state of the SP signal. At this time, the master MCU can detect that the slave MCU is abnormal and stops transmitting. Broadcast communication, so the process of ID assignment has efficient information interaction real-time.
  • the SP signal when the SP signal is assigned the ID of the slave MCU, it is not necessary to identify each slave MCU through the hardware address, and the ID can be directly assigned to each slave MCU through the SP signal, and each time the system is initialized or the MCU is re-established. After power-on connection, the ID is assigned. After the ID is assigned, the master MCU can distinguish the slave MCU, mark it with MCU1, MCU2, MCU3, MCU4, etc., and complete the hardware address identification by software. Moreover, after the ID is assigned, the CAN bus communication between the master MCU and the slave MCU can be realized, and the normal communication link is maintained.
  • an embodiment of the real-time interaction method of the master-slave information in the embodiment of the present invention includes:
  • Real-time control when the medium enters the storage area realizes the triggering and control of the master MCU to the slave MCU's electric components:
  • Black arrows indicate the direction of media movement
  • Slave MCU MCU1, MCU2, MCU3, MCU4, the main control MCU is not marked in Figure 6;
  • the SP signals between MCU1, MCU2, MCU3, MCU4 and the master MCU are SP1, SP2, SP3, and SP4, respectively;
  • the power stepping motor 5 is controlled by the slave MCU3;
  • Class A sensor 6 (the mechanical installation position is subordinate to the signal transfer board L area, and the master MCU, MCU1, and MCU2 are shared in real time);
  • Class A sensor 7 (mechanical mounting position is subordinate to the control area of MCU2, ie, storage area 2, the master MCU, MCU1, MCU2, MCU3 are shared in real time);
  • Class A sensor 9 (the mechanical installation position is subordinate to the control area of the MCU3, that is, the storage area 3, and the main control MCU and MCU3 are shared in real time);
  • Class B sensor 8 (the mechanical installation position is subordinate to the control area of MCU3, that is, storage area 3, MCU3, MCU4 are shared in real time);
  • Class C sensor 10 (the mechanical installation position is subordinate to the control area of MCU3, ie, storage area 3, MCU3 scans in real time);
  • N1, N2, and N3 are media that need to be stored.
  • the master MCU If multiple sheets of media are transported to position 1, position 2, position 3, as shown in Figure 6, where N1, N2, and N3 are located, the master MCU expects the sheet-type medium N3 to pass through the bidirectional commutating block S3 to enter the storage area. 3; the medium N2 passes through the bidirectional commutation block S2 to be able to enter the storage area 2; and the control N3 enters the storage area 3 as an illustration.
  • N3 In order to guarantee the medium N3 can smoothly enter the storage area 3 and reduce the speed difference of N3 at the junction of the two channels.
  • the speed of the power stepping motor 5 Before N3 reaches S3, the speed of the power stepping motor 5 needs to be close to 1.2m/s (2000PPS), due to the power stepping motor 5
  • the stepping control feature itself requires a process from low speed to high speed. When the vehicle starts to reach 2000PPS speed, the time required for starting is much longer than 41ms. Therefore, the trigger signal of the power stepping motor 5 cannot use the class A sensor 7, and the medium
  • the choice of N3 to enter the storage area is determined by the master MCU.
  • the control steps are:
  • Step a First, the master MCU detects the Class C sensor and the Class A sensor in all areas in real time, and the master MCU determines that the medium N3 needs to enter the storage area 3;
  • Step b The medium N3 satisfies the condition (such as the width and the slope of the medium) before triggering the type A sensor, and detects the medium N3 trigger signal by the type A sensor 6, and the main control MCU sends the SP3 signal to be effective;
  • Step c The MCU3 detects that the SP3 signal is valid and immediately starts executing the power stepping motor 5 (to meet the motor starting speed requirement);
  • Step d When the medium N3 triggers the class A sensor 7, it is judged whether the SP3 signal is still valid and the type B sensor 8 has no medium (here is to satisfy the safe spacing of the medium transmission), and at the same time, the SP3 is valid and the type B sensor has no medium. , MCU3 opens the two-way commutation block S3;
  • Step e After the medium N3 enters S3, the MCU 3 detects in real time whether the signals of the Class A and Class C sensors in the storage area 1, the storage area 2, the storage area 3, and the storage area 4 are abnormal, and if the abnormality is abnormal, the power stepping motor 5 is actively turned off;
  • Step f When the medium N3 is triggered to leave the class A sensor 9, the master MCU turns off the SP3 signal, and the MCU3 detects that the SP3 signal is invalid, and actively turns off the power stepping motor 5 and the bidirectional commutating block S3;
  • Step g If the SP3 signal is still valid when the MCU3 triggers the C-type sensor 10 on the medium N3, the MCU3 actively turns off the power stepping motor 5 and the bidirectional commutating block S3, and actively reports an error to ensure the stability of its safety and controllability.
  • the real-time control of the SP signal by the class A sensor and the main control MCU in the embodiment can effectively solve the problem that the starting time of the electric component is long, and the effect of triggering in advance or in real time can be achieved, and the control is stable and the operability is strong.
  • the real-time starting and timely closing of the motor is particularly suitable for the storage mode in which the medium is stored in the tape, and the control mode can effectively save the volume of the storage area by automatically controlling the electric components of the slave MCU. Increase storage capacity, while the feasibility of control is strong.
  • the dynamic electric component mode is controlled by the SP signal sent by the master MCU, and the slave MCU actively turns off the electric component depending on the SP signal of the master MCU and the active judgment of the slave MCU.
  • the master MCU can trigger the switch of the slave MCU's electric components in real time, without triggering by communication, high stability, strong anti-interference, and can start in advance. And quick start, and when the slave MCU is abnormal, the slave MCU obtains active control of the electric components to ensure its safety and stability.
  • an embodiment of the master-slave information real-time interaction system in the embodiment of the present invention includes:
  • the slave MCU 702 is connected to a plurality of sensors 703 and/or controls a plurality of motor components 704;
  • the master MCU 701 and the N slave MCUs 702 are connected by a signal transfer board 705;
  • the master MCU 701 is configured to: when the obtained sensor signal meets the preset condition, the master MCU 701 issues a control command to the corresponding slave MCU 702 according to the preset condition;
  • the slave MCU 702 is configured to collect sensor signals of the connected sensors 703, and feed the sensor signals to the master MCU 701 through the signal adapter board 705;
  • the sensor signal and the control command are transmitted between the master MCU 701 and the slave MCU 702 through the signal transfer board 705 in the manner of SP signals.
  • the master MCU 701 can connect a plurality of sensors 703 and / or control a number of electrical components 704;
  • the master MCU 701 can also be used to collect sensor signals of the sensor 703 connected to the master MCU 701. When the sensor signal satisfies the preset condition, the master MCU 701 issues an execution command to the corresponding motor component 704 according to the preset condition.
  • the slave MCU 702 can also be configured to issue an execution command to the motor component 704 connected to the slave MCU 702 according to the control command, and acquire the sensor signals of the remaining N-1 or the slave MCU 702 to the master MCU 701. , the N is greater than or equal to 2.
  • connection can be made through a preset transfer mode of the signal transfer board 705.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Small-Scale Networks (AREA)
  • Selective Calling Equipment (AREA)
  • Hardware Redundancy (AREA)

Abstract

一种主从信息实时交互方法,包括:N个从控MCU采集各自连接的传感器的传感器信号;N个从控MCU将传感器信号通过信号转接板反馈至主控MCU;当传感器信号满足预置条件时,主控MCU根据预置条件向相应的从控MCU下达控制指令;传感器信号、控制指令均通过信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。还公开了一种主从信息实时交互系统。该主从信息实时交互方法能够降低冗余信息交互,提高通信效率。

Description

主从信息实时交互方法以及系统
本申请要求于2014年1月26日提交中国专利局、申请号为201410039040.7、发明名称为“主从信息实时交互方法以及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域,尤其涉及主从信息实时交互方法以及系统。
背景技术
现金交易系统中,传感器信号作为检测纸币位置坐标、纸币宽度及电动元件的传动触发的重要输入信号,纸币交易系统中分布着大量传感器,作为整个交易系统中的控制模块(简称CPU)往往需要实时知道各个模块的传感器信号,以便能根据钞票的位置及状态信息发出实时的输出控制指令。当传感器数量很多,同时分布的物理位置各不相同时,我们需要将整个交易系统分为主控CPU(上位)及多个从控CPU(下位)来控制各个模块,如何能够实现主控CPU和多个从控CPU的信息交互(实时性)及同时知道所有传感器的信号输入(共享性)往往增加系统连接及CPU程序控制的复杂性。
现有技术中,往往采用以下方法:采用一个主控微控制单元(简称MCU)、多个从控MCU,从控MCU负责采集各自模块的传感器信号及控制电动元件信号,主控MCU与从控MCU完全通过通信方式实现信息交互。具体通信过程如下:
1、从控MCU1发送命令到主控MCU请求查询从控MCU2传感器信号;
2、主控MCU发送命令读取从控MCU2的传感器信号;
3、从控MCU2发送传感器信号到主控MCU;
4、主控MCU发送传感器信号到从控MCU1。
然而,当主控MCU需要对多个从控MCU发出控制指令时,需要与从控MCU进行多次通信才能完成信息交互,因此增加冗余信息交互,通信效率低,不适用于实时快速响应的场合。
发明内容
本发明实施例提供了主从信息实时交互方法以及系统,能够降低了冗余信息交互,提高通信效率,可以适用于实时快速响应的场合。
一种主从信息实时交互方法,包括:
N个从控MCU采集各自连接的传感器的传感器信号;
N个从控MCU将所述传感器信号通过信号转接板反馈至主控MCU;
当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令;
所述传感器信号、控制指令均通过所述信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。
可选地,还包括:
所述主控MCU采集与所述主控MCU连接的传感器的传感器信号。
可选地,当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令具体包括:
所述主控MCU将所述传感器信号进行分析处理,得出分析结果;
当所述分析结果满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令。
可选地,还包括:
当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的电动元件下达执行指令,所述电动元件与主控MCU相连接。
可选地,主控MCU根据所述预置条件向相应的从控MCU下达控制指令之后还包括:
从控MCU根据所述控制指令向与所述从控MCU相连的电动元件下达执行指令;
所述电动元件根据所述执行指令进行相关操作。
可选地,还包括:
所述从控MCU向主控MCU获取到其余N-1个中任一个或多个从控MCU的传感器信号,所述N大于或等于2。
可选地,还包括:
所述信号转接板将所述从控MCU采集的传感器信号通过预设的转接方式直接传输到其余N-1个中任一个或多个从控MCU中,所述N大于或等于2。
可选地,还包括:
所述其余N-1个中任一个或多个从控MCU接收到所述传感器信号后,根据所述传感器信号控制相应的电动元件执行操作。
一种主从信息实时交互系统,包括:
主控MCU以及N个从控MCU;
所述从控MCU连接若干个传感器和/或控制若干个电动元件;
所述主控MCU与所述N个从控MCU之间通过信号转接板进行线路连接;
所述主控MCU,用于当获得的传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令;
所述从控MCU,用于采集各自连接的传感器的传感器信号,将所述传感器信号通过信号转接板反馈至主控MCU;
所述传感器信号、控制指令均通过所述信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。
可选地,
所述主控MCU连接若干个传感器和/或控制若干个电动元件;
所述主控MCU还用于采集与所述主控MCU连接的传感器的传感器信号,当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的电动元件下达执行指令。
所述从控MCU还用于根据所述控制指令向与所述从控MCU相连的电动元件下达执行指令,向主控MCU获取到其余N-1个中任一个或多个从控MCU的传感器信号,所述N大于或等于2。
所述某一个从控MCU与其余N-1个中任一个或多个从控MCU之间通过信号转接板的预设的转接方式进行连接。
从以上技术方案可以看出,本发明实施例具有以下优点:
本发明实施例中,N个从控MCU采集各自连接的传感器的传感器信号;N个从控MCU将所述传感器信号通过信号转接板反馈至主控MCU;当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU 下达控制指令;所述传感器信号、控制指令均通过所述信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。在本发明实施例中,由于主控MCU与从控MCU之间通过SP信号的方式实现非通信交互,因此可以做到主控MCU与从控MCU之间的实时交互,降低了冗余信息交互,提高通信效率,可以适用于实时快速响应的场合。
附图说明
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:
图1为本发明实施例中主从信息实时交互方法一个实施例流程图;
图2为本发明实施例中主从信息实时交互方法另一个实施例流程图;
图3为本发明实施例中主从信息实时交互方法一个实施例示意图;
图4为本发明实施例中主从信息实时交互方法中关于SP信号的一个实施例结构示意图;
图5为本发明实施例中主从信息实时交互方法中关于从控MCU的ID分配的一个实施例示意图;
图6为本发明实施例中主从信息实时交互方法的一个实施例结构示意图;
图7为本发明实施例中主从信息实时交互系统一个实施例示意图。
具体实施方式
本发明实施例提供了主从信息实时交互方法以及系统,用于降低了冗余信息交互,提高通信效率,可以适用于实时快速响应的场合。
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
请参阅图1,本发明实施例中主从信息实时交互方法一个实施例包括:
101、N个从控MCU采集各自连接的传感器的传感器信号;
N个从控MCU各自下带一个或若干个传感器,N个从控MCU采集各自连接的传感器的传感器信号。
102、N个从控MCU将该传感器信号通过信号转接板反馈至主控MCU;
该N个从控MCU获得对应的传感器信号后,将该传感器信号通过信号转接板反馈至主控MCU上。
103、主控MCU判断该传感器信号是否满足预置条件,若是,则执行104,若否,则继续等待;
该主控MCU获得该传感器信号后,主控MCU判断该传感器信号是否满足预置条件,若是,则执行104,若否,则继续等待。
104、主控MCU根据该预置条件向相应的从控MCU下达控制指令。
当主控MCU判断该传感器信号满足预置条件时,主控MCU根据该预置条件向相应的从控MCU下达控制指令。
需要说明的是,该传感器信号、控制指令均通过该信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。
本实施例中,N个从控MCU采集各自连接的传感器的传感器信号;N个从控MCU将该传感器信号通过信号转接板反馈至主控MCU;当该传感器信号满足预置条件时,主控MCU根据该预置条件向相应的从控MCU下达控制指令;该传感器信号、控制指令均通过该信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。在本实施例中,由于主控MCU与从控MCU之间通过SP信号的方式实现非通信交互,因此可以做到主控MCU与从控MCU之间的实时交互,降低了冗余信息交互,提高通信效率,可以适用于实时快速响应的场合。
为便于理解,下面对本发明实施例中的主从信息实时交互方法进行详细描述,请参阅图2,本发明实施例中主从信息实时交互方法另一个实施例包括:
201、N个从控MCU采集各自连接的传感器的传感器信号;
N个从控MCU各自下带一个或若干个传感器,N个从控MCU采集各自连接的传感器的传感器信号。
202、该主控MCU采集与该主控MCU连接的传感器的传感器信号;
该主控MCU也可以下带有一个或若干个传感器,并采集与之相连接的传 感器的传感器信号。可以理解的是,这些传感器的传感器信号直接被该主控MCU获得。
203、N个从控MCU将该传感器信号通过信号转接板反馈至主控MCU;
该N个从控MCU获得对应的传感器信号后,将该传感器信号通过信号转接板反馈至主控MCU上。可以理解的是,该信号转接板可以不带任何CPU或者MCU,只负责转接信号的功能,该传感器信号可以通过该信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。该SP信号可以是电平信号,具有快速、传输简单的特点。
204、该主控MCU将该传感器信号进行分析处理,得出分析结果;
主控MCU在获得传感器信号后,先对传感器信号进行分析处理,并得出分析结果。可以理解的是,该分析结果适用于主控MCU对各个传感器状态的判断,以便主控MCU对相应的情况进行相应的处理,此处不作限定。
205、主控MCU判断该分析结果是否满足预置条件,若是,则执行206,若否,则继续等待;
该主控MCU获得该分析结果后,主控MCU判断该分析结果是否满足预置条件,若是,则执行206,若否,则继续等待。可以理解的是,该预置条件可以根据实际使用的需要进行具体的设定。
206、主控MCU根据预置条件确定执行相关指令的电动元件的位置,若该电动元件在主控MCU下,则执行207,若该电动元件在某一从控MCU下,则执行208;
在该分析结果满足预置条件之后,主控MCU需要确定该让哪一个或者哪些电动元件执行操作,并确定这些需要执行操作的电动元件的位置,从而将相关指令发送下去。若该电动元件在主控MCU下,则执行207,若该电动元件在某一从控MCU下,则执行208。
207、主控MCU向相应的电动元件下达执行指令;
当相应的电动元件在主控MCU下时,主控MCU向相应的电动元件下达执行指令。
208、主控MCU向相应的从控MCU下达控制指令;
当相应的电动元件在从控MCU下时,主控MCU向相应的从控MCU下 达控制指令。可以理解的是,该控制指令可以要求从控MCU对其下的相应的电动元件下达执行指令。
209、从控MCU根据该控制指令向与该从控MCU相连的电动元件下达执行指令;
该从控MCU接收到该控制指令后,从控MCU根据该控制指令向与该从控MCU相连的电动元件下达执行指令。可以理解的是,从控MCU可以将该执行指令下达至该从控MCU下面的每一个电动元件,也可以根据控制指令,将该执行指令下达至相关的电动元件,不相关的电动元件则不需要下达。
210、该电动元件根据该执行指令进行相关操作。
不论是在主控MCU下的电动元件,还是在N个从控MCU下的电动元件,当电动元件接收到执行指令后,该电动元件就根据该执行指令进行相关操作。
需要说明的是,上述中该传感器信号、控制指令均通过该信号转接板以SP信号的方式在主控MCU和从控MCU之间传输,以保持主控MCU和从控MCU之间的实时交互。
需要说明的是,该从控MCU可以向主控MCU获取到其余N-1个中任一个或多个从控MCU的传感器信号,该信号转接板将该从控MCU采集的传感器信号通过预设的转接方式可以直接传输到其余N-1个中任一个或多个从控MCU中,该N大于或等于2。因此,该其余N-1个中任一个或多个从控MCU接收到该传感器信号后,可以根据该传感器信号控制相应的电动元件执行操作。此过程实现了从控MCU相互之间的信号共享,无需主控MCU的参与,使得某些特殊的传感器和/或电动元件之间实现更快速的响应。
可以知道的是,主控MCU实时监测传感器方式通过主控MCU定时器实时采集,从控MCU上的传感器的传感器信号由从控MCU进行采集。SP信号及传感器信号传输延时及钞票坐标定位延时只受限于主控MCU和从控MCU的指令速度及配置定时器扫描信号的时间。对于需要传感器信号触发实时性要求很高的控制场合,该方法能够有效的减少通信交互的次数,同时避免及时控制的通信延时,效率较高。
本实施例中,N个从控MCU采集各自连接的传感器的传感器信号;N个从控MCU将该传感器信号通过信号转接板反馈至主控MCU;该主控MCU将 该传感器信号进行分析处理,得出分析结果;当该分析结果满足预置条件时,主控MCU根据该预置条件向相应的从控MCU下达控制指令;该传感器信号、控制指令均通过该信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。在本实施例中,由于主控MCU与从控MCU之间通过SP信号的方式实现非通信交互,因此可以做到主控MCU与从控MCU之间的实时交互,降低了冗余信息交互,提高通信效率,可以适用于实时快速响应的场合。
为便于理解,根据图2所描述的实施例,下面以一个实际应用场景对本发明实施例中的主从信息实时交互方法进行描述,请参阅图3:
传感器类型:
A类传感器为主控MCU、多个从控MCU需要实时监测的特殊传感器,A类传感器从从控MCU经过转接滤波后作为输出信号到其它从控MCU和主控MCU;
B类传感器为从控MCU之间需要相互传递信号的传感器。通过转接滤波后输出给其它从控MCU,B类传感器的输入输出方式为:单点输入、多点输出;
C类传感器为主控MCU和从控MCU各自独立监控的传感器,其他MCU不需要实时检测。
在本实施例中,主控MCU与四个从控MCU具体的交互过程为:
a:主控MCU检测主控区域C类传感器和从控MCU区域的A类传感器,四个从控MCU实时监测扫描A类、B类及自身所在区域的C类传感器。
b:主控MCU的接口包括:通信交互接口、A类传感器信号实时传输接口、主从SP信号交互接口,该通信交互接口用于主控MCU与从控MCU之间无需实时交互的部分信号的传输。
c:从控MCU负责上电后对各自区域的A类、B类、C类传感器供电及初始化过程,并对部分传感器的光源强弱的自主调试、功能自检等,无需主控MCU的干预。
d:在信号转接板L中,没有任何CPU,只负责对输入信号的滤波、整形和逻辑输出。
e:所有A类、B类传感器的传感器信号都需要经过信号转接板L的转接 处理。A类传感器的传感器信号通过信号转接板L滤波、整形后,传输给其余所有的从控MCU和主控MCU;B类传感器的传感器信号通过信号转接板L滤波、整形后,传输给其余所有的从控MCU。所有的MCU在接收到传感器信号后,均需要判断传感器信号是否满足预置在该MCU上的预置条件,若满足,则执行步骤g;若不满足,则无需理会。
f:对于C类传感器,仅需从控MCU4对其进行监测,若该C类传感器的传感器信号满足从控MCU4上的预置条件,则执行步骤g;若不满足,则无需理会。
g:检测到传感器信号满足预置条件的MCU根据预置条件向对应的电动元件发送执行指令,若该电动元件在该MCU所在区域内,则该MCU之间发送执行指令至电动元件;若该电动元件不在该MCU所在区域内,则该MCU发送控制指令至该电动元件所在区域对应的MCU上,由对应的MCU发送执行指令至该电动元件。举例说明为:假设MCU2检测到MCU4上A类传感器的传感器信号满足MCU2上的预置条件,该预置条件设定需要MCU1中的某一个电动元件执行操作,则MCU2向MCU1发送控制指令,MCU1接收到控制指令后,MCU1向该电动元件发送执行指令,使得该电动元件执行相应操作。这里所说的控制指令、传感器信号均以SP信号的方式进行传输。
h:从控MCU之间无需任何的通信交互,对于某些主控MCU与从控MCU实时性不强,响应时间要求不高,信息量交互较多的情况,可以采用普通的通信方式,例如采用CAN标准通信,实现主控MCU和多个从控MCU的总线通信,减少通信线缆连接。实时性很强的A类、B类传感器信号,采用单点输入、多点输出的方式,同时配合主控MCU的SP信号完成对从控MCU的一些实时性很高,动作时序较复杂的电动元件的实时控制。
从前文可以理解的是,SP信号对于主控MCU与从控MCU之间的实时交互有重要的作用,为便于对SP信号有更深入的理解,下面对SP信号的产生和使用进行详细的描述,请参阅图4,本发明实施例中SP信号的一个实施例包括:
SP信号为双向信号,采用NPN三极管集电极上拉输出,此处SP信号经过长线传输可以增加一个对SP信号的整形滤波,通常可以用反向器或者缓冲 IC器件,目的在于保护从控MCU。SP信号占用从控MCU的两个IO口,其中GPIO3为SP信号的控制口,正常情况下位低电平输出,当从控MCU对主控MCU某些特殊指令执行出现异常时,从控MCU主动将SP信号拉低,以反馈从控MCU执行指令的快速响应状态。主控MCU上的GPIO6为从控MCU的输入口,从控MCU采用实时扫描SP信号的状态,跟进SP信号的有效约定,执行一系列的动作。
上面主要对SP信号的产生和使用进行了详细描述,下面将对SP信号如何为从控MCU分配地址(简称:ID)进行详细描述,请参阅图5:
本实施例中ID分配的过程为:上电后,主控MCU利用SP信号及CAN总线通信协议,首先发出广播通信,各个相对独立的从控MCU接收到该广播通信后进入中断接收状态,同时检测主控MCU发出的SP信号,若该SP信号电平有效(通常约定高电平为有效信号),从控MCU则接收CAN总线发送过来的数据,该数据包含从控MCU的通信标识,从控MCU可以将广播通信的地址擦除。如果有四个从控MCU那么主控MCU将发送四次广播通信,分别将四个从控MCU标识为MCU1、MCU2、MCU3、MCU4,通过SP信号的物理信号区分从控MCU的地址ID。
当从控MCU出现异常或从控MCU内部状态还未准备好进行通信交互时,从控MCU可以主动将SP信号的状态改变,此时主控MCU可以检测到从控MCU状态异常,并停止发送广播通信,因此该ID分配的过程具有高效的信息交互实时性。
由本实施例可知,SP信号分配从控MCU的ID时,不需要通过硬件地址识别各个从控MCU,可通过SP信号直接对各个从控MCU进行广播通信进行分配ID,每次系统初始化或者MCU重新上电连接后进行ID分配,分配ID后主控MCU能够区分从控制MCU,给其标记上MCU1、MCU2、MCU3、MCU4等,通过软件方式完成硬件地址的识别。并且,分配ID后可实现主控MCU与从控MCU正常的CAN总线通信,保持正常的通信链路。
为便于理解,下面将从一个具体应用场景对本发明实施例中主从信息实时交互方法进行详细说明,请参阅图6,本发明实施例中主从信息实时交互方法一个实施例包括:
对介质进入存储区时实现实时控制:实现主控MCU对从控MCU电动元件的触发及控制:
图示说明:存储区域1;存储区域2;存储区域3;存储区域4;
黑色箭头表示介质运动方向;
从控MCU:MCU1、MCU2、MCU3、MCU4,主控MCU不在图6中标示出来;
MCU1、MCU2、MCU3、MCU4与主控MCU之间的SP信号分别为SP1、SP2、SP3、SP4;
动力步进电机5,由从控MCU3控制;
存储区域2中的双向换向块(旋转电磁铁)S2;
存储区域3中的双向换向块(旋转电磁铁)S3;
A类传感器6(机械安装位置从属于信号转接板L区域,主控MCU、MCU1、MCU2实时共享);
A类传感器7(机械安装位置从属于MCU2的控制区域,即存储区域2,主控MCU、MCU1、MCU2、MCU3实时共享);
A类传感器9(机械安装位置从属于MCU3的控制区域,即存储区域3,主控MCU、MCU3实时共享);
B类传感器8(机械安装位置从属于MCU3的控制区域,即存储区域3,MCU3、MCU4实时共享);
C类传感器10(机械安装位置从属于MCU3的控制区域,即存储区域3,MCU3实时扫描);
N1、N2、N3为需要存储的介质。
仅以介质进入存储区域3中的情况进行说明:
假如多张介质传输到位置1、位置2、位置3时候,分布如图6中的N1、N2、N3所在的位置,主控MCU希望薄片类介质N3经过双向换向块S3以便能进入存储区域3;介质N2经过双向换向块S2以便能够进入存储区2;以控制N3进入存储区域3为说明。A类传感器7距离存储区域3较近,假如受控于机械设计及距离限制,A类传感器7距离S3的距离s为50mm,当介质N3在通道的速度v为1.2m/s时,需要的时间t=s/v=41.67ms。为了能够保证介质 N3能够顺利进入存储区域3及减少N3在两处通道连接处的速度差,在N3到达S3前,动力步进电机5的速度需要接近1.2m/s(2000PPS),由于动力步进电机5的本身步进控制特性,启动需要一个从低速到达高速的过程,从静止启动到达2000PPS速度时,启动需要的时间远大于41ms,因此动力步进电机5的触发信号不能使用A类传感器7,而且介质N3进入存储区域的选择由主控MCU所决定。控制步骤为:
步骤a:首先主控MCU实时检测所有区域的C类传感器及A类传感器,主控MCU决定介质N3需要进入存储区域3;
步骤b:介质N3在触发A类传感器之前满足条件(如介质的宽度、斜度),利用A类传感器6检测到介质N3触发信号,主控MCU发送SP3信号有效;
步骤c:MCU3检测到SP3信号有效立即启动执行动力步进电机5(以满足电机启动速度要求);
步骤d:当介质N3触发A类传感器7时候,判断SP3信号是否还有效以及B类传感器8有无介质(此处是为了满足介质传输的安全间距),同时满足SP3有效且B类传感器没有介质,MCU3打开双向换向块S3;
步骤e:介质N3进入S3后,MCU3实时检测存储区域1、存储区域2、存储区域3、存储区域4中的A类及C类传感器信号是否异常,若异常则主动关闭动力步进电机5;
步骤f:当介质N3触发离开A类传感器9,主控MCU关闭SP3信号,MCU3检测SP3信号无效时主动关闭动力步进电机5、双向换向块S3;
步骤g:若MCU3在介质N3触发C类传感器10时SP3信号依然有效时,MCU3主动关闭动力步进电机5、双向换向块S3,并主动上报错误,保证其安全可控性稳定性。
利用本实施例中的A类传感器及主控MCU对SP信号的实时控制,可有效解决电动元件启动时间较长的问题,可达到提前或实时触发的效果,且控制稳定以及可操作性强。
从本实施例可以知道,实时启动和及时关闭电机特别适合用于介质存储在卷带中的存储方式,该控制方式通过对从控MCU的电动元件即时控制,能够有效节省存储区卷带体积,增加存储容量,同时控制的可行性较强。从控制启 动电动元件方式受控于主控MCU发出的SP信号,从控MCU主动关闭电动元件既取决于主控MCU的SP信号也受控于从控MCU的主动判断。利用A类、B类、C类传感器及SP信号,主控MCU能够实时触发从控MCU的电动元件的开关,无需通过通信方式触发,稳定性较高,抗干扰强,既能做到提前出发及快速启动,又能做到当从控MCU出现异常时候,从控MCU获得对电动元件的主动控制权,保证其安全稳定性。
上面主要对主从信息实时交互方法进行了详细描述,下面将对主从信息实时交互系统进行详细描述,请参阅图7,本发明实施例中主从信息实时交互系统一个实施例包括:
主控MCU701以及N个从控MCU702;
该从控MCU702连接若干个传感器703和/或控制若干个电动元件704;
该主控MCU701与该N个从控MCU702之间通过信号转接板705进行线路连接;
该主控MCU701,用于当获得的传感器信号满足预置条件时,主控MCU701根据该预置条件向相应的从控MCU702下达控制指令;
该从控MCU702,用于采集各自连接的传感器703的传感器信号,将该传感器信号通过信号转接板705反馈至主控MCU701;
该传感器信号、控制指令均通过该信号转接板705以SP信号的方式在主控MCU701和从控MCU702之间传输。
需要说明的是,
该主控MCU701可以连接若干个传感器703和/或控制若干个电动元件704;
该主控MCU701还可以用于采集与该主控MCU701连接的传感器703的传感器信号,当该传感器信号满足预置条件时,主控MCU701根据该预置条件向相应的电动元件704下达执行指令。
该从控MCU702还可以用于根据该控制指令向与该从控MCU702相连的电动元件704下达执行指令,向主控MCU701获取到其余N-1个中任一个或多个从控MCU702的传感器信号,该N大于或等于2。
该某一个从控MCU702与其余N-1个中任一个或多个从控MCU702之间 可以通过信号转接板705的预设的转接方式进行连接。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽 管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种主从信息实时交互方法,其特征在于,包括:
    N个从控MCU采集各自连接的传感器的传感器信号;
    N个从控MCU将所述传感器信号通过信号转接板反馈至主控MCU;
    当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令;
    所述传感器信号、控制指令均通过所述信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    所述主控MCU采集与所述主控MCU连接的传感器的传感器信号。
  3. 根据权利要求1所述的方法,其特征在于,当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令具体包括:
    所述主控MCU将所述传感器信号进行分析处理,得出分析结果;
    当所述分析结果满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的电动元件下达执行指令,所述电动元件与主控MCU相连接。
  5. 根据权利要求1或3所述的方法,其特征在于,主控MCU根据所述预置条件向相应的从控MCU下达控制指令之后还包括:
    从控MCU根据所述控制指令向与所述从控MCU相连的电动元件下达执行指令;
    所述电动元件根据所述执行指令进行相关操作。
  6. 根据权利要求1所述的方法,其特征在于,还包括:
    所述从控MCU向主控MCU获取到其余N-1个中任一个或多个从控MCU的传感器信号,所述N大于或等于2。
  7. 根据权利要求1所述的方法,其特征在于,还包括:
    所述信号转接板将所述从控MCU采集的传感器信号通过预设的转接方式 直接传输到其余N-1个中任一个或多个从控MCU中,所述N大于或等于2。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    所述其余N-1个中任一个或多个从控MCU接收到所述传感器信号后,根据所述传感器信号控制相应的电动元件执行操作。
  9. 一种主从信息实时交互系统,其特征在于,包括:
    主控MCU以及N个从控MCU;
    所述从控MCU连接若干个传感器和/或控制若干个电动元件;
    所述主控MCU与所述N个从控MCU之间通过信号转接板进行线路连接;
    所述主控MCU,用于当获得的传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的从控MCU下达控制指令;
    所述从控MCU,用于采集各自连接的传感器的传感器信号,将所述传感器信号通过信号转接板反馈至主控MCU;
    所述传感器信号、控制指令均通过所述信号转接板以SP信号的方式在主控MCU和从控MCU之间传输。
  10. 根据权利要求9所述的主从信息实时交互系统,其特征在于,
    所述主控MCU连接若干个传感器和/或控制若干个电动元件;
    所述主控MCU还用于采集与所述主控MCU连接的传感器的传感器信号,当所述传感器信号满足预置条件时,主控MCU根据所述预置条件向相应的电动元件下达执行指令。
    所述从控MCU还用于根据所述控制指令向与所述从控MCU相连的电动元件下达执行指令,向主控MCU获取到其余N-1个中任一个或多个从控MCU的传感器信号,所述N大于或等于2。
    所述某一个从控MCU与其余N-1个中任一个或多个从控MCU之间通过信号转接板的预设的转接方式进行连接。
PCT/CN2014/088181 2014-01-26 2014-10-09 主从信息实时交互方法以及系统 WO2015109871A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP14879888.7A EP3098678B1 (en) 2014-01-26 2014-10-09 Method and system for interacting master and slave information in real time
AU2014378796A AU2014378796B2 (en) 2014-01-26 2014-10-09 Method and system for interacting master and slave information in real time
US15/104,344 US9823650B2 (en) 2014-01-26 2014-10-09 Method and system for interacting master and slave information in real time

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410039040.7 2014-01-26
CN201410039040.7A CN103777613B (zh) 2014-01-26 2014-01-26 主从信息实时交互方法以及系统

Publications (1)

Publication Number Publication Date
WO2015109871A1 true WO2015109871A1 (zh) 2015-07-30

Family

ID=50569988

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088181 WO2015109871A1 (zh) 2014-01-26 2014-10-09 主从信息实时交互方法以及系统

Country Status (6)

Country Link
US (1) US9823650B2 (zh)
EP (1) EP3098678B1 (zh)
CN (1) CN103777613B (zh)
AU (1) AU2014378796B2 (zh)
CL (1) CL2016001482A1 (zh)
WO (1) WO2015109871A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716423A (zh) * 2019-11-18 2020-01-21 南京科远智慧科技集团股份有限公司 一种应用于三重冗余超速保护装置的自动巡检方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777613B (zh) * 2014-01-26 2016-08-24 广州广电运通金融电子股份有限公司 主从信息实时交互方法以及系统
SG10201408352XA (en) * 2014-12-15 2016-07-28 Iia Technologies Pte Ltd A system of monitoring and controlling the operation of multiple machines for producing diamonds and a method thereof
CN104571041B (zh) * 2014-12-31 2017-06-09 重庆川仪自动化股份有限公司 基于1:1控制器冗余的数据同步方法
CN105427564A (zh) * 2015-12-01 2016-03-23 深圳市福云明网络科技有限公司 基于无线wifi克隆模式的户外拍摄系统及方法
JP6380432B2 (ja) * 2016-03-14 2018-08-29 オムロン株式会社 モータ制御システム、モータ制御装置、プログラムおよび記録媒体
CN106444713B (zh) * 2016-10-20 2019-06-18 北京精密机电控制设备研究所 一种基于双冗余can总线通信的多智能单机伺服控制系统
TWI627852B (zh) * 2017-04-07 2018-06-21 宏正自動科技股份有限公司 訊號轉接裝置及訊號轉接方法
CN109901455B (zh) * 2017-12-11 2022-08-12 上海航空电器有限公司 一种基于arm&fpga技术的oled按键显示方法
CN111580383A (zh) * 2020-05-18 2020-08-25 湖南凌翔磁浮科技有限责任公司 一种用于磁浮模型车的控制系统及方法
CN112764366A (zh) * 2020-11-17 2021-05-07 宁波鑫海智造科技有限公司 一种档案柜档案夹识别控制电路
CN113126479A (zh) * 2021-03-23 2021-07-16 广东芬尼克兹节能设备有限公司 一种双主控板电路的协调控制方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080061924A1 (en) * 2006-08-02 2008-03-13 Maciej Labowicz Multiple lock security system for cargo trailers
CN101220605A (zh) * 2008-01-24 2008-07-16 王家辉 超高层建筑自动接力供水设备控制系统及控制方法
CN101304179A (zh) * 2008-07-10 2008-11-12 深圳市风发科技发展有限公司 一种风力发电机的控制方法、系统和装置
CN101543996A (zh) * 2008-03-24 2009-09-30 上海英集斯自动化技术有限公司 基于交互式c语言的多总线模块化机器人控制器
CN103777613A (zh) * 2014-01-26 2014-05-07 广州广电运通金融电子股份有限公司 主从信息实时交互方法以及系统

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19518445A1 (de) 1995-05-19 1996-11-21 Meissner & Wurst Reinraumanlage
DE10331873B4 (de) * 2003-07-14 2022-09-01 Robert Bosch Gmbh Verfahren zur Überwachung verteilter Software
US7606955B1 (en) * 2003-09-15 2009-10-20 National Semiconductor Corporation Single wire bus for connecting devices and methods of operating the same
JP2006295610A (ja) * 2005-04-12 2006-10-26 Canon Inc 画像形成装置
CN101404521B (zh) * 2008-11-07 2013-03-06 北京铱钵隆芯科技有限责任公司 主从式直流载波通信系统及其控制方法
CN201754239U (zh) * 2010-04-26 2011-03-02 江苏爱康太阳能科技股份有限公司 太阳能光伏发电跟踪系统集中监控系统
JP2012126546A (ja) * 2010-12-17 2012-07-05 Canon Inc 媒体搬送装置
CN102298345B (zh) * 2011-05-20 2013-06-19 深圳市骏普科技开发有限公司 一种m-bus总线的通讯方法
JP6004806B2 (ja) * 2012-07-23 2016-10-12 キヤノン株式会社 情報処理システム
GB2509124A (en) * 2012-12-21 2014-06-25 Nomad Spectrum Ltd Wireless access point and cellular network relay with secondary co-processor controlling power supplies and SIM cards
CN103257642B (zh) * 2013-04-28 2016-07-27 深圳市英威腾电气股份有限公司 变频器多机主从控制系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080061924A1 (en) * 2006-08-02 2008-03-13 Maciej Labowicz Multiple lock security system for cargo trailers
CN101220605A (zh) * 2008-01-24 2008-07-16 王家辉 超高层建筑自动接力供水设备控制系统及控制方法
CN101543996A (zh) * 2008-03-24 2009-09-30 上海英集斯自动化技术有限公司 基于交互式c语言的多总线模块化机器人控制器
CN101304179A (zh) * 2008-07-10 2008-11-12 深圳市风发科技发展有限公司 一种风力发电机的控制方法、系统和装置
CN103777613A (zh) * 2014-01-26 2014-05-07 广州广电运通金融电子股份有限公司 主从信息实时交互方法以及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716423A (zh) * 2019-11-18 2020-01-21 南京科远智慧科技集团股份有限公司 一种应用于三重冗余超速保护装置的自动巡检方法
CN110716423B (zh) * 2019-11-18 2021-08-31 南京科远智慧科技集团股份有限公司 一种应用于三重冗余超速保护装置的自动巡检方法

Also Published As

Publication number Publication date
EP3098678A1 (en) 2016-11-30
CN103777613B (zh) 2016-08-24
US9823650B2 (en) 2017-11-21
CL2016001482A1 (es) 2016-11-11
EP3098678B1 (en) 2019-10-02
AU2014378796A1 (en) 2016-06-09
EP3098678A4 (en) 2017-07-26
US20160313727A1 (en) 2016-10-27
CN103777613A (zh) 2014-05-07
AU2014378796B2 (en) 2017-04-13

Similar Documents

Publication Publication Date Title
WO2015109871A1 (zh) 主从信息实时交互方法以及系统
US8156253B2 (en) Computer system, device sharing method, and device sharing program
CN104111881B (zh) 一种用于双机冗余热备份计算机的仲裁装置
CN103092701B (zh) 一种通信方法、装置及电子设备
CN1491378A (zh) 在不中断加速图形接口处理的情况下进入及退出电源管理状态
CN101727156A (zh) 计算机的开机时序控制装置及其控制方法
TW201416870A (zh) 共用通用串列匯流排(usb)裝置之雙作業系統架構,以及雙作業系統架構共用通用串列匯流排(usb)裝置之方法
WO2018113531A1 (zh) 一种充电控制系统
US20180321725A1 (en) System events in universal serial bus (usb) devices
CN104199353A (zh) 一种冷备份与热备份组合的双主机指挥控制系统
CN101498963A (zh) 一种降低cpu功耗的方法和一种cpu、一种数字芯片
US20070055899A1 (en) Method for power management of central processor unit
US9026838B2 (en) Computer system, host-bus-adaptor control method, and program thereof
WO2015158161A1 (zh) 一种虚拟桌面的休眠控制方法、装置及系统
US20110202692A1 (en) Computer peripheral apparatus
CN106372019B (zh) 一种系统总线设备响应超时的处理方法及超时处理装置
CN112347017A (zh) Lpc总线接口的ps/2键盘双机外挂系统和切换方法
CN103560931A (zh) 基于fc交换机的监控方案切换方法
JP4906158B1 (ja) Kvm切替器、および切替時のusb入力装置接続維持方法
CN107402898B (zh) 一种信息处理的方法及电子设备
CN104699544B (zh) 一种多余度计算机系统bit测试的通讯方法
CN101859291B (zh) 多单片机协同工作方法及多单片机协同工作系统
CN103309427A (zh) 一种计算机及其屏幕保护系统
CN108933906B (zh) 高清视频矩阵输入/输出子卡的管理系统及其管理方法
US20120260013A1 (en) KVM switcher (Multi-computer switcher) with integrated parallel transmission, serial peripheral interface and universal serial bus

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: 14879888

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014879888

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014879888

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2014378796

Country of ref document: AU

Date of ref document: 20141009

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15104344

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE