CN111245697A - Communication method and system of parallel bus, master station and slave station - Google Patents

Communication method and system of parallel bus, master station and slave station Download PDF

Info

Publication number
CN111245697A
CN111245697A CN202010014447.XA CN202010014447A CN111245697A CN 111245697 A CN111245697 A CN 111245697A CN 202010014447 A CN202010014447 A CN 202010014447A CN 111245697 A CN111245697 A CN 111245697A
Authority
CN
China
Prior art keywords
signal
station
event
master station
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010014447.XA
Other languages
Chinese (zh)
Other versions
CN111245697B (en
Inventor
梅源源
姜仲文
安燕
任杰锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen V&t Technologies Co ltd
Original Assignee
Shenzhen V&t Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen V&t Technologies Co ltd filed Critical Shenzhen V&t Technologies Co ltd
Priority to CN202010014447.XA priority Critical patent/CN111245697B/en
Publication of CN111245697A publication Critical patent/CN111245697A/en
Application granted granted Critical
Publication of CN111245697B publication Critical patent/CN111245697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40019Details regarding a bus master

Landscapes

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

Abstract

The invention is suitable for the technical field of communication, and provides a communication method and a communication system of a parallel bus, a master station and a slave station. When all the slave stations are scanned, firstly, verification signals corresponding to the slave stations are sent to the slave stations, after the slave stations receive the verification signals, waiting time is obtained according to the verification signals, request signals and event signals are sent to the master station after the waiting time, the master station scans the slave stations one by one according to the number of the slave stations, event information of the slave stations is extracted according to the event signals, finally, second mode switching instructions are sent to the slave stations, and all the event information is fed back in sequence. The stations needing to send data are searched in a concurrent bus communication mode, the states of all the stations are collected in real time, the stations do not need to be inquired one by one, a large amount of time is saved, and the data collection efficiency is improved.

Description

Communication method and system of parallel bus, master station and slave station
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a communication method and a communication system of a parallel bus, a master station and a slave station.
Background
In recent years, along with the progress of times, finance is soaring, high-rise buildings are like bamboo shoots in spring after rain, elevators are an indispensable part for people or goods transported in the high-rise buildings, and the application range of the elevators is wider and wider. An elevator hall call system, which is one of indispensable components in an elevator system, is increasingly used. The elevator outbound system is used as a very important core subsystem in the elevator system, plays the role of an intermediate medium between an elevator and passengers, and the performance of the elevator outbound system is directly related to whether the running condition of the whole elevator system is good or not and the passenger experience of taking the elevator.
At present, the serial communication in the elevator mostly adopts the RS-485 standard, the communication protocol is simple, the price is low, and the real multipoint two-way communication can be realized. The mode is convenient to wire, only two shielding cables are needed, the communication distance is far from the maximum and can support 1500m, the repeater can also prolong the communication distance, and the combination of the balanced driver and the differential receiver is adopted, so that the common-mode interference resistance is enhanced, namely the noise interference resistance is good. However, the communication speed cannot be too fast, and the data of each slave station is generally acquired by adopting a master-slave calling mode, namely, the master station calls each slave station in sequence, the called single slave station can upload the data, other slave stations are in a waiting state, the right of use of the bus is completely distributed by the master station, and each slave station cannot freely occupy the bus. If the system has a plurality of sites, the time for the master station to circularly collect the information for one week is very long, and the information of the slave station cannot be timely sent to the master station when changing, so that the reaction processing speed of the system to the mutation event is low.
Therefore, the slave station information in the traditional elevator outbound system can not be sent to the master station in time when changing, so that the reaction processing speed of the system to the mutation event is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a communication method and system for a parallel bus, a master station, and a slave station, so as to solve the problem in the prior art that when information of a slave station in an elevator outbound system changes, the information cannot be sent to the master station in time, which results in a slow response processing speed of the system to a mutation event.
A first aspect of an embodiment of the present invention provides a parallel bus communication method, where the parallel bus communication method includes:
sending a first mode switching instruction to each slave station, and after preset time, respectively sending verification signals corresponding to each slave station;
setting a first slave station as a target slave station;
receiving a request signal and an event signal sent by the target slave station; the event signal carries event information;
updating target slave stations in sequence according to the number of the slave stations, and returning to the step of receiving the request signals sent by the target slave stations;
and sending a second mode switching instruction to each slave station, and sequentially carrying out feedback processing on all event information.
A second aspect of the embodiments of the present invention provides a parallel bus communication method, where the parallel bus communication method includes:
receiving a first mode switching instruction sent by a master station, and setting a communication mode to be a concurrent bus communication mode according to the first mode switching instruction;
and receiving the verification signal sent by the master station, acquiring waiting time according to the verification signal, and sending a request signal and an event signal to the master station after the waiting time.
A third aspect of an embodiment of the present invention provides a master station, including:
the first signal module is used for sending a first mode switching instruction to each slave station, and respectively sending verification signals corresponding to each slave station after preset time;
the setting module is used for setting the first slave station as a target slave station;
the signal acquisition module is used for receiving a request signal and an event signal sent by the target slave station; the event signal carries event information;
the updating module is used for sequentially updating the target slave stations according to the number of the slave stations and returning to the step of receiving the request signals sent by the target slave stations;
and the processing module is used for sending a second mode switching instruction to each slave station and sequentially carrying out feedback processing on all the event information.
A fourth aspect of an embodiment of the present invention provides a parallel slave station, including:
the communication mode conversion module is used for receiving a first mode switching instruction sent by a master station and setting a communication mode into a concurrent bus communication mode according to the first mode switching instruction;
and the verification module is used for receiving the verification signal sent by the master station, acquiring the waiting time according to the verification signal, and sending a request signal and an event signal to the master station after the waiting time.
A fifth aspect of an embodiment of the present invention provides a master station, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the communication method of the parallel bus when executing the computer program.
A sixth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the communication method of the parallel bus described above.
A seventh aspect of the embodiments of the present invention provides a communication system of a parallel bus, including the master station and the slave station.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the communication method of the parallel bus comprises the steps of firstly sending a first mode switching instruction to each slave station, and respectively sending verification signals corresponding to each slave station after preset time; setting a first slave station as a target slave station; receiving a request signal and an event signal sent by the target slave station; the event signal carries event information; updating target slave stations in sequence according to the number of the slave stations, and returning to the step of receiving the request signals sent by the target slave stations; and sending a second mode switching instruction to each slave station, and sequentially carrying out feedback processing on all event information. When all the slave stations are scanned, the verification signals corresponding to the slave stations are sent to the slave stations firstly, after the slave stations receive the verification signals, the slave stations send request signals and event signals to the master station one by one, the master station scans the slave stations one by one according to the number of the slave stations, extracts event information of the slave stations according to the obtained event signals, and finally sends second mode switching instructions to the slave stations and feeds back all the event information in sequence. The stations needing to send data are searched in a concurrent bus communication mode, the states of all the stations are collected in real time, the stations do not need to be inquired one by one, a large amount of time is saved, and the data collection efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of an implementation of a communication method of a parallel bus according to an embodiment of the present invention;
FIG. 7 is a block diagram of a Master station according to an embodiment of the present invention;
FIG. 8 is a block diagram of a signal acquisition module according to an embodiment of the present invention;
FIG. 9 is a block diagram of a signal acquisition module according to an embodiment of the present invention;
fig. 10 is a block diagram of a secondary station provided by an embodiment of the present invention;
FIG. 11 is a block diagram of a verification module provided by an embodiment of the present invention;
fig. 12 is a block diagram of a signal transmitting unit according to an embodiment of the present invention;
fig. 13 is a schematic block diagram of a master station according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover non-exclusive inclusions. For example, a process, method, or system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used to distinguish between different objects and are not used to describe a particular order.
As shown in fig. 1, an embodiment of the present invention provides a parallel bus communication method, where the parallel bus communication method includes:
in step S110, a first mode switching instruction is sent to the slave station, and after a preset time, an authentication signal corresponding to each slave station is sent to each slave station.
In step S120, the first slave station is set as the target slave station.
In this embodiment, the number of the slave stations communicating with the master station is plural, the master station communicates with the plural slave stations through the parallel bus, the master station needs to scan and query all the slave stations in real time, and when scanning all the slave stations, all the slave stations need to be scanned one by one. In practical application, the master station scans the call signals of a plurality of elevator floors to determine whether the elevator floors have the call signals, so that the call signals of the elevator floors of the first floor need to be scanned and acquired first, and the elevator floors of the first floor are scanned to the elevator floors of the last floor in the same manner, so that all the elevator floors are scanned in one period, and the call signals of all the elevator floors in the current period are acquired.
Specifically, the master station transmits a first mode switching instruction to all the slave stations to change the communication modes of all the slave stations to the concurrent bus communication mode, after a preset time, the communication modes of all the slave stations are switched, the master station transmits the verification signals corresponding to the slave stations to all the slave stations, and at this time, the slave stations are in a receiving state and receive the verification signals transmitted by the master station. Specifically, the verification signal is a plurality of continuous low-level signals for verifying the address of the slave station.
In step S130, receiving a request signal and an event signal transmitted by the target slave station; the event signal carries event information.
In this embodiment, after receiving the verification signal and completing the verification, the target slave station transmits a request signal and an event signal to the master station, where the event signal carries event information. Meanwhile, the master station receives the request signal and the event signal sent by the target slave station, so that the event information of the target slave station is obtained for subsequent processing. Taking the elevator call system as an example, the event information refers to an upstairs request or a downstairs request from the floor where the destination station is located, and in other embodiments, the event information varies depending on the actual application.
In step S140, the target slave station is sequentially updated according to the number of slave stations, and the process returns to step S130.
In this embodiment, the number of the slave stations is plural, and the master station scans all the slave stations in sequence from the first to the last. Specifically, first, the first slave station is used as a target slave station, the master station receives a request signal and an event signal transmitted by the first slave station to acquire event information of the first slave station, and after the first slave station finishes scanning, the second slave station is used as a target slave station, the master station receives a request signal and an event signal transmitted by the second slave station to acquire event information of the second slave station, and accordingly, the master station sequentially acquires event information of all the slave stations.
In step S150, a second mode switching command is transmitted to the slave station, and all the event information is sequentially subjected to feedback processing.
In this embodiment, after the master station finishes scanning all the slave stations and acquires the event information of each slave station, it needs to perform feedback processing on each event information, and at this time, the master station needs to send a second mode switching instruction to each slave station, restore the master station and the slave station to the 485 communication mode, and perform feedback processing on the acquired event information in the communication mode. When all the slave stations are scanned, verification signals corresponding to the slave stations are sent to the slave stations firstly, after the slave stations receive the verification signals, request signals and event signals are sent to the master station one by one, the master station scans the slave stations one by one according to the number of the slave stations, extracts event information of the slave stations according to the obtained event signals, sends second mode switching instructions to the slave stations, and feeds back all the event information in sequence. The stations needing to send data are searched in a concurrent bus communication mode, the states of all the stations are collected in real time, the stations do not need to be inquired one by one, a large amount of time is saved, and the data collection efficiency is improved.
In one embodiment, step S130 includes steps S131a through S133 a.
In step S131a, the request signal is sampled;
in step S132a, it is determined whether the sampled level is a low level;
in step S133a, if the level of the sample is determined to be low, event information is extracted from the event signal.
In this embodiment, the request signal is a level signal, and is used to indicate whether the event signal carries event information, and if the request signal is a high level, it indicates that the event signal does not carry event information, that is, no event occurs in the target slave station; if the request signal is in low level, the event signal is represented to carry event information, namely the target slave station has an event occurrence. When the master station receives a request signal and an event signal sent by a target slave station, the request signal is sampled first, whether the sampled level is low level or not is judged, and if yes, corresponding event information is extracted from the event signal according to the event signal; if not, namely the request signal is in high level, the event signal is an invalid signal which does not carry event information, and the event signal does not need to be processed.
In one embodiment, step S130 includes steps S131b through S133 b.
In step S131b, sampling the request signal a plurality of times at intervals of a preset time, and obtaining a plurality of level values of the plurality of times of sampling;
in step S132b, determining whether the number of low levels in the plurality of levels is greater than a preset value;
in step S133b, if it is determined that the number of the low levels among the plurality of levels is greater than the predetermined value, event information is extracted according to the event signal.
In this embodiment, the request signal is a level signal, and is used to indicate whether the event signal carries event information, and if the request signal is a high level, it indicates that the event signal does not carry event information, that is, no event occurs in the target slave station; if the request signal is in low level, the event signal is represented to carry event information, namely the target slave station has an event occurrence. In order to avoid the influence of interference on sampling, the request signal is sampled for multiple times, specifically, the request signal is sampled for multiple times at intervals of preset time, multiple sampled level values are obtained, and whether the number of low levels in the multiple levels is larger than a preset value or not is judged; and if so, extracting event information according to the event signal. In this embodiment, 3 sampling points of the request signal are sampled, if two or more low levels exist in the level values sampled and obtained by the 3 sampling points, it indicates that the event signal carries the event information, the master station extracts the event information according to the event signal, and if the low levels in the level values sampled and obtained by the 3 sampling points are less than two, it indicates that the event signal does not carry the event information.
As shown in fig. 4, an embodiment of the present invention provides a parallel bus communication method, where the parallel bus communication method includes:
in step S210, a first mode switching instruction sent by a master station is received, and a communication mode is set to a concurrent bus communication mode according to the first mode switching instruction;
in step S220, an authentication signal sent by the master station is received, a waiting time is obtained according to the authentication signal, and a request signal and an event signal are sent to the master station after the waiting time.
In this embodiment, the slave station receives a first mode switching instruction sent by the master station, and sets the communication mode to the concurrent bus communication mode according to the first mode switching instruction. At this moment, the slave station is in a receiving state, receives an authentication signal sent by the master station, wherein the authentication signal is a level signal comprising a plurality of falling edges, the number of the falling edges in the authentication signal corresponds to the address of the target slave station, the slave station authenticates the address of the slave station through the authentication signal, meanwhile, the waiting time is obtained according to the authentication signal, and a request signal and an event signal are sent to the master station after the waiting time, so that the event information of the target slave station is sent to the master station, and the event scanning of the target slave station is completed.
In one embodiment, step S220 includes step S221 and step S223.
In step S221, receiving an authentication signal transmitted by the master station;
in step S222, the number of falling edges of the verification signal is acquired;
in step S223, if the number is the same as the preset number, obtaining a waiting time according to the verification signal; transmitting a request signal and an event signal to the master station after the waiting time.
In this embodiment, the verifying the verification signal by the slave station specifically includes receiving the verification signal sent by the master station, performing detection analysis on the verification signal, obtaining the number of falling edges in the verification signal, if the number of the falling edges is the same as the preset number, verifying the address of the target slave station correctly, obtaining, by the slave station, a waiting time according to the obtained verification signal, and sending a request signal and an event signal to the master station after the waiting time. The waiting time is the time between the reception of the verification signal and the transmission of the request signal and the event signal, and in a specific embodiment, each slave station starts to transmit the request signal and the event signal after 90 μ s of time elapses after receiving the verification signal.
In one embodiment, step S223 includes step S223-1 and step S223-2.
In step S223-1, the number of falling edges of the verification signal is acquired;
in step S223-2, the waiting time is calculated from the number.
Specifically, the waiting time is calculated according to the following equation:
T=(N-1)*t;
wherein, T is waiting time, N is a serial number of the slave station, and T is preset time.
In this embodiment, each slave station, upon receiving the authentication signal, sequentially transmits a request signal and an event signal to the master station. Specifically, the number of falling edges of the verification signal is obtained, taking the first slave station to the third slave station as an example, when the first slave station receives the verification signal, and the number of falling edges in the verification signal is 1, the waiting time of the first slave station is (1-1) × preset time; when the second slave station receives the verification signal, the number of falling edges in the verification signal is 2, and the waiting time of the first slave station is (2-1) × preset time, namely one time of preset time; when the third slave station receives the verification signal, the number of falling edges in the verification signal is 3, the waiting time of the first slave station is (3-1) × preset time, namely twice the preset time, and the time sequences of other slave stations are similar to the above, so that the acquisition of the request signals and the event signals of the slave stations is realized.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 7 is a block diagram of a master station according to an embodiment of the present invention. As shown in fig. 7, the master station of this embodiment includes: a first signal module 110, a setting module 120, a signal obtaining module 130, an updating module 140, and a processing module 150.
The first signal module 110 is configured to send a first mode switching instruction to each slave station, and after a preset time, send an authentication signal corresponding to each slave station; the setting module 120 is configured to set the first slave station as a target slave station; the signal obtaining module 130 is configured to receive a request signal and an event signal sent by the target slave station; the event signal carries event information; the updating module 140 is configured to sequentially update the target slave stations according to the number of the slave stations, and return to the step of receiving the request signal sent by the target slave stations; the processing module 150 is configured to send a second mode switching instruction to each slave station, and perform feedback processing on all event information in sequence.
As shown in fig. 8, in one embodiment, the signal obtaining module 130 includes: a first sampling unit 131a, a first judging unit 132a, and a first extracting unit 133 a. The first sampling unit 131a is used for sampling the request signal; the first judging unit 132a is configured to judge whether the sampled level is a low level; the first extracting unit 133a is configured to extract event information according to the event signal when the first judging unit 132a judges that the sampled level is a low level.
In one embodiment, the signal obtaining module 130 includes: a second sampling unit 131b, a second judging unit 132b, and a second extracting unit 133 b. The second sampling unit 131b is configured to sample the request signal multiple times at preset time intervals to obtain multiple level values of the multiple samples; the second judging unit 132b is configured to judge whether the number of low levels in the multiple levels is greater than a preset value; the second extracting unit 133b is configured to extract event information according to the event signal when the second determining unit 132b determines whether the number of the low levels in the multiple levels is greater than the preset value.
Fig. 10 is a block diagram of a secondary station according to an embodiment of the present invention. As shown in fig. 10, the slave station includes: a communication mode conversion module 210 and a verification module 220. The communication mode conversion module 210 is configured to receive a first mode switching instruction sent by a master station, and set a communication mode to a concurrent bus communication mode according to the first mode switching instruction; the verification module 220 is configured to receive a verification signal sent by the master station, obtain a waiting time according to the verification signal, and send a request signal and an event signal to the master station after the waiting time.
As shown in FIG. 11, in one embodiment, the verification module 220 comprises: an authentication signal acquisition unit 221, a counting unit 222, and a signal transmission unit 223. The verification signal obtaining unit 221 is configured to receive a verification signal sent by the master station; the counting unit 222 is configured to obtain the number of falling edges of the verification signal; the signal sending unit 223 is configured to obtain the waiting time according to the verification signal when the number is the same as the preset number; transmitting a request signal and an event signal to the master station after the waiting time.
As shown in fig. 12, in one embodiment, the signal transmitting unit 223 includes: a number acquisition unit 2231 and a calculation unit 2232. A number obtaining unit 2231 is configured to obtain the number of falling edges of the verification signal; the calculation unit 2232 is configured to calculate the waiting time according to the number.
The embodiment of the invention also provides a communication system of the parallel bus, which comprises the master station and the slave station.
Fig. 13 is a block diagram of a master station according to an embodiment of the present invention. As shown in fig. 13, the master station 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32 stored in said memory 31 and executable on said processor 30. The processor 30 executes the computer program 32 to implement the steps in the above-mentioned communication method embodiments of the parallel buses, such as the steps 110 to 150 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 32, implements the functions of each module/unit in the above-mentioned device embodiments, such as the functions of the modules 110 to 150 shown in fig. 7.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 32 in the primary station 3. For example, the computer program 32 may be divided into a first signal module 110, a setting module 120, a signal acquiring module 130, an updating module 140, and a processing module 150 (a module in a virtual device), and the specific functions of each module are as follows:
the first signal module 110 is configured to send a first mode switching instruction to each slave station, and after a preset time, send an authentication signal corresponding to each slave station; the setting module 120 is configured to set the first slave station as a target slave station; the signal obtaining module 130 is configured to receive a request signal and an event signal sent by the target slave station; the event signal carries event information; the updating module 140 is configured to sequentially update the target slave stations according to the number of the slave stations, and return to the step of receiving the request signal sent by the target slave stations; the processing module 150 is configured to send a second mode switching instruction to each slave station, and perform feedback processing on all event information in sequence.
The master station 3 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by a person skilled in the art that fig. 13 is only an example of the master station 3 and does not constitute a limitation of the master station 3 and may comprise more or less components than shown, or some components in combination, or different components, e.g. the terminal device may further comprise input output devices, network access devices, buses etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the master station 3, such as a hard disk or a memory of the master station 3. The memory 31 may also be an external storage device of the master station 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the master station 3. Further, the memory 31 may also include both an internal storage unit of the master station 3 and an external storage device. The memory 31 is used for storing the computer program and other programs and data required by the terminal device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (15)

1. A communication method of a parallel bus is characterized in that the communication method of the parallel bus comprises the following steps:
sending a first mode switching instruction to each slave station, and after preset time, respectively sending verification signals corresponding to each slave station;
setting a first slave station as a target slave station;
receiving a request signal and an event signal sent by the target slave station; the event signal carries event information;
updating target slave stations in sequence according to the number of the slave stations, and returning to the step of receiving the request signals sent by the target slave stations;
and sending a second mode switching instruction to each slave station, and sequentially carrying out feedback processing on all event information.
2. The method of communicating on a parallel bus of claim 1, wherein said receiving a request signal and an event signal transmitted by said target slave station comprises:
sampling the request signal;
judging whether the sampled level is a low level;
and if the sampled level is judged to be low level, extracting event information according to the event signal.
3. The method of communicating on a parallel bus of claim 1, wherein said receiving a request signal and an event signal transmitted by said target slave station comprises:
sampling the request signal for multiple times at preset time intervals to obtain multiple sampled level values;
judging whether the number of low levels in the plurality of levels is greater than a preset value;
and if the number of the low levels in the plurality of levels is judged to be larger than a preset value, extracting event information according to the event signal.
4. A communication method of a parallel bus is characterized in that the communication method of the parallel bus comprises the following steps:
receiving a first mode switching instruction sent by a master station, and setting a communication mode to be a concurrent bus communication mode according to the first mode switching instruction;
and receiving the verification signal sent by the master station, acquiring waiting time according to the verification signal, and sending a request signal and an event signal to the master station after the waiting time.
5. The method for communicating on a parallel bus according to claim 4, wherein the receiving the authentication signal transmitted from the master station, obtaining the waiting time according to the authentication signal, and transmitting the request signal and the event signal to the master station after the waiting time comprises:
receiving a verification signal sent by the master station;
acquiring the number of falling edges of the verification signal;
if the number is the same as the preset value, acquiring waiting time according to the verification signal;
transmitting a request signal and an event signal to the master station after the waiting time.
6. The method for communicating on a parallel bus of claim 4, wherein said obtaining latency based on an authentication signal comprises:
acquiring the number of falling edges of the verification signal;
and calculating the waiting time according to the quantity.
7. A primary station, characterized in that the primary station comprises:
the first signal module is used for sending a first mode switching instruction to each slave station, and respectively sending verification signals corresponding to each slave station after preset time;
the setting module is used for setting the first slave station as a target slave station;
the signal acquisition module is used for receiving a request signal and an event signal sent by the target slave station; the event signal carries event information;
the updating module is used for sequentially updating the target slave stations according to the number of the slave stations and returning to the step of receiving the request signals sent by the target slave stations;
and the processing module is used for sending a second mode switching instruction to each slave station and sequentially carrying out feedback processing on all the event information.
8. The master station of claim 7, wherein the signal acquisition module comprises:
a first sampling unit for sampling the request signal;
a first judgment unit for judging whether the sampled level is a low level;
and the first extraction unit is used for extracting event information according to the event signal if the first judgment unit judges that the sampled level is low level.
9. The master station of claim 7, wherein the signal acquisition module comprises:
the second sampling unit is used for sampling the request signal for multiple times at preset time intervals to acquire multiple level values of the multiple sampling;
the second judging unit is used for judging whether the number of the low levels in the multiple levels is larger than a preset value or not;
a second extracting unit, configured to extract event information according to the event signal if the second determining unit determines whether the number of low levels in the multiple levels is greater than the preset value.
10. A secondary station, characterized in that the secondary station comprises:
the communication mode conversion module is used for receiving a first mode switching instruction sent by a master station and setting a communication mode into a concurrent bus communication mode according to the first mode switching instruction;
and the verification module is used for receiving the verification signal sent by the master station, acquiring the waiting time according to the verification signal, and sending a request signal and an event signal to the master station after the waiting time.
11. The secondary station of claim 10, wherein the authentication module comprises:
the verification signal acquisition unit is used for receiving the verification signal sent by the master station;
a counting unit for acquiring the number of falling edges of the verification signal;
the signal sending unit is used for acquiring waiting time according to the verification signals if the number is the same as the preset number; transmitting a request signal and an event signal to the master station after the waiting time.
12. The secondary station of claim 10, wherein the authentication module comprises:
a number acquisition unit configured to acquire the number of falling edges of the verification signal;
and the calculating unit is used for calculating the waiting time according to the number.
13. A master station comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the communication method of a parallel bus according to any of claims 1 to 3 when executing the computer program.
14. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method of communication of a parallel bus according to any one of claims 1 to 3.
15. A communication system with a parallel bus comprising a master station as claimed in any one of claims 7 to 9 and a slave station as claimed in any one of claims 10 to 12.
CN202010014447.XA 2020-01-07 2020-01-07 Communication method and system of parallel bus, master station and slave station Active CN111245697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010014447.XA CN111245697B (en) 2020-01-07 2020-01-07 Communication method and system of parallel bus, master station and slave station

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010014447.XA CN111245697B (en) 2020-01-07 2020-01-07 Communication method and system of parallel bus, master station and slave station

Publications (2)

Publication Number Publication Date
CN111245697A true CN111245697A (en) 2020-06-05
CN111245697B CN111245697B (en) 2022-04-01

Family

ID=70879908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010014447.XA Active CN111245697B (en) 2020-01-07 2020-01-07 Communication method and system of parallel bus, master station and slave station

Country Status (1)

Country Link
CN (1) CN111245697B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756609A (en) * 2020-06-15 2020-10-09 苏州汇川技术有限公司 Station number automatic allocation method, master station equipment, slave station equipment and single-spindle detection system
CN113507387A (en) * 2021-06-30 2021-10-15 深圳市杰美康机电有限公司 Master-slave station protocol-based control system and method

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2686217Y (en) * 2004-03-18 2005-03-16 上海电器科学研究所(集团)有限公司 Communication adapter for field equipment communication
CN1677945A (en) * 2004-03-31 2005-10-05 联想(北京)有限公司 Master-slave mode multi-address communication method
CN1787473A (en) * 2004-12-08 2006-06-14 中兴通讯股份有限公司 Method for realizing racing controlling type bus communication adopting 485 interface
CN101175269A (en) * 2006-10-31 2008-05-07 华为技术有限公司 Communication terminal and its method and device for system bootstrapping
CN101281476A (en) * 2008-05-14 2008-10-08 北京泰得思达科技发展有限公司 Paralleling burning record method
CN104516759A (en) * 2014-12-08 2015-04-15 武汉烽火网络有限责任公司 Generating method for integration mirror image document, testing method and device
CN106357301A (en) * 2016-08-25 2017-01-25 阳光电源股份有限公司 Cascaded power line carrier wave method and device
CN106656702A (en) * 2016-10-31 2017-05-10 北京信息科技大学 Time sequence control method of intelligent redundant serial bus
CN108551416A (en) * 2018-04-19 2018-09-18 大陆汽车车身电子系统(芜湖)有限公司 A kind of CAN bus communication means
CN109120067A (en) * 2018-09-05 2019-01-01 杭州和利时自动化有限公司 A kind of sequence of events recording report method, device, equipment and readable storage medium storing program for executing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2686217Y (en) * 2004-03-18 2005-03-16 上海电器科学研究所(集团)有限公司 Communication adapter for field equipment communication
CN1677945A (en) * 2004-03-31 2005-10-05 联想(北京)有限公司 Master-slave mode multi-address communication method
CN1787473A (en) * 2004-12-08 2006-06-14 中兴通讯股份有限公司 Method for realizing racing controlling type bus communication adopting 485 interface
CN101175269A (en) * 2006-10-31 2008-05-07 华为技术有限公司 Communication terminal and its method and device for system bootstrapping
CN101281476A (en) * 2008-05-14 2008-10-08 北京泰得思达科技发展有限公司 Paralleling burning record method
CN104516759A (en) * 2014-12-08 2015-04-15 武汉烽火网络有限责任公司 Generating method for integration mirror image document, testing method and device
CN106357301A (en) * 2016-08-25 2017-01-25 阳光电源股份有限公司 Cascaded power line carrier wave method and device
CN106656702A (en) * 2016-10-31 2017-05-10 北京信息科技大学 Time sequence control method of intelligent redundant serial bus
CN108551416A (en) * 2018-04-19 2018-09-18 大陆汽车车身电子系统(芜湖)有限公司 A kind of CAN bus communication means
CN109120067A (en) * 2018-09-05 2019-01-01 杭州和利时自动化有限公司 A kind of sequence of events recording report method, device, equipment and readable storage medium storing program for executing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756609A (en) * 2020-06-15 2020-10-09 苏州汇川技术有限公司 Station number automatic allocation method, master station equipment, slave station equipment and single-spindle detection system
CN113507387A (en) * 2021-06-30 2021-10-15 深圳市杰美康机电有限公司 Master-slave station protocol-based control system and method
CN113507387B (en) * 2021-06-30 2022-07-01 深圳市杰美康机电有限公司 Master-slave station protocol-based control system and method

Also Published As

Publication number Publication date
CN111245697B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN111245697B (en) Communication method and system of parallel bus, master station and slave station
CN110730422B (en) UWB-based positioning method, device, system and terminal equipment
CN111127778B (en) Bank self-service terminal recommendation method and device
CN108563518A (en) Slave communication means, device, terminal device and storage medium
CN108806302A (en) A kind of vehicle dispatching method and device
CN102930193A (en) Face identification-based method for logging in community
CN106844063A (en) Cross-platform data processing method, system and cross-platform data shared system
CN104317473A (en) Interface display method and client
CN210428500U (en) Intelligent card management device
CN113033752B (en) Communication fault detection method, master machine and slave machine
CN103874224A (en) Information receiving and sending method based on information timeliness analytical method
CN112596985B (en) IT asset detection method, device, equipment and medium
CN113011943A (en) Interaction method, interaction system, storage medium and electronic device
CN114229637A (en) Elevator floor determining method, device, equipment and computer readable storage medium
CN114222319A (en) Data transmission method and device for terminal of Internet of things and storage medium
CN113610944A (en) Line drawing method, device, equipment and storage medium
CN114022256A (en) Information acquisition method, terminal, system and medium based on offline shopping
CN112883164A (en) Order playing method and system
CN111061451A (en) Information processing method, device and system
CN104282145B (en) One station taxi sharing information system and method
CN115333903B (en) Synchronization head detection method, synchronization device, receiver and communication system
CN114751272B (en) Elevator data acquisition method, device, terminal, system, equipment and medium
CN110876852A (en) Network game data processing method and system of micro-service
CN110991145A (en) Document conversion method and device, electronic equipment and storage medium
CN110018908A (en) A kind of inter-process communication methods, electronic equipment and readable storage medium storing program for executing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant