CN112564812B - Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium - Google Patents

Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium Download PDF

Info

Publication number
CN112564812B
CN112564812B CN202011339462.8A CN202011339462A CN112564812B CN 112564812 B CN112564812 B CN 112564812B CN 202011339462 A CN202011339462 A CN 202011339462A CN 112564812 B CN112564812 B CN 112564812B
Authority
CN
China
Prior art keywords
signal
pulse signal
preset time
light curtain
time length
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.)
Active
Application number
CN202011339462.8A
Other languages
Chinese (zh)
Other versions
CN112564812A (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.)
CHANGJIANG ELECTRIC EQUIPMENT
Original Assignee
CHANGJIANG ELECTRIC EQUIPMENT
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 CHANGJIANG ELECTRIC EQUIPMENT filed Critical CHANGJIANG ELECTRIC EQUIPMENT
Priority to CN202011339462.8A priority Critical patent/CN112564812B/en
Publication of CN112564812A publication Critical patent/CN112564812A/en
Application granted granted Critical
Publication of CN112564812B publication Critical patent/CN112564812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/50Transmitters
    • H04B10/516Details of coding or modulation
    • H04B10/524Pulse modulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/50Transmitters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/60Receivers

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Optical Communication System (AREA)

Abstract

The application relates to a pulse signal modulation and demodulation method, an optical curtain receiver, a transmitter and a storage medium, which are applied to the optical curtain receiver, wherein the method comprises the following steps: when the first preset time length is reached, judging whether a tail lamp feedback signal is generated or not; if not, setting the flag bit of the synchronous signal, turning over the current level signal output by the pulse signal sending port, and outputting according to the turned level signal; if so, judging whether the second preset time is reached, if so, setting the alignment signal flag bit, overturning the current level signal output by the pulse signal sending port, and outputting according to the overturned level signal; the tail lamp feedback signal is a level turnover signal generated when a channel corresponding to the last light receiving tube is switched to a channel corresponding to the first light receiving tube; the second preset time is longer than the first preset time. The method and the device can reduce the occurrence of demodulation errors caused by interference of the pulse signals in the transmission process.

