Light curtain detection method and device without special synchronization line

文档序号:1019343 发布日期:2020-10-27 浏览:21次 中文

阅读说明:本技术 一种无专用同步线的光幕检测方法及设备 (Light curtain detection method and device without special synchronization line ) 是由 张忠伟 李金鹏 董泉 于 2020-06-03 设计创作,主要内容包括:本发明涉及无同步线技术领域,具体涉及一种无专用同步线的光幕检测方法及设备,本发明用利用专用点灯顺序和点灯周期控制TX光幕发射光源,完成一轮点灯;点灯过程中,RX进行接收同步;若未同步,则RX接收选择头灯第一时间的周期连续采样;在持续N次有信号时,启动定时器,进入定时器后,进行ADC数据采集,并比对;若首次没有信号,第二次尾灯信号采集成功,则成功同步;否则其他任何方式均同步失败;若同步成功,按照采集的信号计算状态,同步若失败且超时,直接判断为被遮挡状态,最后根据光幕状态输出结果;输出后,光幕重复上述步骤。本发明方法简单,并能减少线缆芯数和同步线的抗干扰和防护电路,降低成本,且性能与同步线的光幕一致。(The invention relates to the technical field of asynchronous lines, in particular to a light curtain detection method and a device without a special synchronous line, wherein a TX light curtain emission light source is controlled by utilizing a special lighting sequence and a lighting period to finish a round of lighting; in the lighting process, RX carries out receiving synchronization; if not, RX receives a periodic continuous sampling of the first time of the selected headlamp; starting a timer when signals exist for N times continuously, and performing ADC data acquisition and comparison after entering the timer; if no signal exists for the first time and the acquisition of the tail lamp signal for the second time is successful, the synchronization is successful; otherwise, any other mode fails to synchronize; if the synchronization is successful, calculating the state according to the acquired signals, if the synchronization is failed and is overtime, directly judging the state as a shielded state, and finally outputting a result according to the state of the light curtain; after output, the light curtain repeats the above steps. The method is simple, can reduce the number of cable cores and anti-interference and protection circuits of the synchronous line, reduces the cost, and has the performance consistent with that of the light curtain of the synchronous line.)

1. A light curtain detection method without a special synchronization line is characterized by comprising the following steps:

s1, controlling the emission light source of the TX light curtain by using the special lighting sequence and the lighting period to finish a round of lighting;

in the lighting process of S2, RX performs receiving synchronization;

s3, if not synchronous, RX receives continuous sampling of the first time period of the selected headlamp, and according to the lighting period, M ADC data judgment signals are acquired every time, wherein M is a positive integer;

s4, when signals exist for N times continuously, starting a timer, carrying out ADC data acquisition after entering the timer for the first time and the period of the subsequent third time, and comparing, wherein N is a positive integer;

s5, if there is no signal for the first time, the signal of the tail lamp is successfully collected for the second time, then the synchronization is successful; otherwise, any other mode fails to synchronize;

s6, if the synchronization is successful, namely RX selects a receiving lamp to collect a round of signals according to a preset sequence and time, the state is calculated according to the collected signals, if the synchronization fails and is overtime, the receiving lamp is directly judged to be in a shielded state, and finally a result is output according to the state of a light curtain;

after the output of S7, the light curtain repeats the above steps.

2. The light curtain detection method without the special synchronization line according to claim 1, wherein the value of M is between 1 and 10, the value of N is between 3 and 20, the first time is between 1 and 20 μ s, the second time is between 300 and 1ms, and the third time is between 500 and 5 ms.

3. The method for detecting light curtain without dedicated synchronization line as claimed in claim 1, wherein the dedicated lighting sequence and lighting period in S1 includes: each lamp was 1ms with 400 μ s at rest and 600 μ s lit repeatedly at a period of 10 μ s lit and 20 μ s out.

4. The method as claimed in claim 3, wherein 3ms before each turn of lighting is a headlight, a non-lighting lamp and a taillight, and a little time is left for receiving the calculation after the end of one turn of lighting.

5. The method as claimed in claim 1, wherein a synchronization timeout period of 5ms is set, and if the synchronization fails and times out, the light curtain is directly determined to be blocked and outputted.

6. A light curtain detection device without a dedicated synchronization line, said device being adapted to implement the method according to any of claims 1 to 5,

