One-master multi-slave power bus signal transmission method and device

文档序号:1057016 发布日期:2020-10-13 浏览:34次 中文

阅读说明:本技术 一种一主多从的电源总线信号传输方法及装置 (One-master multi-slave power bus signal transmission method and device ) 是由 王玄成 马霄宇 王雅萍 于 2020-09-02 设计创作,主要内容包括:本发明涉及电源总线通信技术领域,尤其是指一种一主多从的电源总线信号传输方法及装置,所述方法包括:发送通信控制指令至从机;接收从机按预设指令返回的对应等级的回码电流,所述预设指令包括在线应答、不同的数值区间及举手仲裁;根据回码电流的等级判断从机是否出现举手仲裁或数值区间异常;若是,则发送特定数据查询指令至出现举手仲裁或数值区间异常的从机,并接收该从机返回的数字信号。本发明通过在从机回信息的过程中用模拟量和数字量相结合的方式,有效解决了电源总线信号传输的效率和可靠性低,供电不稳定的问题。(The invention relates to the technical field of power bus communication, in particular to a method and a device for transmitting a power bus signal of one master and multiple slaves, wherein the method comprises the following steps: sending a communication control command to the slave; receiving a corresponding grade of return code current returned by a slave according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration; judging whether the slave machine has hand raising arbitration or abnormal numerical value interval according to the grade of the echo current; if yes, sending a specific data query instruction to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and receiving a digital signal returned by the slave machine. The invention effectively solves the problems of low efficiency and reliability of power bus signal transmission and unstable power supply by combining the analog quantity and the digital quantity in the slave loop information process.)

1. A method for transmitting a master-to-multiple slave power bus signal, comprising:

sending a communication control command to the slave;

receiving a return code current of a corresponding grade returned by a slave according to a preset instruction, wherein the preset instruction comprises an online response, different numerical value intervals and a hand-lifting arbitration, the slave on an online response finger bus replies to an inquiry instruction sent by a host, the hand-lifting arbitration finger can independently send a hand-lifting signal when the slave is abnormal and needs to communicate with the host, and the bus can quickly inquire and position the address of the hand-lifting signal after receiving the hand-lifting signal;

judging whether the slave machine has hand raising arbitration or abnormal numerical value interval according to the grade of the echo current;

if yes, sending a specific data query instruction to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and receiving a digital signal returned by the slave machine.

2. The method according to claim 1, wherein the communication control command is an online slave number search command, a slave status query command, or a slave data query command, wherein the online slave number search command corresponds to an online response, the slave status query command corresponds to a hands-off arbitration, and the slave data query command corresponds to different value ranges.

3. The method as claimed in claim 1, wherein the code current is divided into 16 levels, wherein level 1 to level 2 correspond to online responses, level 3 to level 14 correspond to different value ranges, and level 15 to level 16 correspond to hand-held arbitration.

4. The method of claim 1, wherein the code-return current is an analog of 1 pulse.

5. The method of claim 1, wherein the returned digital signal is 8 pulses.

6. A master-slave power bus signal transfer apparatus, comprising:

the sending module is used for sending a communication control command to the slave machines or sending a specific data query command to the slave machines with hand raising arbitration or abnormal numerical value intervals;

the receiving module is used for receiving the return code current of the slave machine at the corresponding grade returned according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration, and is also used for receiving a digital signal returned by the slave machine;

and the judging module is used for judging whether the slave machine has the hand raising arbitration or the numerical value interval abnormity according to the grade of the return code current.

Technical Field

The invention relates to the technical field of power bus communication, in particular to a method and a device for transmitting a power bus signal with one master and multiple slaves.

Background

The main multi-slave power bus product with the communication and power supply functions on the market at present is a transmitted digital signal, and specific digital information is transmitted in a waveform mode.

Disclosure of Invention

Aiming at the defects of the prior art, the invention provides a method and a device for transmitting a power bus signal with one master and multiple slaves, aiming at solving the problems of low efficiency and reliability of power bus signal transmission and unstable power supply.