Description

Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium
Technical Field
The present application relates to the field of light curtain technologies, and in particular, to a pulse signal modulation and demodulation method, a light curtain receiver, a transmitter, and a storage medium.
Background
The light curtain is a synchronous opposite-emitting type detection device which is provided with a row of luminous tubes and light receiving tubes from top to bottom. The common light curtain consists of a light curtain transmitter, a light curtain receiver and a special synchronous cable connected with the transmitting and receiving parts. The light curtain transmitter is provided with a luminotron at regular intervals, and the light curtain receiver is provided with the same number of light receiving tubes at the same interval. When the light curtain works, the light curtain transmitter drives a luminotron to transmit the modulated infrared light signal at regular intervals along the length direction, and the light receiving tube corresponding to the luminotron on the light curtain receiver receives the infrared light signal. After the light emitting system drives the light emitting tube, the receiving system judges whether the light emitting tube is shielded or not, so that the function of detecting the object is realized.
In order to better realize the light curtain detection function, the light curtain receiver and the light curtain transmitter need to be subjected to light beam alignment correction, wherein a pulse signal needs to be generated and transmitted between the light curtain receiver and the light curtain transmitter. However, the rectangular waves are easily interfered in the transmission process, and the traditional analysis mode is easy to analyze errors, so that the use of the whole light curtain is influenced.
Disclosure of Invention
In order to reduce the occurrence of demodulation errors caused by interference in the transmission process of pulse signals, the application provides a pulse signal modulation and demodulation method, a light curtain receiver, a transmitter and a storage medium.
In a first aspect, the present application provides a pulse signal modulation method, which adopts the following technical scheme:
a pulse signal modulation method is applied to a light curtain receiver, wherein the light curtain receiver is provided with a light receiving tube, a first hardware channel and a pulse signal sending port for sending a pulse signal, and the first hardware channel comprises a plurality of channels corresponding to the light receiving tube one by one; the method comprises the following steps:
when the first preset time length is reached, judging whether a tail lamp feedback signal is generated or not;
if not, setting the flag bit of the synchronous signal, turning over the current level signal output by the pulse signal sending port, and outputting according to the turned level signal;
if so, judging whether a second preset time length is reached, if so, setting the alignment signal flag bit, overturning the current level signal output by the pulse signal sending port, and outputting according to the overturned level signal;
the tail lamp feedback signal is a level turnover signal generated when a channel corresponding to the last light receiving tube is switched to a channel corresponding to the first light receiving tube; the second preset duration is longer than the first preset duration.
By adopting the technical scheme, the time sequence of the pulse signal can be accurately controlled by whether the tail lamp feedback signal is generated or not so as to modulate the pulse signals with different pulse widths.
Optionally, starting a first timer, and adding 1 to a current count value of the first timer every third preset time period;
if the current count value of the first timer is greater than a first numerical value, judging that the first preset time length is reached;
and if the current count value of the first timer is greater than a second number, judging that the second preset time length is reached.
By adopting the technical scheme, the software counting is not easy to interfere, and whether the first preset time length or the second preset time length is reached can be accurately judged.
Optionally, the initial level state of the pulse signal sending port is a low level; the turning over of the current level signal output by the pulse signal sending port and the output according to the turned over level signal comprise:
and turning over the low level signal output by the pulse signal sending port and outputting a high level signal.
In a second aspect, the present application provides a pulse signal demodulation method, which adopts the following technical solutions:
a pulse signal demodulation method is applied to a light curtain transmitter, wherein the light curtain transmitter is provided with a pulse signal receiving port for receiving a pulse signal sent by a light curtain receiver; the method comprises the following steps:
starting a second timer, and inquiring the level state of the pulse signal receiving port every fourth preset time;
if the current count value is low level, adding 1 to the current count value of the second timer, and writing 0 into a cache region;
if the current count value is high level, adding 1 to the current count value of the second timer, and writing 1 into the cache region;
and when the time length exceeds a fifth preset time length, judging that the pulse signal is an alignment signal or a synchronous signal according to the number of 1 s or 0 s in the buffer area.
By adopting the technical scheme, the high level and the low level of the received pulse signal are respectively buffered by 1 and 0, and the alignment signal and the synchronous signal are distinguished by inquiring the number of 1 or 0, so that the occurrence of demodulation errors caused by interference of the pulse signal in the transmission process can be reduced.
Optionally, when the time length exceeds a fifth preset time length, determining that the pulse signal is an alignment signal or a synchronization signal according to the number of 1 s in the buffer area, including:
when the current count value of the second timer is greater than a third numerical value, judging whether the number of the 1 s in the cache region is greater than a fourth numerical value;
if so, judging the pulse signal to be an alignment signal;
if not, the pulse signal is judged to be a synchronous signal.
In a third aspect, the present application provides a light curtain receiver, which adopts the following technical solutions:
a light curtain receiver comprising a first memory and a first processor, the first memory having stored thereon a computer program that can be loaded by the first processor and that implements any of the above-described methods of pulse signal modulation.
By adopting the technical scheme, the time sequence of the pulse signal can be accurately controlled by judging whether the tail lamp feedback signal is generated or not so as to modulate the pulse signals with different pulse widths.
In a fourth aspect, the present application provides a light curtain transmitter, which adopts the following technical scheme:
a light curtain transmitter, comprising a second memory and a second processor, wherein the second memory stores a computer program that can be loaded by the second processor and used for executing any one of the above pulse signal demodulation methods.
By adopting the technical scheme, the high level and the low level of the received pulse signal are respectively buffered by 1 and 0, and the number of 1 or 0 is inquired to distinguish the alignment signal from the synchronous signal, so that the occurrence of demodulation errors caused by interference in the transmission process of the pulse signal can be reduced.
In a fifth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer-readable storage medium storing a computer program that can be loaded by a processor and executes any one of the above pulse signal modulation method or pulse signal demodulation method.
Drawings
Fig. 1 is a schematic flowchart of a light curtain beam alignment correction method according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of a pulse signal modulation method according to an embodiment of the present disclosure.
Fig. 3 is a schematic flowchart of a pulse signal demodulation method according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of a modulation pulse signal of a light curtain receiver according to an embodiment of the present application.
Fig. 5 is a schematic flowchart of a light curtain transmitter demodulating a pulse signal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the embodiment of the application, the light curtain receiver is provided with a plurality of light collecting tubes, the light curtain receiver is further provided with a first multiplexer with a first hardware channel, the first hardware channel comprises a plurality of channels corresponding to the light collecting tubes one by one, and the gating sequence of the multipath channels is consistent with the arrangement sequence of the light collecting tubes. All the channels of the first hardware channel are in the initial state of closing state, and any one channel is not gated. When the light curtain transmitter is gated to a certain channel, the channel is opened to wait for receiving the light beam signal transmitted by the light curtain transmitter received by the corresponding light collecting tube.
The light curtain emitter is provided with light emitting tubes with the same number as the light receiving tubes, the light curtain emitter is also provided with a second multiplexer with a second hardware channel, the second hardware channel comprises a plurality of channels corresponding to the light emitting tubes one by one, and the gating sequence of the multipath channels is consistent with the arrangement sequence of the light emitting tubes. All the channels of the second hardware channel are in the initial state of closing state, and any one channel is not gated. When the light is gated to a certain channel, the channel is opened to drive the corresponding light emitting tube to emit a light beam signal.
The light beam signals emitted by the light curtain emitter and the light beam signals received by the light curtain receiver can be synchronous, namely, the light curtain receiver and the light curtain emitter receive and send light beams with equal length. Fig. 1 shows a flow chart of a light curtain beam alignment correction method.
As shown in fig. 1, the light curtain receiver serves as a master and the light curtain transmitter serves as a slave. After the light curtain transmitter gives a hardware ready state, starting to count software and add 1, shifting a first hardware channel to a first channel, waiting for receiving an infrared light signal transmitted by the light curtain transmitter by the first channel, wherein the count value is 1< N +1, and modulating a synchronous signal by a light curtain receiver and transmitting the synchronous signal to the light curtain transmitter; after the light curtain transmitter demodulates the synchronous signal, the second hardware channel is shifted to the first channel, and a first light-emitting tube corresponding to the first channel is driven to transmit an infrared light signal; the first light receiving tube of the light curtain receiver receives the infrared light signal.
Adding 1 to the software count of the light curtain receiver every 300us, shifting the first hardware channel to the next channel, repeating the operations, when the software count value is equal to N, shifting the first hardware channel to the Nth channel, and when the software count value is less than N +1, modulating a synchronous signal, after demodulating the synchronous signal, the light curtain transmitter shifting the second hardware channel to the Nth channel, and driving the Nth light-emitting tube corresponding to the Nth channel to emit an infrared light signal; the nth light receiving tube of the light curtain receiver receives the infrared light signal.
When the light curtain reaches 300us, the software count of the light curtain receiver continues to be added with 1 to reach N +1, the hardware channel is shifted to the first channel, at the moment, the alignment signal is modulated and sent to the light curtain transmitter, the software count is cleared, and the first hardware channel is emptied; the light curtain transmitter demodulates the alignment signal, also clearing the second hardware channel and closing all channels.
Even if the light curtain receiver and the light curtain transmitter are not synchronous, namely the light curtain receiving and sending light beams are not equal, as long as the software count value of the light curtain receiver reaches N +1, namely the last channel is switched to the first channel, the hardware channels of the light curtain receiver and the light curtain transmitter are forcibly emptied, a new round of light beam alignment correction is started, and the light beam synchronization of the light curtain receiver and the light curtain transmitter is ensured.
The embodiment provides a pulse signal modulation method, which is applied to an optical curtain receiver, wherein a pulse signal sending port for sending a pulse signal is arranged on the optical curtain receiver. As shown in fig. 2, the main flow of the method is described as follows (steps S101 to S104):
step S101: when the first preset time length is reached, judging whether a tail lamp feedback signal is generated or not, and if not, executing the step S102; if yes, go to step S103;
step S102: setting the flag bit of the synchronous signal, turning over the current level signal output by the pulse signal sending port, and outputting the current level signal according to the turned-over level signal;
step S103: judging whether the second preset time length is reached, if so, executing the step S104; if not, continuously judging whether the second preset time length is reached or not;
step S104: and setting the flag bit of the alignment signal, overturning the current level signal output by the pulse signal sending port, and outputting according to the overturned level signal.
In this embodiment, the light curtain receiver is provided with N light collecting tubes and a microcontroller, and the microcontroller has a general I/O port. When the first light receiving tube is gated to the channel corresponding to the (N-1) th light receiving tube, the general I/O port receives a level signal; when the optical signal is gated to the channel corresponding to the Nth light receiving tube, the general I/O port receives a level turnover signal; when the channel corresponding to the Nth light receiving tube is switched to the channel corresponding to the first light receiving tube, the general I/O port receives a level reversal signal, namely a tail lamp feedback signal.
For example: the light curtain receiver is provided with 8 light receiving tubes, and when the light curtain receiver is switched to a channel corresponding to the first 7 light receiving tubes, the level state of the general I/O port is low; when the channel corresponding to the 7 th light receiving tube is shifted and gated to the channel corresponding to the 8 th light receiving tube, the level state of the general I/O port is changed from low to high; when the signal is shifted from the channel corresponding to the 8 th light receiving tube and is gated to the channel corresponding to the 1 st light receiving tube, the level state of the general I/O port changes from high to low, and the tail lamp feedback signal is the level reversal signal changing from high to low.
In some embodiments, the first preset duration and the second preset duration may be determined in a software counting manner, and the specific method includes:
starting a first timer, and adding 1 to the current count value of the first timer every other third preset time; if the current count value of the first timer is greater than the first numerical value, judging that a first preset time length is reached; and if the current count value of the first timer is greater than the second count value, judging that a second preset time length is reached, wherein the second preset time length is greater than the first preset time length.
For the level inversion in step S102, there may be the following two ways:
(1) the initial level state of the pulse signal sending port is low level, and a high level signal is output after the level is turned over; the synchronous signal is a pulse signal keeping a low level state with a first preset duration, and the alignment signal is a pulse signal keeping a low level state with a second preset duration.
(2) The initial level state of the pulse signal sending port is high level, and a low level signal is output after the level is turned over; the synchronous signal is a pulse signal for keeping a first preset time length high level state, and the alignment signal is a pulse signal for keeping a second preset time length high level state.
In this embodiment, whether to produce tail lamp feedback signal can accurately control pulse signal's chronogenesis through whether, and the first time of predetermineeing of accurate time delay of light curtain receiver represents synchronizing signal, and the second time of predetermineeing of accurate time delay represents alignment signal to the pulse signal of different pulse widths is adjusted out in the modulation.
In view of the above provided pulse signal modulation method, correspondingly, this embodiment further provides a pulse signal demodulation method, which is applied to the light curtain transmitter, where the light curtain transmitter is provided with a pulse signal receiving port for receiving a pulse signal sent by the light curtain receiver. As shown in fig. 3, the main flow of the method is described as follows (steps S201 to S204):
step S201: starting a second timer, inquiring the level state of the pulse signal receiving port every fourth preset time, and if the level state is a low level, executing the step S202; if the voltage level is high, step S203 is executed;
step S202: adding 1 to the current count value of the second timer, and writing 0 into the cache region;
step S203: adding 1 to the current count value of the second timer, and writing 1 into the cache region;
step S204: and when the time length exceeds the fifth preset time length, judging that the pulse signal is an alignment signal or a synchronous signal according to the number of 1 s or 0 s in the buffer area.
In step S204, the number of 1S or 0S is selected to determine whether the signal is an alignment signal or a synchronization signal, which mainly depends on the type of the pulse signal received by the pulse signal receiving port. As above, if the pulse signal sent by the light curtain receiver is the synchronization signal keeping the first preset duration low level state or the alignment signal keeping the second preset duration low level state, the number of 0 may be selected to determine whether the pulse signal is the alignment signal or the synchronization signal; if the pulse signal sent by the light curtain receiver is a synchronization signal keeping a first preset time length high level state or an alignment signal keeping a second preset time length high level state, the number of 1 can be selected to determine whether the pulse signal is the alignment signal or the synchronization signal.
Certainly, the pulse signal receiving port may be externally connected with an inverter, and the inverter inverts the level of the received pulse signal and inputs the inverted pulse signal to the pulse signal receiving port. At this time, when the pulse signal sent by the light curtain receiver is a synchronization signal keeping a first preset duration low level state or an alignment signal keeping a second preset duration low level state, the number of 1 should be selected to determine whether the pulse signal is the alignment signal or the synchronization signal; when the pulse signal sent by the light curtain receiver is a synchronization signal keeping a first preset time long high level state or an alignment signal keeping a second preset time long high level state, the number of 0 can be selected to determine whether the pulse signal is the alignment signal or the synchronization signal.
The entire pulse signal modulation and demodulation method will be specifically described below in one of the ways.
As shown in fig. 4, the pulse width of the synchronization signal is set to 60us, i.e., the first preset time period is 60us, the pulse width of the alignment signal is set to 100us, i.e., the second preset time period is 100us, the third preset time period is 20us, the first value is 2, and the second value is 4. A first timer is set with an initial count value set to 0. When the time slice is started, the pulse signal sending port outputs low level and starts a first timer; the level state of the general-purpose I/O port for receiving the tail lamp feedback signal is inquired every 20us while the count value of the first timer is incremented by 1. When the count value of the first timer is greater than 2, namely 60us is reached, if the general I/O port is not inquired to generate a tail lamp feedback signal at the moment, setting a synchronous signal mark, outputting a high level by the pulse signal sending port, outputting a low level of 60us by the pulse signal sending port at the moment, and outputting the low level again by the pulse signal sending port until the corresponding time slice reaches a preset trigger period (for example 300 us); if the fact that the general I/O port generates a tail lamp feedback signal is inquired at the moment, timing interruption is continued, when the count value of the first timer is larger than 4 and reaches 100us, the alignment signal mark is set, the pulse signal sending port outputs high level, the pulse signal sending port outputs low level of 100us at the moment, and the pulse signal sending port outputs low level again until the corresponding time slice reaches a preset triggering period.
It should be noted that, when the current channel in the first hardware channel is shifted to the next channel, the time slice corresponding to the next channel is started. The time slice is a period of CPU time distributed to each running process by the time-sharing operating system, namely, each light receiving pipe corresponds to one time slice respectively.
The light curtain emitter end is provided with an inverter, the level of the received pulse signal is firstly turned over by the inverter and then input into the pulse signal receiving port.
As shown in fig. 5, the fourth preset time period is set to 5us, the fifth preset time period is set to 100us, the third value is set to 20, and the fourth value is set to 14 (60 us/5us <14<100us/5 us). A second timer is set with an initial value of 0 and a buffer of a predetermined byte is created, wherein the predetermined byte may be 20. When the pulse signal receiving port generates a high level, timing interruption is started, the level state of the pulse signal receiving port is detected every 5us, and the count value of the second timer is increased by 1. When the detected level state is a high level, writing 1 into the cache region; when the detected level state is low, 0 is written in the buffer area.
Normally, when the light curtain receiver sends a synchronization signal, the light curtain transmitter should buffer 12 1 s, and when the light curtain receiver sends an alignment signal, the light curtain transmitter should buffer 201 s. However, the rectangular wave is easily interfered in the transmission process, and the traditional analysis mode is easy to analyze errors.
Specifically, when the count value of the second timer is greater than 20, that is, exceeds 100us, the number of 1 s is counted. When the number of 1 is not more than 14, the pulse signal is judged to be a synchronous signal, and when the number of 1 is more than 14, the pulse signal is judged to be an alignment signal.
In order to better execute the program of the method, an embodiment of the present application provides a light curtain receiver, which includes a first memory and a first processor, wherein the first memory stores a computer program that can be loaded by the first processor and execute the pulse signal modulation method.
The embodiment of the application further provides a light curtain emitter, which comprises a second memory and a second processor, wherein the second memory stores a computer program which can be loaded by the second processor and executes the pulse signal demodulation method.
In embodiments of the present application, the first memory and the second memory may each be configured to store an instruction, a program, code, a set of codes, or a set of instructions. The first memory and the second memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as receiving and demodulating a pulse signal transmitted by a light curtain receiver, etc.), and instructions for implementing a pulse signal modulation method or a pulse signal demodulation method provided by the embodiments of the present application, etc.; the storage data area may store data and the like involved in the pulse signal modulation method or the pulse signal demodulation method provided in the embodiments of the present application.
The first processor and the second processor may each include one or more processing cores. The first processor and the second processor perform various functions and process data of the present application by executing or executing instructions, programs, code sets, or instruction sets stored in the first memory and the second memory, calling data stored in the first memory and the second memory. The first Processor and the second Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is to be understood that the electronic devices for implementing the functions of the first processor and the second processor may be other devices, and the embodiments of the present application are not limited in particular.
An embodiment of the present application provides a computer-readable storage medium, including: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The computer-readable storage medium stores a computer program that can be loaded by a processor and executes the above-described pulse signal modulation method or pulse signal demodulation method.
The specific embodiments are merely illustrative and not restrictive of the present application, and those skilled in the art who review this disclosure may make modifications to the embodiments as required without any inventive contribution, but fall within the scope of the claims of the present application.