comprising execution instructions which, when executed by a processor of an electronic device, cause the electronic device to perform the method of any of claims 1-5;

comprising a processor and a memory storing execution instructions, the processor performing the method of any one of claims 1-5 when the processor executes the execution instructions stored by the memory.

Technical Field

The invention relates to the technical field of asynchronous lines, in particular to a light curtain detection method and device without a special synchronous line.

Background

The light curtain of the dedicated synchronization line is more on the market, but there are many defects, such as one of the disadvantages includes: the light curtain transmission and reception must have a synchronous line connection and the connection cables must be merged. Resulting in long cables, high damage rate, high cost, etc.

There are also some light curtains without dedicated synchronization lines, and likewise, there are some drawbacks, such as: the method is relatively complex; the cost is higher because the light curtain ratio of the synchronous line needs some special hardware support; or a light curtain that is weaker in performance than the synchronization line.

Disclosure of Invention

Aiming at the defects of the prior art, the invention discloses a light curtain detection method and device without a special synchronization line, which are used for solving the problems that the emission and the reception of the light curtain of the traditional synchronization line are necessarily connected by a synchronization line, connecting cables are necessarily converged, and the method is relatively complex; the cost is higher because the light curtain ratio of the synchronous line needs some special hardware support; or a light curtain that is weaker in performance than the synchronization line.

The invention is realized by the following technical scheme:

in a first aspect, the present invention discloses a light curtain detection method without a dedicated synchronization line, wherein the method comprises the following steps:

s1, controlling the emission light source of the TX light curtain by using the special lighting sequence and the lighting period to finish a round of lighting;

in the lighting process of S2, RX performs receiving synchronization;

s3, if not synchronous, RX receives continuous sampling of the first time period of the selected headlamp, and according to the lighting period, M ADC data judgment signals are acquired every time, wherein M is a positive integer;

s4, when signals exist for N times continuously, starting a timer, carrying out ADC data acquisition after entering the timer for the first time and the period of the subsequent third time, and comparing, wherein N is a positive integer;

s5, if there is no signal for the first time, the signal of the tail lamp is successfully collected for the second time, then the synchronization is successful; otherwise, any other mode fails to synchronize;

s6, if the synchronization is successful, namely RX selects a receiving lamp to collect a round of signals according to a preset sequence and time, the state is calculated according to the collected signals, if the synchronization fails and is overtime, the receiving lamp is directly judged to be in a shielded state, and finally a result is output according to the state of a light curtain;

after the output of S7, the light curtain repeats the above steps.

Furthermore, the value of M is between 1 and 10, the value of N is between 3 and 20, the first time is between 1 and 20 mus, the second time is between 300 and 1ms, and the third time is between 500 and 5 ms.

Further, the dedicated lighting sequence and lighting period in S1 is 1ms for each lamp, where 400 μ S is at rest and 600 μ S is repeatedly lighted up at a period of 10 μ S and 20 μ S.

Furthermore, 3ms before each turn of lighting is respectively the head lamp, the unlit lamp and the tail lamp, and after one turn of lighting is finished, a little time is left for the receiving calculation state.

Furthermore, a synchronization timeout time of 5ms is set, and if synchronization fails and is overtime, the user is directly judged to be blocked and output.

In a second aspect, the present invention discloses a light curtain detection device without a dedicated synchronization line, said device being adapted to implement the method of the first aspect,

comprises execution instructions which, when executed by a processor of an electronic device, cause the electronic device to perform the method of the first aspect;

comprising a processor and a memory storing execution instructions, the processor performing the method of the first aspect when the processor executes the execution instructions stored in the memory.

The invention has the beneficial effects that:

the invention receives signals collected by a rule process, and when the signals match the special lighting sequence, the synchronization is completed. And then, signal acquisition of all light beams is completed according to a specified period and sequence, the method is simple, hardware is economical, the number of cable cores and anti-interference and protection circuits of the synchronous line can be reduced, the cost is reduced, and the performance is consistent with that of a light curtain of the synchronous line.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a schematic diagram of an emission lighting in accordance with an embodiment of the present invention;

FIG. 2 is a diagram illustrating successful synchronization acceptance according to an embodiment of the present invention;

fig. 3 is a diagram illustrating synchronization failure according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种码盘、编码器及组装方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类