IEC 62386-305:2023
(Main)Digital addressable lighting interface - Part 305: Particular requirements - Input devices - Colour sensor
Digital addressable lighting interface - Part 305: Particular requirements - Input devices - Colour sensor
IEC 62386-305:2023 is applicable to input devices that provide the lighting control system with colour information by colour sensing.
This document is only applicable to IEC 62386-103 input devices that deliver colour information to the lighting control system through colour sensing.
Interface d'éclairage adressable numérique – Partie 305: Exigences particulières – Dispositifs d'entrée – Capteur de couleur
L'IEC 62386-305:2023 s’applique aux dispositifs d’entrée qui assurent le système de commande de l’éclairage avec des informations de couleurs fournies par des capteurs de couleur.
Le présent document s'applique uniquement aux dispositifs d'entrée de l'IEC 62386-103 qui fournissent des informations de couleurs au système de commande de l'éclairage par détection des couleurs.
General Information
Standards Content (Sample)
IEC 62386-305 ®
Edition 1.0 2023-09
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Digital addressable lighting interface –
Part 305: Particular requirements – Input devices – Colour sensor
Interface d'éclairage adressable numérique –
Partie 305: Exigences particulières – Dispositifs d'entrée – Capteur de couleur
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
your local IEC member National Committee for further information.
Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite ni
utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie et
les microfilms, sans l'accord écrit de l'IEC ou du Comité national de l'IEC du pays du demandeur. Si vous avez des
questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence.
IEC Secretariat Tel.: +41 22 919 02 11
3, rue de Varembé info@iec.ch
CH-1211 Geneva 20 www.iec.ch
Switzerland
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.
About IEC publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigendum or an amendment might have been published.
IEC publications search - webstore.iec.ch/advsearchform IEC Products & Services Portal - products.iec.ch
The advanced search enables to find IEC publications by a Discover our powerful search engine and read freely all the
variety of criteria (reference number, text, technical publications previews. With a subscription you will always have
committee, …). It also gives information on projects, replaced access to up to date content tailored to your needs.
and withdrawn publications.
Electropedia - www.electropedia.org
IEC Just Published - webstore.iec.ch/justpublished
The world's leading online dictionary on electrotechnology,
Stay up to date on all new IEC publications. Just Published
containing more than 22 300 terminological entries in English
details all new publications released. Available online and once
and French, with equivalent terms in 19 additional languages.
a month by email.
Also known as the International Electrotechnical Vocabulary
(IEV) online.
IEC Customer Service Centre - webstore.iec.ch/csc
If you wish to give us your feedback on this publication or need
further assistance, please contact the Customer Service
Centre: sales@iec.ch.
A propos de l'IEC
La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des
Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.
A propos des publications IEC
Le contenu technique des publications IEC est constamment revu. Veuillez vous assurer que vous possédez l’édition la
plus récente, un corrigendum ou amendement peut avoir été publié.
Recherche de publications IEC - IEC Products & Services Portal - products.iec.ch
webstore.iec.ch/advsearchform Découvrez notre puissant moteur de recherche et consultez
La recherche avancée permet de trouver des publications IEC gratuitement tous les aperçus des publications. Avec un
en utilisant différents critères (numéro de référence, texte, abonnement, vous aurez toujours accès à un contenu à jour
comité d’études, …). Elle donne aussi des informations sur les adapté à vos besoins.
projets et les publications remplacées ou retirées.
Electropedia - www.electropedia.org
IEC Just Published - webstore.iec.ch/justpublished
Le premier dictionnaire d'électrotechnologie en ligne au monde,
Restez informé sur les nouvelles publications IEC. Just
avec plus de 22 300 articles terminologiques en anglais et en
Published détaille les nouvelles publications parues.
français, ainsi que les termes équivalents dans 19 langues
Disponible en ligne et une fois par mois par email.
additionnelles. Egalement appelé Vocabulaire
Electrotechnique International (IEV) en ligne.
Service Clients - webstore.iec.ch/csc
Si vous désirez nous donner des commentaires sur cette
publication ou si vous avez des questions contactez-nous:
sales@iec.ch.
IEC 62386-305 ®
Edition 1.0 2023-09
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Digital addressable lighting interface –
Part 305: Particular requirements – Input devices – Colour sensor
Interface d'éclairage adressable numérique –
Partie 305: Exigences particulières – Dispositifs d'entrée – Capteur de couleur
INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
INTERNATIONALE
ICS 29.140.50, 29.140.99 ISBN 978-2-8322-7474-3
– 2 – IEC 62386-305:2023 © IEC 2023
CONTENTS
FOREWORD . 4
INTRODUCTION . 6
1 Scope . 8
2 Normative references . 8
3 Terms and definitions . 8
4 General . 9
4.1 General requirements . 9
4.2 Version number . 9
4.3 Insulation . 9
5 Electrical specification . 9
6 Bus power supply . 9
7 Transmission protocol structure . 9
8 Timing . 9
9 Method of operation . 9
9.1 General . 9
9.2 Instance type . 9
9.3 Input signal and value . 10
9.3.1 General . 10
9.3.2 Input value encoding . 10
9.4 Events . 10
9.4.1 Priority use . 10
9.4.2 Bus usage . 10
9.4.3 Encoding . 10
9.4.4 Event configuration . 11
9.4.5 Event generation . 12
9.5 Configuring the input device . 12
9.5.1 Using the report timer . 12
9.5.2 Using the deadtime timer . 13
9.5.3 Setting the timers . 13
9.5.4 Setting the hysteresis . 14
9.5.5 Manual configuration . 14
9.6 Exception handling. 14
9.6.1 Physical sensor failure . 14
9.6.2 Manufacturer-specific errors . 14
9.6.3 Error value . 15
10 Declaration of variables . 15
11 Definition of commands . 16
11.1 General . 16
11.2 Overview sheets . 16
11.2.1 General . 16
11.2.2 Standard commands . 17
11.3 Event messages . 17
11.3.1 INPUT NOTIFICATION (device/instance, event) . 17
11.3.2 POWER NOTIFICATION (device) . 17
11.4 Device control instructions . 17
11.5 Device configuration instructions . 17
11.6 Device queries . 17
11.7 Instance control instructions . 17
11.8 Instance configuration instructions . 17
11.8.1 General . 17
11.8.2 SET EVENT FILTER (DTR0) . 18
11.8.3 SET REPORT TIMER (DTR0) . 18
11.8.4 SET HYSTERESIS (DTR0) . 18
11.8.5 SET DEADTIME TIMER (DTR0) . 18
11.8.6 SET HYSTERESIS MIN (DTR0). 18
11.9 Instance queries . 18
11.9.1 General . 18
11.9.2 QUERY COLOUR SENSOR (DTR0) . 18
11.9.3 QUERY DEADTIME TIMER . 19
11.9.4 QUERY INSTANCE ERROR . 19
11.9.5 QUERY REPORT TIMER . 19
11.9.6 QUERY HYSTERESIS . 20
11.9.7 QUERY HYSTERESIS MIN . 20
11.10 Special commands . 20
Annex A (informative) Explanation of radiometric parameters of colour sensors . 21
Bibliography . 23
Figure 1 – IEC 62386 graphical overview . 6
Figure A.1 – Example sensor sensitivity . 21
Table 1 – Input value encoding . 10
Table 2 – Colour value events. 11
Table 3 – Colour report . 11
Table 4 – Event filter . 11
Table 5 – Event timer setting . 13
Table 6 – "manualCapabilityInstance3xx" values . 14
Table 7 – "instanceErrorByte" values . 15
Table 8 – Declaration of device variables . 15
Table 9 – Restrictions to instance variables defined in IEC 62386-103:2022 . 16
Table 10 – Declaration of instance variables . 16
Table 11 – Standard commands . 17
Table 12 – DTR reference . 19
Table A.1 – Example answers to QUERY COLOUR SENSOR (DTR0) . 22
– 4 – IEC 62386-305:2023 © IEC 2023
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________
DIGITAL ADDRESSABLE LIGHTING INTERFACE –
Part 305: Particular requirements –
Input devices – Colour sensor
FOREWORD
1) The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising
all national electrotechnical committees (IEC National Committees). The object of IEC is to promote international
co-operation on all questions concerning standardization in the electrical and electronic fields. To this end and
in addition to other activities, IEC publishes International Standards, Technical Specifications, Technical Reports,
Publicly Available Specifications (PAS) and Guides (hereafter referred to as "IEC Publication(s)"). Their
preparation is entrusted to technical committees; any IEC National Committee interested in the subject dealt with
may participate in this preparatory work. International, governmental and non-governmental organizations liaising
with the IEC also participate in this preparation. IEC collaborates closely with the International Organization for
Standardization (ISO) in accordance with conditions determined by agreement between the two organizations.
2) The formal decisions or agreements of IEC on technical matters express, as nearly as possible, an international
consensus of opinion on the relevant subjects since each technical committee has representation from all
interested IEC National Committees.
3) IEC Publications have the form of recommendations for international use and are accepted by IEC National
Committees in that sense. While all reasonable efforts are made to ensure that the technical content of IEC
Publications is accurate, IEC cannot be held responsible for the way in which they are used or for any
misinterpretation by any end user.
4) In order to promote international uniformity, IEC National Committees undertake to apply IEC Publications
transparently to the maximum extent possible in their national and regional publications. Any divergence between
any IEC Publication and the corresponding national or regional publication shall be clearly indicated in the latter.
5) IEC itself does not provide any attestation of conformity. Independent certification bodies provide conformity
assessment services and, in some areas, access to IEC marks of conformity. IEC is not responsible for any
services carried out by independent certification bodies.
6) All users should ensure that they have the latest edition of this publication.
7) No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and
members of its technical committees and IEC National Committees for any personal injury, property damage or
other damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) and
expenses arising out of the publication, use of, or reliance upon, this IEC Publication or any other IEC
Publications.
8) Attention is drawn to the Normative references cited in this publication. Use of the referenced publications is
indispensable for the correct application of this publication.
9) IEC draws attention to the possibility that the implementation of this document may involve the use of (a)
patent(s). IEC takes no position concerning the evidence, validity or applicability of any claimed patent rights in
respect thereof. As of the date of publication of this document, IEC had not received notice of (a) patent(s), which
may be required to implement this document. However, implementers are cautioned that this may not represent
the latest information, which may be obtained from the patent database available at https://patents.iec.ch. IEC
shall not be held responsible for identifying any or all such patent rights.
IEC 62386-305 has been prepared by IEC technical committee 34: Lighting. It is an International
Standard.
The text of this International Standard is based on the following documents:
Draft Report on voting
34/1065/FDIS 34/1080/RVD
Full information on the voting for its approval can be found in the report on voting indicated in
the above table.
The language used for the development of this International Standard is English.
This document was drafted in accordance with ISO/IEC Directives, Part 2, and developed in
accordance with ISO/IEC Directives, Part 1 and ISO/IEC Directives, IEC Supplement, available
at www.iec.ch/members_experts/refdocs. The main document types developed by IEC are
described in greater detail at www.iec.ch/publications.
This document is intended to be used in conjunction with:
• IEC 62386-101, which contains general requirements for system components;
• IEC 62386-103, which contains general requirements for control devices.
A list of all parts in the IEC 62386 series, published under the general title Digital addressable
lighting interface, can be found on the IEC website.
The committee has decided that the contents of this document will remain unchanged until the
stability date indicated on the IEC website under webstore.iec.ch in the data related to the
specific document. At this date, the document will be
• reconfirmed,
• withdrawn, or
• revised.
IMPORTANT – The "colour inside" logo on the cover page of this document indicates
that it contains colours which are considered to be useful for the correct understanding
of its contents. Users should therefore print this document using a colour printer.
– 6 – IEC 62386-305:2023 © IEC 2023
INTRODUCTION
The IEC 62386 series specifies a bus system for control by digital signals of electronic lighting
equipment and contains several parts, referred to as series. The IEC 62386-1xx series includes
the basic specifications. IEC 62386-101 contains general requirements for system components,
IEC 62386-102 extends this information with general requirements for control gear and
IEC 62386-103 extends it further with general requirements for control devices. IEC 62386-104
and IEC 62386-105 can be applied to control gear or control devices. IEC 62386-104 gives
requirements for wireless and alternative wired system components. IEC 62386-105 describes
firmware transfer. IEC 62386-150 gives requirements for an auxiliary power supply which can
be stand-alone, or built into control gear or control devices.
The IEC 62386-2xx series extends the general requirements for control gear with lamp specific
extensions (mainly for backward compatibility with Edition 1 of IEC 62386) and with control gear
specific features.
The IEC 62386-3xx series extends the general requirements for control devices with input
device specific extensions describing the instance types as well as some common features that
can be combined with multiple instance types.
This first edition of IEC 62386-305 is intended to be used in conjunction with IEC 62386-101,
and IEC 62386-103. The division into separately published parts provides for ease of future
amendments and revisions. Additional requirements will be added as and when a need for them
is recognized.
The setup of the standards is graphically represented in Figure 1 below.
Figure 1 – IEC 62386 graphical overview
When this part of IEC 62386 refers to any of the clauses of the IEC 62386‑1xx series, the extent
to which such a clause is applicable is specified. The other parts also include additional
requirements, as necessary.
All numbers used in this document are decimal numbers unless otherwise noted. Hexadecimal
numbers are given in the format 0xVV, where VV is the value. Binary numbers are given in the
format XXXXXXXXb or in the format XXXX XXXX, where X is 0 or 1; "x" in binary numbers
means "don't care".
The following typographic expressions are used:
Variables: "variableName" or "variableName[3:0]", giving only bits 3 to 0 of "variableName";
Range of values: [lowest, highest];
Command: "COMMAND NAME".
– 8 – IEC 62386-305:2023 © IEC 2023
DIGITAL ADDRESSABLE LIGHTING INTERFACE –
Part 305: Particular requirements –
Input devices – Colour sensor
1 Scope
This part of IEC 62386 is applicable to input devices that provide the lighting control system
with colour information by colour sensing.
This document is only applicable to IEC 62386-103 input devices that deliver colour information
to the lighting control system through colour sensing.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content
constitutes requirements of this document. For dated references, only the edition cited applies.
For undated references, the latest edition of the referenced document (including any
amendments) applies.
IEC 62386-101:2022, Digital addressable lighting interface – Part 101: General requirements –
System components
IEC 62386-103:2022, Digital addressable lighting interface – Part 103: General requirements –
Control devices
IEC 62386-333, Digital addressable lighting interface – Part 333: Particular requirements for
control devices – Manual configuration (feature type 33)
3 Terms and definitions
For the purposes of this document, the terms and definitions given in IEC 62386-101 and
IEC 62386-103 and the following apply.
ISO and IEC maintain terminology databases for use in standardization at the following
addresses:
• IEC Electropedia: available at https://www.electropedia.org/
• ISO Online browsing platform: available at https://www.iso.org/obp
3.1
instance
observed colour signal processing unit of an input device
[SOURCE: IEC 62386-101:2022, 3.29, modified – Addition of "observed colour".]
3.2
strictly monotonic
either entirely increasing or decreasing without repeating values
3.3
observed colour
colour as detected by physical sensor on input device
4 General
4.1 General requirements
The requirements of IEC 62386-103:2022, Clause 4 apply, with the restrictions, changes and
additions identified below.
4.2 Version number
In IEC 62386-103:2022, 4.2, "103" shall be replaced by "305", "version number" shall be
replaced by "extended version number" and "versionNumber" shall be replaced by
"extendedVersionNumber".
4.3 Insulation
According to IEC 61347-1 it can be required that the input device has at least supplementary
insulation. This depends on the connected components. In this case special attention should
be paid with respect to the sensor(s) being used.
NOTE IEC 62386-101:2022 requires the interface of system components to have at least basic insulation.
5 Electrical specification
The requirements of IEC 62386-103:2022, Clause 5 apply.
6 Bus power supply
The requirements of IEC 62386-103:2022, Clause 6 apply.
7 Transmission protocol structure
The requirements of IEC 62386-103:2022, Clause 7 apply.
NOTE Subclause 9.4 provides detailed event information applicable to instances.
8 Timing
The requirements of IEC 62386-103:2022, Clause 8 apply.
9 Method of operation
9.1 General
The requirements of IEC 62386-103:2022, Clause 9 apply, with the following restrictions and
additions.
9.2 Instance type
The instance type ("instanceType") shall be equal to 5, indicating a colour sensor.
– 10 – IEC 62386-305:2023 © IEC 2023
9.3 Input signal and value
9.3.1 General
The "inputValue" shall indicate the value measured by the sensor, encoded as a 24-bit red-
green-blue (RGB) value. The red, green and blue components of "inputValue" shall be a strictly
monotonic function of the corresponding measured red, green and blue values.
After receiver start-up, it can take the sensor some time before valid colour measurements are
obtained. During this time, QUERY INPUT VALUE and QUERY INPUT VALUE LATCH shall
reply as if "inputValue" is MASK. After the first valid colour measurement is obtained,
"inputValue" shall not be MASK, except in the case of physical sensor failure (see 9.6.1).
The input "resolution" shall be equal to 24.
NOTE A "resolution" of 24 implies that "inputValue" is a three-byte value.
9.3.2 Input value encoding
The "inputValue" shall be encoded as shown in Table 1.
Table 1 – Input value encoding
Bits Description Value Alias
[7:0] Red Observed red level [0, 254] "rValue"
[15:8] Green Observed green level [0, 254] "gValue"
[23:16] Blue Observed blue level [0, 254] "bValue"
9.4 Events
9.4.1 Priority use
9.4.1.1 General
The default "eventPriority" is defined in Table 9.
NOTE Application controllers can ensure this instance leaves higher priority timeslots on the bus by setting the
instance’s "eventPriority" to a priority greater than 2.
9.4.1.2 Periodic events
The periodic "INPUT NOTIFICATION" message triggered by the report timer that reports the
colour value event shall always be sent with priority 5.
9.4.2 Bus usage
9.4.2.1 Instance level
Multiple events from an instance shall not be sent in the same transaction. Also, there is a
configurable delay T that shall be taken into account. See 9.5.2 for more information.
deadtime
9.4.2.2 Device level
At the device level, events from different instances may be sent in a transaction.
9.4.3 Encoding
Colour value events shall be encoded as shown in Table 2.
Table 2 – Colour value events
Event name Event Description
information
Colour report "colourEvent" A colour value report, passing a truncated RGB
value.
The "colourEvent" information shall be encoded as shown in Table 3.
Table 3 – Colour report
"colourEvent" Description Value
bits
[2:0] Red "inputValue"[7:5] (3 most significant bits of red)
[5:3] Green "inputValue"[15:13] (3 most significant bits of
green)
[8:6] Blue "inputValue"[23:21] (3 most significant bits of
blue)
[9] Unused 0
NOTE 1 Due to the 10-bit size of the event message information, the resulting colour report provides only 512
colour combinations and depending on the set-point of the hysteresis, duplicate event messages are possible.
NOTE 2 Application controllers can query the "inputValue" to obtain a higher resolution representation of the
measurement.
9.4.4 Event configuration
Events shall be enabled or disabled according to the value of "eventFilter", as specified in
Table 4. For this instance type, "eventFilter" shall be reduced to one byte. No configurations of
"eventFilter" shall prevent the periodic "INPUT NOTIFICATION" message triggered by the report
timer (9.5.1).
NOTE Inhibiting events increases the effective bus bandwidth availability.
Table 4 – Event filter
Bit Description Value Default
0 Colour report event enabled? "1" = "Yes" 1
1 Reserved 0 0
2 Reserved 0 0
3 Reserved 0 0
4 Reserved 0 0
5 Reserved 0 0
6 Reserved 0 0
7 Reserved 0 0
The event filter can be set via "SET EVENT FILTER (DTR0)" and queried using
"QUERY EVENT FILTER 0-7", see IEC 62386-103:2022 for details.
– 12 – IEC 62386-305:2023 © IEC 2023
9.4.5 Event generation
The colour report event is a truncated report of the "inputValue". To limit the number of events
generated on small level changes, a hysteresis band is introduced. The height of the hysteresis
band ("hysteresisBand") determines the minimum change of the colour values that shall generate
an event according to the following calculations. As the "inputValue" is an array of the three
colour values, "rValue", "gValue" and "bValue", the hysteresis is based on the summed absolute
change of each colour value.
"absoluteChange" = |"rValue" − "rLast"| + |"gValue" − "gLast"| + |"bValue" − "bLast"|
The colour report event shall be generated
• each time "absoluteChange" becomes greater than "hysteresisBand", or
• after a timeout of T since the previous colour event, irrespective of the actual
report
"inputValue".
The power on value of "hysteresisBand" is 0, such that the first non-zero value of "inputValue"
shall cause the colour report event to be generated according to the first condition shown above.
See 9.5.4 for details.
In case a new event occurs before the current event has been sent, the new event shall replace
the current event. This can be caused, for example, by bus unavailability or the deadtime timer.
Each time the colour report event is sent because "absoluteChange" is greater than
"hysteresisBand", then the values of "rLast", "gLast", "bLast" and "hysteresisBand" shall be
recalculated as follows:
• "hysteresisBand" is calculated as the maximum of:
– "hysteresis" percentage of ("rValue" + "gValue" + "bValue"), and
– "hysteresisMin";
• "rLast" = "rValue";
• "gLast" = "gValue";
• "bLast" = "bValue".
EXAMPLE with "hysteresis" of 10 %:
At power-on, "hysteresisBand" is 0. Measurement 1 gives colour values of [R = 70, G = 110, B = 120]. A colour report
event is generated as "absoluteChange" > "hysteresisBand". "hysteresisBand" is set to 30 ((70 + 110 + 120) × 10 %).
"rLast" = 70, "gLast" = 110, "bLast" = 120.
Measurement 2 gives colour values of [R = 80, G = 106, B = 125]. "absoluteChange"
= |80 − 70| + |106 − 110| + |125 − 120| = 19. A colour report event is not generated as
"absoluteChange" ≤ "hysteresisBand". "hysteresisBand", "rLast", "gLast" and "bLast" are unchanged.
Measurement 3 gives colour values of [R = 85, G = 98, B = 130]. "absoluteChange"
= |85 − 70| + |98 − 110| + |130 − 120| = 37. A colour report event is generated as
"absoluteChange" > "hysteresisBand". "hysteresisBand" is set to 31 ((85 + 98 + 130) × 10 %). "rLast" = 85, "gLast" = 98,
"bLast" = 130.
9.5 Configuring the input device
9.5.1 Using the report timer
If the report timer is set, it shall generate a 'repeat' trigger every T even if the "inputValue"
report
has not changed. The report timer shall be restarted every time an event is sent.
The report timer shall be started,
• at power-on: if enabled, immediately after both the receiver has started up and the colour
measurement has become valid, with the time to the first trigger recommended to be
shortened to a random time between 0 s and T s;
report
• otherwise immediately after enablement.
This implies that the first "INPUT NOTIFICATION" message due to the report timer is sent at a
maximum time of T after starting. This may be delayed by other "INPUT NOTIFICATION"
report
messages, or by bus availability.
9.5.2 Using the deadtime timer
If the deadtime timer is set, the instance shall not send out an event until the deadtime timer
has expired. The deadtime timer shall be restarted every time an event is sent.
9.5.3 Setting the timers
The deadtime and report timers shall be programmable as indicated in Table 5.
For each timer, a fixed minimum duration and a fixed increment in duration are given. The
application controller can set the desired actual timer duration by setting the number of
increments to a value in the range [0, 255]. The resulting time shall be strictly monotonic
according to the following formula:
Time = T · multiplier
incr
Only on (re-)starting a timer the actual time shall be calculated based on the corresponding
variable. This implies that the times only change after any running timer has been cancelled or
expired. The tolerance on the time shall be ±5 %.
Table 5 – Event timer setting
Time Multiplier Default value T T T T
incr default min max
T "tDeadtime" 30 50 ms 1,5 s 0 s 12,75 s
deadtime
T "tReport" 30 5 s 2 min 30 s 5 s 21 min 15 s
report
The input device shall expose the following operations to set and observe the timer multipliers:
• "SET REPORT TIMER (DTR0)", "QUERY REPORT TIMER" to set or query "tReport";
• "SET DEADTIME TIMER (DTR0)", "QUERY DEADTIME TIMER" to set or query "tDeadtime".
"SET REPORT TIMER (DTR0)" shall set "tReport" depending on "DTR0". If "tReport" is set to 0,
the report timer shall be disabled immediately.
"SET DEADTIME TIMER (DTR0)" shall set "tDeadtime" depending on "DTR0". If "tDeadtime" is
set to 0, the deadtime timer shall be disabled immediately, but shall not affect T until the
report
report timer is (re-)started.
If T < T , T shall be T (independent of the value of "tReport").
report deadtime report deadtime
– 14 – IEC 62386-305:2023 © IEC 2023
9.5.4 Setting the hysteresis
The height of the hysteresis band, "hysteresisBand", is calculated according to 9.4.5 using the
percentage given by "hysteresis" with the minimum height given by "hysteresisMin". The input
device shall support a hysteresis up to 25 %. A value of zero for "hysteresis" shall lead to colour
events based on T only. The input device shall expose the following operations to set and
report
observe the values of "hysteresis" and "hysteresisMin":
• "SET HYSTERESIS (DTR0)", "QUERY HYSTERESIS" to set or query "hysteresis".
"SET HYSTERESIS (DTR0)" shall set "hysteresis" in 1 % steps depending on the "DTR0" value
as follows:
• if "DTR0" > 25: no change;
• in all other cases: "DTR0".
Since a hysteresis in percent would require a growing resolution in case the "inputValue" is low,
the minimum value for the hysteresis is physically limited. To avoid unwanted events at low
sensor values, the minimum value for the hysteresis can also be set as an absolute value
"hysteresisMin":
• "SET HYSTERESIS MIN (DTR0)", "QUERY HYSTERESIS MIN" to set or query
"hysteresisMin".
"SET HYSTERESIS MIN (DTR0)" shall set "hysteresisMin" to "DTR0".
9.5.5 Manual configuration
If IEC 62386-333 is implemented, the instance level variables according to Table 6 may be
manually configured. "QUERY MANUAL CONFIGURATION CAPABILITY 3xx" (see
IEC 62386-333) shall return the byte as defined in Table 6:
Table 6 – "manualCapabilityInstance3xx" values
Bit Description Value
0 Manual configuration of "tReport" supported "1" = "Yes"
1 Manual configuration of "tDeadtime" supported "1" = "Yes"
2 Manual configuration of "hysteresis" supported "1" = "Yes"
3 Manual configuration of "hysteresisMin" supported "1" = "Yes"
4 Reserved "0"
5 Reserved "0"
6 Reserved "0"
7 Reserved "0"
9.6 Exception handling
9.6.1 Physical sensor failure
If a physical sensor failure is detected, the instance shall set "instanceError" to TRUE, from the
moment the failure is detected until the failure is resolved. While the error is detected, no further
events shall be sent and "inputValue" shall be set to MASK as defined in 9.3.
9.6.2 Manufacturer-specific errors
If a manufacturer-specific error is detected, the instance shall set "instanceError" to TRUE, from
the moment the error occurs until the error is gone.
9.6.3 Error value
"instanceError" can be observed via "QUERY INSTANCE STATUS".
While "instanceError" is set, "QUERY INSTANCE ERROR" shall return "instanceErrorByte"
according to Table 7:
Table 7 – "instanceErrorByte" values
Bit Description Value
0 Physical sensor failure? "1" = "Yes"
1 Reserved "0"
2 Reserved "0"
3 Reserved "0"
4 Manufacturer-specific error 1? "1" = "Yes"
5 Manufacturer-specific error 2? "1" = "Yes"
6 Manufacturer-specific error 3? "1" = "Yes"
7 Manufacturer-specific error 4? "1" = "Yes"
If used, the meaning of bits [7:4] of "instanceErrorByte" shall be documented in the manual. The
impact on event generation shall also be documented.
10 Declaration of variables
The requirements of IEC 62386-103:2022, Clause 10 apply, with the following considerations.
Table 8 shows additions to the device variables.
Table 8 – Declaration of device variables
Variable Default value Reset value Power-on Range of Memory type
(factory) value validity
"extendedVersionNumber" 2.0 no change no change 00001000b ROM
Table 9 shows restrictions to the instance variables.
– 16 – IEC 62386-305:2023 © IEC 2023
Table 9 – Restrictions to instance variables defined in IEC 62386-103:2022
Variable Default value Reset Power-on Range of Memory
(factory) value value validity type
"instanceType" 5 no change no change 5 ROM
"resolution" 24 no change no change 24 ROM
a b
"inputValue" no change ([0, 255], [0, 255], [0, 255]) RAM
no change
"eventFilter" 1 1 no change 0000 000x NVM
"eventPriority" 4 4 no change [2, 5] NVM
c
reserved reserved reserved reserved reserved
"instanceConfiguration[x]"
a
Not applicable.
b
The value should reflect the actual situation as soon as possible.
c
Where x is in the range [0, 190].
Table 10 shows additions to the instance variables.
Table 10 – Declaration of instance variables
Variable Default value Reset value Power-on value Range of Memory type
(factory) validity
a b
"instanceErrorByte" no change xxxx 000x RAM
a
"hysteresisBand" no change 0 [0, 191] RAM
"tReport" 30 30 no change [0, 255] NVM
"tDeadtime" 30 30 no change [0, 255] NVM
"hysteresisMin" 12 12 no change [0, 255] NVM
"hysteresis" 10 10 no change [0, 25] NVM
a
"rLast" no change 0 [0, 254] RAM
a
"gLast" no change 0 [0, 254] RAM
a
"bLast" no change 0 [0, 254] RAM
a b
"rValue" no change [0, 254] RAM
a b
"gValue" no change [0, 254] RAM
a b
"bValue" no change [0, 254] RAM
a b
"absoluteChange" no change [0, 762] RAM
a
Not applicable.
b
The value should reflect the actual situation as soon as possible.
11 Definition of commands
11.1 General
Unused opcodes shall be reserved for future needs.
11.2 Overview sheets
11.2.1 General
The requirements of IEC 62386-103:2022, 11.2 apply, with the following additions.
11.2.2 Standard commands
Table 11 gives an overview of the additional commands and queries.
Table 11 – Standard commands
Command name Address Instance Opcode See Command
byte byte byte subclause subclause
SET REPORT TIMER (DTR0) Device Instance 0x40 9.5.3 11.8.3
SET HYSTERESIS (DTR0) Device Instance 0x41 9.5.4 11.8.4
SET DEADTIME TIMER (DTR0) Device Instance 0x42 9.5.3 11.8.5
SET HYSTERESIS MIN (DTR0) Device Instance 0x43 9.5.4 11.8.6
QUERY COLOUR SENSOR Device Instance 0x4B 11.9.2
(DTR0)
QUERY HYSTERESIS MIN Device Instance 0x4C 9.5.4 11.9.7
QUERY DEADTIME TIMER Device Instance 0x4D 9.5.3 11.9.3
QUERY REPORT TIMER Device Instance 0x4E 9.5.3 11.9.5
QUERY HYSTERESIS Device Instance 0x4F 9.5.4 11.9.6
11.3 Event messages
11.3.1 INPUT NOTIFICATION (device/instance, event)
The requirements of IEC 62386-103:2022, 11.3.1 apply, with the following addition:
Refer to 9.4.3 for an overview of event values.
11.3.2 POWER NOTIFICATION (device)
The requirements of IEC 62386-103:2022, 11.3.2 apply.
11.4 Device control instructions
The requirements of IEC 62386-103:2022, 11.4 apply.
11.5 Device configuration instructions
The requirements of IEC 62386-103:2022, 11.5 apply.
11.6 Device queries
The requirements of IEC 62386-103:2022, 11.6 apply.
11.7 Instance control instructions
The requirements of IEC 62386-103:2022, 11.7 apply.
11.8 Instance configuration instructions
11.8.1 General
The requirements of IEC 62386-103:2022, 11.8 apply, with the following additions and
replacements:
DTR0
DTR1
DTR2
Answer
Send
twice
– 18 – IEC 62386-305:2023 © IEC 2023
11.8.2 SET EVENT FILTER (DTR0)
"eventFilter" shall be set to DTR0 if the value is within the valid range. Otherwise, the command
shall be discarded.
11.8.3 SET REPORT TIMER (DTR0)
"tReport" shall be set to the "DTR0" value.
Refer to 9.5.1 and 9.5.3 for more information.
11.8.4 SET HYSTERESIS (DTR0)
"hysteresis" shall be set depending on the "DTR0" value as follows:
• if "DTR0" > 25: no change;
• in all other cases: "DTR0".
Refer to 9.4.5 and 9.5.4 for more information.
11.8.5 SET DEADTIME TIMER (DTR0)
"tDeadtime" shall be set to the "DTR0" value.
Refer to 9.5.2 and 9.5.3 for more information.
11.8.6 SET HYSTERESIS MIN (DTR0)
"hysteresisMin" shall be set to the "DTR0" value.
Refer to 9.4.5 and 9.5
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...