In order to solve the technical problems, the invention adopts the following technical scheme:

in a first aspect, a method for transmitting a power bus signal of one master and multiple slaves is provided, which includes:

sending a communication control command to the slave;

receiving a corresponding grade of return code current returned by a slave according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration;

judging whether the slave machine has hand raising arbitration or abnormal numerical value interval according to the grade of the echo current;

if yes, sending a specific data query instruction to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and receiving a digital signal returned by the slave machine.

The communication control instruction is an online slave machine number retrieval instruction, a slave machine state query instruction or a slave machine data query instruction, wherein the online slave machine number retrieval instruction corresponds to online response, the slave machine state query instruction corresponds to holding arbitration, and the slave machine data query instruction corresponds to different numerical value intervals.

The code-returning current is divided into 16 grades, wherein grade 1 to grade 2 correspond to online response, grade 3 to grade 14 correspond to different numerical value intervals, and grade 15 to grade 16 correspond to hand-holding arbitration.

Wherein, the code-returning current is an analog quantity of 1 pulse.

Wherein the returned digital signal is 8 pulses.

In a second aspect, a master-multi-slave power bus signal transmission device is provided, which includes:

the sending module is used for sending a communication control command to the slave machines or sending a specific data query command to the slave machines with hand raising arbitration or abnormal numerical value intervals;

the receiving module is used for receiving the return code current of the slave machine at the corresponding grade returned according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration, and is also used for receiving a digital signal returned by the slave machine;

and the judging module is used for judging whether the slave machine has the hand raising arbitration or the numerical value interval abnormity according to the grade of the return code current.

The invention has the beneficial effects that:

the invention provides a method and a device for transmitting signals of a power bus with one master and multiple slaves, wherein the method comprises the following steps: sending a communication control command to the slave; receiving a corresponding grade of return code current returned by a slave according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration; judging whether the slave machine has hand raising arbitration or abnormal numerical value interval according to the grade of the echo current; if yes, a specific data query instruction is sent to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and the digital signal returned by the slave machine is received.

Drawings

The detailed structure of the invention is described in detail below with reference to the accompanying drawings

Fig. 1 is a flow chart of a method for transmitting a master-slave power bus signal according to an embodiment of the present invention;

fig. 2 is a diagram of slave echo current data structure according to an embodiment of the present invention;

FIG. 3 is an illustration of slave loop current level setting provided by an embodiment of the present invention;

FIG. 4 is a block diagram of a master-slave power bus signaling apparatus according to an embodiment of the present invention;

fig. 5 is a hardware connection diagram of a master-slave power bus signal transmission apparatus according to an embodiment of the present invention;

FIG. 6 is a diagram illustrating the physical level definition of a master-slave power bus signaling apparatus according to an embodiment of the present invention;

FIG. 7 is a diagram illustrating the definition of the digital signal bits 0 and 1 of a master multi-slave power bus signaling apparatus according to an embodiment of the present invention;

fig. 8 is a slave loop code pulse definition diagram of a master-slave power bus signal transmission apparatus according to an embodiment of the present invention.

Detailed Description

In order to explain technical contents, structural features, and objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

Referring to fig. 1, in a first aspect, a method for transmitting a power bus signal of a master multiple slaves is provided, including:

step S101, sending a communication control command to the slave.

And S102, receiving the return code current of the slave at the corresponding grade returned according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration. Specifically, the online response means that the slave on the bus replies to the query instruction sent by the host; the hand-lifting arbitration means that when the slave computer is abnormal and needs to communicate with the host computer, a hand-lifting signal can be sent out autonomously, and after the bus receives the hand-lifting signal, the bus can inquire and position the address of the hand-lifting signal quickly.

Step S103, judging whether the slave machine has the hand raising arbitration or the numerical value interval abnormity according to the grade of the return code current.

And step S104, if yes, sending a specific data query instruction to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and receiving a digital signal returned by the slave machine.

The invention has the beneficial effects that:

the invention provides a method and a device for transmitting signals of a power bus with one master and multiple slaves, wherein the method comprises the following steps: sending a communication control command to the slave; receiving a corresponding grade of return code current returned by a slave according to a preset instruction, wherein the preset instruction comprises online response, different numerical value intervals and hand raising arbitration; judging whether the slave machine has hand raising arbitration or abnormal numerical value interval according to the grade of the echo current; if yes, a specific data query instruction is sent to the slave machine with the hand raising arbitration or the abnormal numerical value interval, and the digital signal returned by the slave machine is received.

The communication control instruction is an online slave machine number retrieval instruction, a slave machine state query instruction or a slave machine data query instruction, wherein the online slave machine number retrieval instruction corresponds to online response, the slave machine state query instruction corresponds to holding arbitration, and the slave machine data query instruction corresponds to different numerical value intervals.

Specifically, as shown in fig. 2, when the communication control command is a slave status query command, the master allocates one bit to each slave, and the slave gives a presence response (level 1 or level 2 as agreed) according to its presence status. When the communication control command is a slave data query command, the master allocates one bit to each slave, and the slave replies different currents for data return according to the value interval acquired by the slave.

It should be noted that the communication control command is composed of three bytes, which are a control byte, an address byte, and a check code, and when the master sends the communication control command to the slaves, the return code current returned by each slave is an analog quantity of 1 pulse. When the host sends a specific data query command to the slave, the slave returns a digital quantity of 8 pulses to meet the requirement of higher numerical precision.

Further, referring to fig. 3, the code-return current is divided into 16 levels, wherein a level 1 to a level 2 correspond to online response, a level 3 to a level 14 correspond to different value intervals, and a level 15 to a level 16 correspond to hand-holding arbitration.

Wherein, the code-returning current is an analog quantity of 1 pulse.

Wherein the returned digital signal is 8 pulses.

Referring to fig. 4, fig. 4 is a block diagram of a power bus signaling apparatus with multiple masters and slaves according to an embodiment of the present invention, and a second aspect of the present invention provides a power bus signaling apparatus with multiple masters and slaves, including:

the sending module 10 is used for sending a communication control command to the slave machines or sending a specific data query command to the slave machines with hand raising arbitration or abnormal numerical value intervals;

the receiving module 20 is configured to receive a return code current of a corresponding level returned by the slave according to a preset instruction, where the preset instruction includes an online response, different value intervals and a hand raising arbitration, and is further configured to receive a digital signal returned by the slave;

and the judging module 30 is used for judging whether the slave machine has the hand raising arbitration or the numerical value interval abnormity according to the level of the return code current.

Referring to fig. 5, fig. 5 is a hardware connection diagram of a master-slave power bus signal transmission apparatus according to an embodiment of the present invention, which can implement the above-described master-slave power bus signal transmission method, and includes a master 100, two power buses 200 connected to the master 100, and a plurality of slaves 300 connected to the two power buses 200.

It is understood that the master 100 can control each slave 300 in real time, including scanning the online status of each slave 300 in real time and collecting data of each slave 300 in real time.

Wherein the two power buses 200 include a power communication line 210 and a ground line 220.

Wherein the number of the slave machines 300 is not more than 254.

Further, as shown in fig. 6, all the signals transmitted by the host 100 are digital signals, and three different levels are set during transmission: VH, VM1, VL, where VH is the main level of the power bus, VM1 is the M level sent by the host 100, VL is the 0 level, and the 0/1 signal sent by the host is distinguished by both.

The slave 300 replies in response to the signal sent by the master 100 at the level of VM1, and the slave replies with different currents as required for replying data, as shown in fig. 6, the interval from VM1 to VMn is the interval of bus voltage formed by replying with different currents.

Specifically, the digital signal bits 0 and 1 transmitted by the host 100 are defined as shown in fig. 7, and one byte is composed of 11 bits, which are a start code (0), an 8-bit data code, a parity code, and a stop code (1), respectively.

More specifically, as shown in fig. 8, the slave 300 returns the code level to VM, and the slave 300 starts to return the current signal when the bus level is VM.

The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种串口通讯协议的自动构建方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!