Method for synchronizing display elements in a control system for automated control of a technical installation
09715474 ยท 2017-07-25
Assignee
Inventors
- Thorsten GODAU (OSTFILDERN, DE)
- Christian Adams (Ostfildern, DE)
- Reinhard SPERRER (OSTFILDERN, DE)
- Dietmar Seizinger (Ostfildern, DE)
Cpc classification
G05B2219/23172
PHYSICS
International classification
Abstract
A method for synchronizing display elements of a plurality of subscribers of a distributed, bus-based control system is proposed. The subscribers comprise a message transmitter and a plurality of message receivers. The message receivers each comprise a respective display element, which can be toggled between a switched-on state and a switched-off state, and a control unit for producing a control signal for toggling the display element from one state to the other. The message transmitter sends a respective current bus message via the bus in defined recurring bus message time intervals. The respective bus message comprises a bus message counter that has a respective value from a defined value range. The counter value is changed in a predefined manner each time when a current bus message is sent. The message receivers receive the respective bus messages via the bus. The control units each evaluate the respective bus message counter in the same manner and take this as a basis for producing the control signal, so that the display elements are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period.
Claims
1. A method for operating a control system having subscribers connected via a bus, said subscribers comprising a message transmitter and a first and a second message receiver, wherein the first and second message receivers each comprise a display element, which can be toggled between a switched-on state and a switched-off state, and wherein the first and second message receivers each comprise a control unit for producing a control signal that toggles the display element between the switched-on state and the switched-off state; the method including steps for synchronizing the display elements of said first and second message receivers, wherein the message transmitter cyclically sends a respective bus message via the bus in defined recurring bus message time intervals, the respective bus message comprising a bus message counter that has a respective value from a defined value range, the message transmitter changes the value in a predefined manner for each respective bus message to be sent, with the value being reset when the end of the value range is reached, the first and second message receivers each receive the respective bus message via the bus, and the control units in each of the first and second message receivers evaluate the bus message counter and take this as a basis for producing the control signal, so that the display elements of the first and second message receivers are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period that is a function of the bus message counter; wherein the first and second message receivers each store at least one of the bus message time interval, the defined value range, a desired on/off period and a desired duty ratio for toggling the display element.
2. The method of claim 1, wherein the control unit of the first message receiver evaluates the bus message counter using a first algorithm and the control unit of the second message receiver evaluates the bus message counter using a second algorithm, the first and second algorithms being the same.
3. The method of claim 1, wherein the control unit of at least one message receiver evaluates the bus message counter by means of integer division.
4. The method of claim 1, wherein the control unit evaluates the respective bus message counter using a modulo operation in order to determine a toggling threshold.
5. The method of claim 1, wherein the defined on/off period indicates an operating state of the control system.
6. The method of claim 5, wherein the operating state is an error state.
7. The method of claim 1, further comprising the steps of: defining a first set of first and second message receivers and toggling the display elements of said first set of first and second message receivers in sync with one another using a first defined on/off period, and defining a second set of first and second message receivers and toggling the display elements of said second set of first and second message receivers in sync with one another using a second defined on/off period.
8. A method for operating a control system having subscribers connected via a bus, said subscribers comprising a message transmitter and a first and a second message receiver, wherein the first and second message receivers each comprise a display element, which can be toggled between a switched-on state and a switched-off state, and wherein the first and second message receivers each comprise a control unit for producing a control signal that toggles the display element between the switched-on state and the switched-off state; the method including steps for synchronizing the display elements of said first and second message receivers, wherein the message transmitter cyclically sends a respective bus message via the bus in defined recurring bus message time intervals, the respective bus message comprising a bus message counter that has a respective value from a defined value range, the message transmitter changes the value in a predefined manner for each respective bus message to be sent, with the value being reset when the end of the value range is reached, the first and second message receivers each receive the respective bus message via the bus, and the control units in each of the first and second message receivers evaluate the bus message counter and take this as a basis for producing the control signal, so that the display elements of the first and second message receivers are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period that is a function of the bus message counter; wherein the control unit of at least one message receiver counts the respective number of bus messages within a defined period of time and uses this number and the defined period of time to ascertain the bus message time interval.
9. A method for operating a control system having subscribers connected via a bus, said subscribers comprising a message transmitter and a first and a second message receiver, wherein the first and second message receivers each comprise a display element, which can be toggled between a switched-on state and a switched-off state, and wherein the first and second message receivers each comprise a control unit for producing a control signal that toggles the display element between the switched-on state and the switched-off state; the method including steps for synchronizing the display elements of said first and second message receivers, wherein the message transmitter cyclically sends a respective bus message via the bus in defined recurring bus message time intervals, the respective bus message comprising a bus message counter that has a respective value from a defined value range, the message transmitter changes the value in a predefined manner for each respective bus message to be sent, with the value being reset when the end of the value range is reached, the first and second message receivers each receive the respective bus message via the bus, and the control units in each of the first and second message receivers evaluate the bus message counter and take this as a basis for producing the control signal, so that the display elements of the first and second message receivers are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period that is a function of the bus message counter; wherein the control unit of at least one message receiver ascertains a product of the value range and a desired duty ratio in order to determine a toggling threshold.
10. A method for operating a control system having subscribers connected via a bus, said subscribers comprising a message transmitter and a first and a second message receiver, wherein the first and second message receivers each comprise a display element, which can be toggled between a switched-on state and a switched-off state, and wherein the first and second message receivers each comprise a control unit for producing a control signal that toggles the display element between the switched-on state and the switched-off state; the method including steps for synchronizing the display elements of said first and second message receivers, wherein the message transmitter cyclically sends a respective bus message via the bus in defined recurring bus message time intervals, the respective bus message comprising a bus message counter that has a respective value from a defined value range, the message transmitter changes the value in a predefined manner for each respective bus message to be sent, with the value being reset when the end of the value range is reached, the first and second message receivers each receive the respective bus message via the bus, and the control units in each of the first and second message receivers evaluate the bus message counter and take this as a basis for producing the control signal, so that the display elements of the first and second message receivers are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period that is a function of the bus message counter; wherein the control unit of at least one message receiver ascertains a product of the value range and the bus message time interval in order to determine a value range period, and wherein the control unit of said at least one message receiver selects the defined on/off period such that the value range period is an integer multiple of the defined on/off period.
11. A method for operating a control system having subscribers connected via a bus, said subscribers comprising a message transmitter and a first and a second message receiver, wherein the first and second message receivers each comprise a display element, which can be toggled between a switched-on state and a switched-off state, and wherein the first and second message receivers each comprise a control unit for producing a control signal that toggles the display element between the switched-on state and the switched-off state; the method including steps for synchronizing the display elements of said first and second message receivers, wherein the message transmitter cyclically sends a respective bus message via the bus in defined recurring bus message time intervals, the respective bus message comprising a bus message counter that has a respective value from a defined value range, the message transmitter changes the value in a predefined manner for each respective bus message to be sent, with the value being reset when the end of the value range is reached, the first and second message receivers each receive the respective bus message via the bus, and the control units in each of the first and second message receivers evaluate the bus message counter and take this as a basis for producing the control signal, so that the display elements of the first and second message receivers are toggled between the switched-on state and the switched-off state in sync with one another and with a defined on/off period that is a function of the bus message counter; wherein the control unit of at least one message receiver ascertains a product of the value range and the bus message time interval in order to determine a value range period, ascertains a quotient of value range period and a desired on/off period, and performs integer rounding of said quotient in order to determine a toggling threshold.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Exemplary embodiments of the invention are shown in the drawings and are explained in more detail in the description that follows. In the drawings:
(2)
(3)
(4)
(5)
(6)
(7)
DESCRIPTION OF PREFERRED EMBODIMENTS
(8)
(9) In this case, the control system 10 is a modular control system that is used for the automated control of a technical installation. By way of example, the technical installation is a production line of an automobile manufacturer, a conveyor belt at an airport or another installation whose operation gives rise to a danger to people in the surroundings of the installation. In the preferred exemplary embodiments, the control system is capable of controlling safety-relevant functions and standard functions. The latter are functions that relate to the normal operating cycle of the installation. The former are functions that are used primarily to avoid accidents and injuries as a result of the operation of the installation. In principle, the novel method and the corresponding bus message receiver can also be used in other control systems, however, particularly controllers that control exclusively normal operating functions of an installation, or in pure safety controllers that control exclusively safety functions.
(10) The control system 10 comprises a plurality of subscribers connected via a bus 25. The subscribers comprise at least one message transmitter 12 and a number of message receivers 18a, 18b, . . . , 18n. To simplify matters, only the first message receiver 18a and the second message receiver 18b will now be discussed. Each message receiver 18a, 18b comprises a display element 15a, 15b that can be toggled between a switched-on state and a switched-off state. In other words, the first message receiver comprises a first display element 15a and the second message receiver 18b comprises a second display element 15b. Each message receiver 18a, 18b additionally comprises a control unit 20a, 20b for producing a control signal that toggles the display element 15a, 15b between the states. In other words, the first message receiver 18a comprises a first control unit 20a and the second message receiver 18b comprises a second control unit 20b. The control signal produced by the control unit switches the display element 15 either from the switched-on state to the switched-off state or from the switched-off state to the switched-on state. This control signal therefore switches the display element 15a, 15b on or off. By way of example, it is possible to use a current or energy source and a switching element (e.g. transistor) connected thereto that is controlled by the control signal. In the switched-on state, the display element then carries a current and emits light, whereas in the switched-off state it carries no current and therefore does not emit light. However, it is also possible to use any other known and suitable type of actuation for a display element.
(11) In the preferred exemplary embodiment, the display element 15a, 15b is a light-emitting diode (LED). This allows a simple and inexpensive diagnosis option. Alternatively, the display element may also be any other type of display element that can be put into a switched-on state and a switched-off state, or can twinkle and/or flash, at alternate times, however, for example another type of illuminant.
(12) The defined on/off period T.sub.ea that is used to toggle each display element 15 between the switched-on and switched-off states indicates an existing operating state in the control system 10, particularly an error state in the control system. The defined on/off period is therefore an indicator of a determined operating state in the control system 10. By way of example, the user can perform a simple first-level diagnosis by observing the display elements 15 that twinkle or flash in sync with one another. It is naturally also possible for a plurality of modes of operation to be indicated simultaneously. By way of example, the first on/off period may be a twinkle period and the second on/off period may be a flash period. By way of example, a set of message receivers can twinkle or flash using a first defined on/off period and a second set of message receivers can twinkle or flash using a second defined on/off period. The first on/off period and the second on/off period indicate different modes of operation in this case.
(13)
(14) Returning to
(15) In the exemplary embodiment of
(16) In a preferred exemplary embodiment, the I/O units 18 are electrically and mechanically connected to the header portion 12, as shown in simplified form in
(17) Each I/O unit 18 has an aforementioned control unit 20 that is implemented by means of a microcontroller, for example. Instead of a microcontroller, the control unit 20 may be implemented as an ASIC, as an FPGA, using more powerful microprocessors or using other logic chips (e.g. CPLD).
(18) The control unit 20 is designed to evaluate the bus message counter in the current bus message and to take this as a basis for producing the control signal. In other words, the first control unit 20a is designed to evaluate the bus message counter in the current bus message and to take this as a basis for producing a first control signal for the first display element 15a, and the second control unit 20a is designed to evaluate the bus message counter in the current bus message and to take this as a basis for producing a second control signal for the second display element 15b. The evaluation is performed in the same manner in this case.
(19) In particular, each control unit 20a, 20b has a control algorithm (also called control logic or control program) implemented therein. This control algorithm is used to evaluate the bus message counter. The control algorithm in each of the control units 20a, 20b is the same. In other words, the first control unit 20a of the first message receiver 18a evaluates the bus message counter using a first control algorithm, and the control unit 20b of the second message receiver 18b evaluates the bus message counter using a second control algorithm, the first and second control algorithms being the same. On the basis of the result of the evaluation or of the control algorithm, the control signal for controlling the relevant display element 15a, 15b is then produced. The control signal for controlling the first display element 15a and the control signal for controlling the second display element 15b are produced at more or less the same time. Hence, the first display element 15a and the second display element 15b are put into the same state (switched-on or switched-off state) at the same time. The first display element 15a and the second display element 15b are thus toggled between the switched-on and switched-off states in sync with one another using the defined on/off period T.sub.ea. In other words, the display elements 15a, 15b twinkle or flash. This will be explained in more detail below with reference to
(20) In order to implement a plurality of modes of operation, the first and second message receivers 15a, 15b, i.e. a first set of message receivers, may have stored a first desired on/off period and/or a first desired duty ratio and use a first control algorithm that is the same, and a third and a fourth message receiver, i.e. a second set of message receivers, may have stored a second desired on/off period and/or a second duty ratio. In order to achieve a first on/off period and a second, different on/off period, for example, the first and second message receivers can store a first desired on/off period and use a first control algorithm that is the same and the third and fourth message receivers can store a second desired on/off period and use a second control algorithm that is the same.
(21) Furthermore, in the present exemplary embodiment, each I/O unit 18 additionally has a communication unit 22 (also called bus interface). By way of example, the communication unit may be implemented as an FPGA. Alternatively, the communication unit may be implemented as a microcontroller, as an ASIC, using more powerful microprocessors or using other logic chips (e.g. CPLD). In principle, it is possible for the communication unit 22 and the control unit 20 to be integrated to form a common communication and control unit and/or for the function of the communication unit 22 to be implemented by means of suitable programming of a microcontroller.
(22) The header portion 12 and the I/O units 18 are connected to one another via the aforementioned bus 25. The message transmitter or the header portion 12 is designed to send a respective current bus message via the bus 25 in a defined recurring bus message time interval T.sub.Bus. There is thus cyclic sending of the bus messages or cyclic bus communication, in the case of which the bus message time intervals are constant.
(23) Each bus message comprises a bus message counter. By way of example, each bus message may comprise header data (also called header) and process data. By way of example, the bus message counter may be part of the header data. The bus message counter has a value Z from a defined value range W. Whenever a current bus message is sent, the message transmitter or the header portion 12 alters the value Z in a predefined manner. When the end of the value range is reached, the value Z is reset.
(24) Each message receiver or I/O unit 18a, 18b receives the sent bus messages via the bus 25. The control unit 20a of the first message receiver 20a and the control unit 20b of the second message receiver 18b receive the bus message counter in the current bus message at more or less the same time. In the exemplary embodiment of
(25) In the exemplary embodiment shown in
(26) The novel method or the novel control system is not limited to the ring-shaped bus shown here. It can likewise be used with other bus topologies, for example with a simple point-to-point connection, in a star topology, in a tree topology or in a linear topology.
(27) Each message receiver 18 may have a memory that stores the parameters of the defined bus message time interval T.sub.Bus and the defined value range W. The memory of the message receiver may also store the parameters of a desired on/off period T*.sub.ea and/or a desired duty ratio V* (particularly less than or equal to one). The duty ratio V* is the duration of the switched-on state in relation to the on/off period. The parameters may be hard coded or can be stored when the message receiver 18 is initialized, particularly prior to operation of the bus communication. By way of example, the defined bus message time interval T.sub.Bus and the defined value range W can be received from the message transmitter 12 via the bus 25. Alternatively, each message receiver 18 or the control unit 20 thereof can also ascertain the bus message time interval T.sub.Bus itself, however, by virtue of the control unit 20 counting the number of bus message counters in a defined period of time and then using said number and the defined period of time to ascertain the bus message time interval T.sub.Bus.
(28) In this case, each communication unit 22 has a further output 34 in which the communication unit 22 provides data for the control unit 20. In particular, the communication unit 22 can thus provide the control unit 20 with the bus messages having the bus message counter. The output 34 may be a register or memory area or a logical data transfer point in a schedule if the communication unit 22 is integrated in the control unit 20.
(29) The control unit 20 can be used not only to produce the control signal for the display element. The control unit 20 can additionally send data to the communication unit 22. The communication unit 22 can receive the data from the control unit 20 and integrate them into the serial datastream that is sent via the output 28 of the next communication unit. Accordingly, the output 34 may be a bidirectional input and output interface.
(30) Each I/O unit 18 has a plurality of ports 38 to which sensors and/or actuators can be connected. By way of example, a protective door switch 40, a light grid 42, an emergency off pushbutton switch 44 and two contactors 46a, 46b are shown in this case. The contactors 46a, 46b can be used via the control system 10 to interrupt the supply of power to an electric motor 48, for example if the protective door sensor 40 signals that a protective door has been opened. The sensors 40, 42, 44 and actuators 46, 48 are shown by way of example in this case. In practice, further sensors and/or actuators may be connected to the control system 10, for example rotation speed sensors, temperature sensors, position sensors or solenoid valves. The control unit 20 may be connected to the ports 38 such that data that represent a respective current state of the sensors and/or actuators are produced.
(31) The evaluation and control unit 14 of the header portion 12 can collect the data that represent a respective current state of the sensors and actuators via the I/O units 18 in the cyclically recurring bus message time intervals. The evaluation and control unit 14 can then process the collected data and take this as a basis for producing further data that are transmitted to the control units 20 of the I/O units 18. By way of example, the further data may contain a control command that results in the supply of power for the motor 48 being interrupted by means of the contactors 46. Furthermore, the data may contain information that relates to a current state of the I/O units themselves, particularly diagnosis information and/or configuration information.
(32) Besides the internal communication link to the I/O units 18, the control system 10 may also an external communication link, which is shown in simplified form in
(33)
(34) As can be seen in
(35) As can be seen from the comparison of
(36) In the exemplary embodiment of
(37) In the exemplary embodiment of
(38) In each of the exemplary embodiments of
(39) In the exemplary embodiment of
(40) If the value range period T.sub.W is divisible by the on/off period T.sub.ea precisely once (without remainder), as shown in the exemplary embodiment of
U=W.Math.V*.
(41) By way of example, this evaluation or the control algorithm can be described by means of the following pseudo code:
(42) TABLE-US-00001 If (LED == target_twinkling) { If (Z% W < U) { LED = on } else { LED = off } }
(43) Alternatively, the bus message counter can also simply be compared with a defined changeover limit U, and the control signal is produced if the bus message counter reaches or is above or below the defined changeover limit U.
(44) In the exemplary embodiment of
(45) In the exemplary embodiment of
(46) For a better understanding, there now follows a specific example of the evaluation of the bus message counter or the control algorithm with reference to the example of
(47) W=65 536
(48) V*.sub.twinkle=
(49) V*.sub.flash=.
(50) For an implementation in a control unit or a processor with and without floating point computation, the following calculation would be performed:
U.sub.twinkle=W.Math.V*.sub.twinkle=65 536.Math.=32 768
U.sub.flash=W.Math.V*.sub.flash=65 536.Math.=13 107.2 (with floating point computation) or 13 107 (without floating point computation).
(51) The value Z ranges from 0 to W1, i.e. in this case 65 535, and is incremented by one each time. Accordingly, on the basis of the pseudo code indicated above, the result of the modulo Z % W also ranges from 0 to 65 535. While Z % W (i.e. Z % 65 536) is less than U (i.e. in this case 32 768 for twinkling), the display element or the LED is switched on. This is denoted in a pseudo code by the signal LED=on, which indicates the switched-on state. As soon as the modulo Z % W becomes equal to or greater than the changeover limit U (i.e. in this case 32 768 for twinkling), the display element or the LED is switched off. This is denoted in the pseudo code by the signal LED=off, which indicates the switched-off state. The control signal S.sub.ea, which takes the display element from the switched-on state to the switched-off state, is thus produced in this case when the signal changes (from LED=on to LED=off).
(52) In contrast to
(53) If the value range period T.sub.W is divisible by the on/off period T.sub.ea multiple times (without remainder), as shown in the exemplary embodiment of
T.sub.W=W.Math.T.sub.bus
F=round(T.sub.W/T*.sub.ea)
for a processor with floating point computation, or
F=(T.sub.W+T*.sub.ea/2)/T*.sub.ea
for a processor without floating point computation.
(54) As mentioned previously, the changeover limit is also ascertained as the product of the value range W and the desired duty ratio V*:
U=W.Math.V*.
(55) The modulo from the value Z of the bus message counter and the quotient of value range W and scaling factor F is then compared with the quotient of defined changeover limit U and scaling factor F. The control signal is produced if the modulo reaches or is above or below the quotient of defined changeover limit U and scaling factor F.
(56) By way of example, this evaluation or the control algorithm can be described using the following pseudo code:
(57) TABLE-US-00002 If (LED == target_twinkle) { If (Z% (W/F) < (U/F)) { LED = on } else { LED = off } }
(58) As can be seen in this pseudo code, any evaluation prompts the production of a signal (LED=on or LED=off) that indicates the switched-on or switched-off state of the display element. The control signal S.sub.ea or S.sub.ae will be produced when the signal changes. As can be seen in
(59) In the exemplary embodiment of
(60) In the exemplary embodiment of
(61) The percentage discrepancy A (indicated in percent %) in the actual on/off period T.sub.ea from the desired on/off period T*.sub.ea that arises as a result of the integer division can be calculated as follows:
=[((T.sub.W/F)T*.sub.ea).Math.100]/T*.sub.ea.
(62) This discrepancy can be minimized by a relatively involved method. This can be achieved by customizing the value range, for example by virtue of manual zeroing if a particular value of the bus message counter is exceeded. In particular, the new value range may be smaller than the value range stipulated by the magnitude of the bus message counter in the bus message. In this case, the new value range can be chosen such that for the scaling factor F, if calculated as a floating point number, a value without a division remainder is always obtained. The new value range or the overflow value needs to be explicitly communicated to the message receivers in this case. Purely by way of example, the magnitude of the bus message counter may be 16 bits, which means that a value range of 65 536 is obtained, with the bus message counter ranging from 0 to 65 535, i.e. if the value 65 535 is incremented the value is set to 0. Manual zeroing can then be effected by virtue of the value range being only 10 000, for example, i.e. 10 000 different values. In this case, the value is set to 0 manually when the value 9999 is incremented.
(63) The value range W can be matched to the bus message time interval T.sub.Bus. By way of example, the value range or the magnitude of the bus message counter can be increased or reduced. By way of example, for a very short bus message time interval T.sub.Bus and/or a relatively long on/off period T.sub.ea, the magnitude of the bus message counter can be increased (e.g. from 16 bits to 32 bits), particularly no later than when the on/off period T.sub.ea becomes longer than the value range period T.sub.W.
(64) By way of example, the value range can be chosen such that the value range period T.sub.W is greater than or at least equal to the on/off period T.sub.ea. In particular, in order to cover a determined time range for the bus message time interval (e.g. between 63 s and 10 ms), the value range W can be chosen such that the value range period T.sub.W is always greater than or at least equal to the on/off period T.sub.ea. By way of example, in the case of a bus message time interval T.sub.bus of 32 s and in order to implement an on/off period T.sub.ea of 1 s (1 000 000 s), the value range would need to be at least 31 250, i.e. the magnitude of the bus message counter must be at least 15 bits (corresponds to a value range of 32 768).
(65) For a better understanding, there now follows specific examples of the evaluation of the bus message counter or the control algorithm with reference to the example of
Example 1
(66) There follows a first example with a very short bus message time interval T.sub.bus. The following parameter values are assumed:
(67) W=65 536
(68) T.sub.Bus=63 s
(69) V*.sub.twinkle=
(70) V*.sub.flash=
(71) T*.sub.ea=1 000 000 s=1 s
(72) A processor with floating point computation then performs the following calculations:
T.sub.W=W.Math.T.sub.bus=65 536.Math.63 s=4 128 768 s
F=round(T.sub.W/T*.sub.ea)=round(4 128 768 s/1 000 000 s)=round(4 128 768)=4
U.sub.twinkle=round(W.Math.V*.sub.twinkle)=round(65 536.Math.)=32 768
U.sub.flash=round(W.Math.V*.sub.flash)=round(65 536.Math.)=13 107
(73) By contrast, a processor without floating point computation performs the following calculations:
T.sub.W=W.Math.T.sub.bus=65 536.Math.63 s=4 128 768 s
F=(T.sub.W+T.sub.ea/2)/T*.sub.ea=(4 128 768 s+1 000 000 s/2)/1 000 000 s=(4 128 768 s+500 000 s)/1 000 000 s=4 628 768 s/1 000 000 s=4
U.sub.twinkle=W.Math.V*.sub.twinkle=65 536/2=32 768
U.sub.flash=W.Math.V*.sub.flash=65 536/5=13 107
(74) The following pseudo code is obtained for the first example:
(75) TABLE-US-00003 If (LED == target_twinkle) { If ((Z% 16 384) < 8192) { LED = on } else { LED = off } } If (LED == target_flash) { If ((Z% 16 384) < 3276) { LED = on } else { LED = off } }
(76) For this first example, the following is therefore obtained for the percentage discrepancy:
%=[((4 128 768 s/4)1 000 000 s)*100]/1 000 000 s=3.2%
(77) The discrepancy in the actual twinkling/flashing from the desired twinkling/flashing is small in this case, since the division remainders are distributed over very many bus message time intervals or bus cycles.
Example 2
(78) There follows a second example with a very long bus message time interval T.sub.Bus. The following parameter values are assumed:
(79) W=65 536
(80) T.sub.Bus=10 000 s
(81) V*.sub.twinkle=
(82) V*.sub.flash=
(83) T*.sub.ea=1 000 000 s=1 s
(84) A processor without floating point computation performs the following calculations:
T.sub.W=W.Math.T.sub.bus=65 536.Math.10 000 s=655 360 000 s
F=(T.sub.W+T*.sub.ea/2)/T*.sub.ea=(655 360 000 s+500 000 s)/1 000 000 s=655
U.sub.twinkle=W.Math.V*.sub.twinkle=65 536/2=32 768
U.sub.flash=W.Math.V*.sub.flash=65 536/5=13 107
(85) The following pseudo code is obtained:
(86) TABLE-US-00004 If (LED == target_twinkle) { If ((Z% 100) < 50) { LED = on } else { LED = off } } If (LED == target_flash) { If ((Z% 100) < 20) { LED = on } else { LED = off } }
(87) For this second example, the following is therefore obtained for the percentage discrepancy:
%=[((655 360 000 s/655)1 000 000 s)*100]/1 000 000 s=0.055%
(88) The discrepancy in the actual twinkling/flashing from the desired twinkling/flashing is small in this case, since the division remainders are distributed over very many bus message time intervals or bus cycles, on account of the very slow or long bus message time interval.
(89) A problem becomes clear in this example in as much as the last values of the value range can be left over or there may be a remainder. In this example, 655 on/off periods fit into a value range period, but at the end there are 36 values or bus cycles left over that cannot be distributed. As is evident from the pseudo code, the display element or LED would be switched on for 36-10 ms and would remain switched on when a new value range period begins. This could result in synchronous hiccupping in all display elements or LEDs after approximately 10 minutes. This problem could be avoided by matching the value range to 65 500.
Example 3
(90) The third example, below, shows the greatest possible discrepancy. By way of example, this is the case if a remainder of .Math.T*.sub.ea were to be obtained for the division or the quotient of the value range period T.sub.W by the desired on/off period T*.sub.ea. In the present specific example, the greatest possible discrepancy would be obtained when the value range period T.sub.W is in the range around 4.5 s for a desired on/off period of 1 s. This will be the case, during the constant value range, with a bus message time interval T.sub.bus of approximately 69 s. Therefore, the following parameter values are assumed:
(91) W=65 536
(92) T.sub.Bus=69 s
(93) V*.sub.twinkle=
(94) V*.sub.flash=
(95) T*.sub.ea=1 000 000 s=1 s
(96) A processor without floating point computation then performs the following calculations:
T.sub.W=W.Math.T.sub.bus=65 536.Math.69 s=4 521 984 s
F=(T.sub.W+T*.sub.ea/2)/T*.sub.ea=(4 521 984 s+500 000 s)/1 000 000 s=5
U.sub.twinkle=W.Math.V*.sub.twinkle=65 536/2=32 768
U.sub.flash=W.Math.V*.sub.flash=65 536/5=13 107
(97) The following pseudo code is obtained:
(98) TABLE-US-00005 If (LED == target_twinkle) { If ((Z% 13 107) < 8192) { LED = on } else { LED = off } } If (LED == target_flash) { If ((Z% 13 107) < 3276) { LED = on } else { LED = off } }
(99) For the example above, the following is therefore obtained for the percentage discrepancy:
%=[((4 521 984 s/5)1 000 000 s)*100]/1 000 000 s=9.56%
(100) In this case, the actual on/off period T.sub.ea is thus approximately 904 ms instead of the value 1000 ms of the desired on/off period T*.sub.ea. Such a small discrepancy is not really of any consequence, however.
Example 4
(101) In order to provide a little clarification for the substantive matter with the discrepancy again, the limit of the value range period T.sub.W, in this specific case the limit of 4.5 s, is yet to be approached from the bottom. The following parameter values are assumed:
(102) W=65 536
(103) T.sub.Bus=68 s
(104) V*.sub.twinkle=
(105) V*.sub.flash=
(106) T*.sub.ea=1 000 000 s=1 s
(107) A processor without floating point computation then performs the following calculations:
T.sub.W=W.Math.T.sub.bus=65 536.Math.68 s=4 456 380 s
F=(T.sub.W+T*.sub.ea/2)/T*.sub.ea=(4 456 380 s+500 000 s)/1 000 000 s=4
U.sub.twinkle=W.Math.V*.sub.twinkle=65 536/2=32 768
U.sub.flash=W.Math.V*.sub.flash=65 536/5=13 107
(108) The following pseudo code is obtained:
(109) TABLE-US-00006 If (LED == target_twinkle) { If ((Z% 13 107) < 8192) { LED = on } else { LED = off } } If (LED == target_flash) { If ((Z% 13 107) < 3276) { LED = on } else { LED = off } }
(110) For the example above, the following is therefore obtained for the discrepancy:
%=[((4 456 380 s/4)1 000 000 s)*100]/1 000 000 s=11.41%
(111) In this case, the actual on/off period T.sub.ea is thus approximately 1114 ms instead of the value 1000 ms of the desired on/off period T*.sub.ea.
(112) It should be noted that for the bus message time intervals between 63 s and 10 ms that are shown in the specific examples 1 to 4 in this case, the discrepancy can never be greater than 12.5% and is greatest for a bus message time interval of 68.66 s. In the case of longer bus message time intervals, the percentage discrepancy becomes smaller and smaller in zigzag fashion.