Claims (8)

1. A pulse signal modulation method is applied to a light curtain receiver and is characterized in that the light curtain receiver is provided with a light receiving tube, a first hardware channel and a pulse signal sending port for sending pulse signals, wherein the first hardware channel comprises a plurality of channels which are in one-to-one correspondence with the light receiving tube; the method comprises the following steps:
when the first preset time length is reached, judging whether a tail lamp feedback signal is generated or not;
if not, setting the flag bit of the synchronous signal, turning over the current level signal output by the pulse signal sending port, and outputting according to the turned level signal;
if so, judging whether a second preset time length is reached, if so, setting the alignment signal flag bit, overturning the current level signal output by the pulse signal sending port, and outputting according to the overturned level signal;
the tail lamp feedback signal is a level turnover signal generated when a channel corresponding to the last light receiving tube is switched to a channel corresponding to the first light receiving tube; the second preset time length is longer than the first preset time length;
the method comprises the following steps of judging a first preset duration and a second preset duration by using a software counting mode, wherein the specific method comprises the following steps:
starting a first timer, and adding 1 to the current count value of the first timer every other third preset time; if the current count value of the first timer is greater than the first numerical value, judging that the first preset time length is reached; and if the current count value of the first timer is greater than the second numerical value, judging that a second preset time length is reached, wherein the second preset time length is greater than the first preset time length.
2. The method according to claim 1, characterized in that a first timer is started, and the current count value of the first timer is increased by 1 every third preset time length;
if the current count value of the first timer is greater than a first numerical value, judging that the first preset time length is reached;
and if the current count value of the first timer is greater than a second value, judging that the second preset time length is reached.
3. The method according to claim 1 or 2, wherein the initial level state of the pulse signal transmission port is a low level; the turning over of the current level signal output by the pulse signal sending port and the outputting of the current level signal according to the turned over level signal comprise:
and turning over the low level signal output by the pulse signal sending port and outputting a high level signal.
4. A pulse signal demodulation method is applied to a light curtain transmitter and is characterized in that a pulse signal receiving port for receiving a pulse signal sent by a light curtain receiver is arranged on the light curtain transmitter; the method comprises the following steps:
starting a second timer, and inquiring the level state of the pulse signal receiving port every fourth preset time;
if the current count value is low level, adding 1 to the current count value of the second timer, and writing 0 into a cache region;
if the current count value is high level, adding 1 to the current count value of the second timer, and writing 1 into the cache region;
and when the time length exceeds a fifth preset time length, judging that the pulse signal is an alignment signal or a synchronous signal according to the number of 1 s or 0 s in the buffer area.
5. The method of claim 4, wherein when the fifth preset duration is exceeded, determining whether the pulse signal is an alignment signal or a synchronization signal according to the number of 1 s in the buffer includes:
when the current count value of the second timer is greater than a third numerical value, judging whether the number of the 1 s in the cache region is greater than a fourth numerical value;
if yes, determining the pulse signal as an alignment signal;
if not, the pulse signal is judged to be a synchronous signal.
6. A light curtain receiver comprising a first memory and a first processor, the first memory having stored thereon a computer program that can be loaded by the first processor and that executes the method of any one of claims 1 to 3.
7. A light curtain projector comprising a second memory and a second processor, the second memory having stored thereon a computer program that can be loaded by the second processor and that executes the method of claim 4 or 5.
8. A computer-readable storage medium, characterized in that a computer program is stored which can be loaded by a processor and which executes the pulse signal modulation method according to any one of claims 1 to 3; alternatively, a computer program is stored which can be loaded by a processor and which executes the pulse signal demodulation method as claimed in claim 4 or 5.
CN202011339462.8A 2020-11-25 2020-11-25 Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium Active CN112564812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011339462.8A CN112564812B (en) 2020-11-25 2020-11-25 Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011339462.8A CN112564812B (en) 2020-11-25 2020-11-25 Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium

Publications (2)

Publication Number Publication Date
CN112564812A CN112564812A (en) 2021-03-26
CN112564812B true CN112564812B (en) 2022-07-22

Family

ID=75043646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011339462.8A Active CN112564812B (en) 2020-11-25 2020-11-25 Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium

Country Status (1)

Country Link
CN (1) CN112564812B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115231421A (en) * 2022-07-22 2022-10-25 日立楼宇技术(广州)有限公司 Light curtain control method and device, elevator light curtain and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546213A (en) * 2013-10-16 2014-01-29 深圳市宏电技术股份有限公司 Optical communication transmission method and system
CN205426185U (en) * 2015-12-18 2016-08-03 天津市杰泰克自动化技术有限公司 Measure circuit of light curtain
CN106276533A (en) * 2016-10-11 2017-01-04 广州日滨科技发展有限公司 The method and apparatus controlling light curtain

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681025B (en) * 2012-06-11 2014-03-26 易程(苏州)电子科技股份有限公司 Monitoring system for railway passenger ticket checking channel
CN102707330B (en) * 2012-06-11 2014-08-27 易程(苏州)电子科技股份有限公司 Monitoring method for ticket checking passage
US9641259B1 (en) * 2016-06-20 2017-05-02 Rockwell Automation Technologies, Inc. System and method for pulsed based receiver photo sensor
CN108734944B (en) * 2017-04-18 2021-07-13 陕西万方汽车零部件有限公司 Wireless remote control decoding method and device
CN110980465B (en) * 2019-12-30 2022-05-06 苏州和阳电气有限公司 Method for mutually confirming and synchronizing transceiving rhythm among light curtain transceiving devices
CN111829564B (en) * 2020-06-03 2022-05-24 佳格科技(浙江)股份有限公司 Light curtain detection method and device without special synchronization line

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546213A (en) * 2013-10-16 2014-01-29 深圳市宏电技术股份有限公司 Optical communication transmission method and system
CN205426185U (en) * 2015-12-18 2016-08-03 天津市杰泰克自动化技术有限公司 Measure circuit of light curtain
CN106276533A (en) * 2016-10-11 2017-01-04 广州日滨科技发展有限公司 The method and apparatus controlling light curtain

Also Published As

Publication number Publication date
CN112564812A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN112564812B (en) Pulse signal modulation and demodulation method, light curtain receiver, transmitter and storage medium
RU2015129552A (en) SENSOR TRANSMISSION MANAGEMENT
CN112711004B (en) Anti-interference method and device for laser ranging, laser ranging equipment and readable storage medium
CN112363238B (en) Light curtain light beam alignment correction method, light curtain receiver, transmitter and storage medium
CN113759340B (en) Echo signal processing method and device, laser radar and storage medium
CN111742324A (en) Code printing method, code printing device, active pen and code printing system
US10948891B2 (en) Motor driver with multipurpose pin
US20210266832A1 (en) Wireless communication system, first wireless apparatus, second wireless apparatus and wireless communication method
JPS6113188B2 (en)
US20020096627A1 (en) Photoelectric switches
JP2828678B2 (en) Ultrasonic detector
KR102680044B1 (en) Optical transceiver using overlapping of signal processing pipelines corresponding to successive optical pulses
JPH06100651B2 (en) Ultrasonic switch
CN114623851B (en) Photoelectric sensor and control method thereof
US20240219529A1 (en) Lidar controlling method and apparatus, terminal device and computer-readable storage medium
JP7135898B2 (en) Sensor unit and function operation method
JP6111098B2 (en) Optical sensor
RU1837347C (en) Device for data receiving
JP2733943B2 (en) Disk index detector for optical disk drive
KR20240087881A (en) Image sensor based on single-photon avalanche diode and operating method there of
SU1159172A2 (en) Start-stop demodulator
SU884114A1 (en) Pulse duration discriminator
JPH0346597Y2 (en)
SU491220A1 (en) Device for separating recurrent sync signal
JPH11153666A (en) Prevention method for erroneous detection of ultrasonic sensor

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