BS en 62386-103-2014
BS en 62386-103-2014
BS en 62386-103-2014
Digital addressable
lighting interface
Part 103: General requirements —
Control devices
BS EN 62386-103:2014 BRITISH STANDARD
National foreword
This British Standard is the UK implementation of EN 62386-103:2014. It is
identical to IEC 62386-103:2014.
The UK participation in its preparation was entrusted by Technical
Committee CPL/34, Lamps and Related Equipment, to Subcommittee
CPL/34/3, Auxiliaries for lamps.
A list of organizations represented on this committee can be obtained on
request to its secretary.
This publication does not purport to include all the necessary provisions of
a contract. Users are responsible for its correct application.
© The British Standards Institution 2015.
Published by BSI Standards Limited 2015
English Version
Interface d'éclairage adressable numérique - Digital adressierbare Schnittstelle für die Beleuchtung -
Partie 103: Exigences générales - Dispositifs de commande Teil 103: Allgemeine Anforderungen - Steuergeräte
(CEI 62386-103:2014) (IEC 62386-103:2014)
This European Standard was approved by CENELEC on 2014-12-12. CENELEC members are bound to comply with the CEN/CENELEC
Internal Regulations which stipulate the conditions for giving this European Standard the status of a national standard without any alteration.
Up-to-date lists and bibliographical references concerning such national standards may be obtained on application to the CEN-CENELEC
Management Centre or to any CENELEC member.
This European Standard exists in three official versions (English, French, German). A version in any other language made by translation
under the responsibility of a CENELEC member into its own language and notified to the CEN-CENELEC Management Centre has the
same status as the official versions.
CENELEC members are the national electrotechnical committees of Austria, Belgium, Bulgaria, Croatia, Cyprus, the Czech Republic,
Denmark, Estonia, Finland, Former Yugoslav Republic of Macedonia, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Latvia,
Lithuania, Luxembourg, Malta, the Netherlands, Norway, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland,
Turkey and the United Kingdom.
© 2014 CENELEC All rights of exploitation in any form and by any means reserved worldwide for CENELEC Members.
Foreword
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights. CENELEC [and/or CEN] shall not be held responsible for identifying any or all such
patent rights.
Endorsement notice
The text of the International Standard IEC 62386-103:2014 was approved by CENELEC as a
European Standard without any modification.
In the official version, for Bibliography, the following notes have to be added for the standards indicated:
Annex ZA
(normative)
NOTE 1 When an International Publication has been modified by common modifications, indicated by (mod), the relevant
EN/HD applies.
NOTE 2 Up-to-date information on the latest versions of the European Standards listed in this annex is available here:
www.cenelec.eu
CONTENTS
INTRODUCTION ................................................................................................................... 13
1 Scope ............................................................................................................................ 15
2 Normative references .................................................................................................... 15
3 Terms and definitions .................................................................................................... 15
4 General ......................................................................................................................... 18
4.1 General ................................................................................................................. 18
4.2 Version number .................................................................................................... 18
5 Electrical specification ................................................................................................... 18
6 Interface power supply .................................................................................................. 18
7 Transmission protocol structure ..................................................................................... 18
7.1 General ................................................................................................................. 18
7.2 24 bit forward frame encoding ............................................................................... 19
7.2.1 Frame format for instructions and queries ...................................................... 19
7.2.2 Frame format for event messages.................................................................. 20
8 Timing ........................................................................................................................... 21
9 Method of operation ....................................................................................................... 21
9.1 General ................................................................................................................. 21
9.2 Application controller ............................................................................................ 21
9.2.1 General ......................................................................................................... 21
9.2.2 Single-master application controller ............................................................... 22
9.2.3 Multi-master application controller ................................................................. 22
9.3 Input device .......................................................................................................... 22
9.4 Instances of input devices ..................................................................................... 23
9.4.1 General ......................................................................................................... 23
9.4.2 Instance number ............................................................................................ 23
9.4.3 Instance type ................................................................................................. 23
9.4.4 Feature type .................................................................................................. 23
9.4.5 Instance groups ............................................................................................. 24
9.5 Commands ........................................................................................................... 24
9.5.1 General ......................................................................................................... 24
9.5.2 Device commands ......................................................................................... 24
9.5.3 Instance commands ....................................................................................... 25
9.5.4 Feature commands ........................................................................................ 25
9.6 Event messages ................................................................................................... 25
9.6.1 Response to event messages ........................................................................ 25
9.6.2 Device power cycle event .............................................................................. 25
9.6.3 Input notification event .................................................................................. 25
9.6.4 Event message filter ...................................................................................... 26
9.7 Input signal and input value .................................................................................. 27
9.7.1 General ......................................................................................................... 27
9.7.2 Input resolution .............................................................................................. 27
9.7.3 Getting the input value ................................................................................... 27
9.7.4 Notification of changes .................................................................................. 28
9.8 System failure ....................................................................................................... 28
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 –3–
INTRODUCTION
IEC 62386 contains several parts, referred to as series. The 1xx series includes the basic
specifications. Part 101 contains general requirements for system components, Part 102
extends this information with general requirements for control gear and Part 103 extends it
further with general requirements for control devices.
The 2xx parts extend 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 3xx parts extend 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-103 is published in conjunction with IEC 62386-101:2014,
IEC 62386-102:2014 and with the various parts that make up the IEC 62386-2xx series for
control gear, together with the various parts that make up the IEC 62386-3xx series of
particular requirements for control devices. 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 recognised.
The setup of the standard is graphically represented in Error! Reference source not found.
below
2xx 2xx 2xx 2xx 2xx 3xx 3xx 3xx 3xx 3xx
IEC
When this part of IEC 62386 refers to any of the clauses of the other two parts of the
IEC 62386-1xx series, the extent to which such a clause is applicable and the order in which
the tests are to be performed are specified. The other parts also include additional
requirements, as necessary.
All numbers used in this International Standard 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, w here X is 0 or 1, "x" in
binary numbers means "don't care".
BS EN 62386-103:2014
– 14 – IEC 62386-103:2014 © IEC 2014
1 Scope
This Part of IEC 62386 is applicable to control devices in a bus system for control by digital
signals of electronic lighting equipment. This electronic lighting equipment should be in line
with the requirments of IEC 61347, with the addition of d.c. supplies.
NOTE Tests in this standard are type tests. Requirements for testing individual products during production are not
included.
2 Normative references
The following documents, in whole or in part, are normatively referenced in this document and
are indispensable for its application. 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:2014, Digital addressable lighting interface – Part 101: General requirements
– System components
IEC 62386-102:2014, Digital addressable lighting interface – Part 102: General requirements
– Control gear
For the purposes of this document, the terms and definitions given in IEC 62386-101:2014,
Clause 3 apply, with the following additional terms and definitions.
3.1
broadcast
type of address used to address all control devices in the system at once
3.2
broadcast unaddressed
type of address used to address all control devices in the system that have no short address
at once
3.3
device command
command which addresses the control device and has a value of 0xFE in the instance byte of
the command frame
3.4
device group
type of address used to address a group of control devices in the system at once
BS EN 62386-103:2014
– 16 – IEC 62386-103:2014 © IEC 2014
3.5
DTR
data transfer register
multipurpose register used to exchange data
3.6
event
an instance report, characterized by its event number, of a change or a defined sequence of
changes of its input value
Note 1 to entry: The event number is specific to the type of the instance that sends the report.
3.7
event scheme
characterisation of the information, as provided by an instance when producing an event
message, that identifies the source of the event
3.8
feature command
command which addresses one or more features of an input device or device instance and
has a value different from 0xFE in the instance byte of the command frame but is not an
instance command
3.9
GTIN
number used for the unique identification of trade items worldwide.
Note 2 to entry: The number is comprised of a GS1 or U.P.C. company prefix followed by an item reference number
and a check digit. It is described in the “GS1 General Specifications”
3.10
input signal
physical value that an instance of an input device is designed to detect and process
Note 1 to entry: Examples for physical values are “light level” and “button state”.
3.11
identification
temporary state used during commissioning that allows the installer to identify particular
control devices
3.12
input value
encoded data, representing the input signal
Note 1 to entry: The way in which the input signal is encoded depends on the instance type.
3.13
instance command
command which addresses one or more instances of an input device and has a value different
from 0xFE in the instance byte of the command frame but is not a feature command
3.14
MASK
the value 0xFF
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 17 –
3.15
NO
if a query is asked where the answer is NO, there will be no response, such that the sender of
the query will conclude “no backward frame" following 8.2.5 of IEC 62386-101:2014
3.16
NVM
non-volatile read/write memory, the content of which can be changed and will not be lost due
to a power cycle
3.17
opcode
operation code
that part of a command frame that identifies the command to be executed
3.18
operating mode
set of states identified by a number in the range [0,255], characterised by a collection of
variables and memory settings, and used to select a set of functionality to be exhibited by a
device, including its required reaction to commands
Note 1 to entry: Control devices may support more than one operating mode.
3.19
PING
a 16-bit forward frame with bits [15:0] equal to 0xAD00
Note 1 to entry: As specified in Part 102 of this standard, PING has no meaning to control gear.
3.20
quiescent mode
temporary mode in which the device does not send forward frames
3.21
RAM
volatile read/write memory, the content of which can be changed and will be lost due to a
power cycle
3.22
random address
24 bit random number generated by the control device on request during system initialisation
3.23
reset state
state in which all NVM variables of the control device have their reset value, except those that
are marked “no change” or are otherwise explicitly excluded
3.24
ROM
non-volatile read only memory, the content of which is fixed
Note 1 to entry: In this standard read only is meant from a system perspective. A ROM variable may actually be
implemented in NVM, but this standard does not provide any mechanism to change its value.
3.25
search address
24 bit number used to identify an individual control device in the system during initialisation
BS EN 62386-103:2014
– 18 – IEC 62386-103:2014 © IEC 2014
3.26
short address
type of address used to address an individual control device in the system
3.27
YES
if a query is asked where the answer is yes, the response will be a backward frame containing
the value of MASK
4 General
4.1 General
The requirements of IEC 62386-101:2014, Clause 4 apply, with the restrictions, changes and
additions identified below.
The version shall be in the format "x.y", where the major version number x is in the range of 0
to 62 and the minor version number y is in the range of 0 to 2. When the version number is
encoded into a byte, the major version number x shall be placed in bits 7 to 2 and the minor
version number y shall be placed in bits 1 to 0.
At each amendment to an edition of IEC 62386-103 the minor version number shall be
incremented by one.
At a new edition of IEC 62386-103 the major version number shall be incremented by one and
the minor version number shall be set to 0.
NOTE Normally 2 amendments on IEC documents are made before a new edition is created.
5 Electrical specification
7.1 General
The requirements of Clause 7 of IEC 62386-101:2014 apply, with the following additions;.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 19 –
7.2.1.1 General
For Subclause 7.2.1 commands shall be interpreted as instructions and queries. The 24 bit
forward frame shall be encoded as shown in Table 1 and Table 2
Bytes/Bits
Opcode Device
Address byte Instance byte
byte addressing
23 22 21 20 19 18 17 16 15...8 7...0
0 64 short addresses 1 Short addressing
1 0 32 device group addresses 1 Device group
Device command or instance addressing
1 1 1 1 1 1 0 1 address or feature, see Table 2 Broadcast
unaddressed
1 1 1 1 1 1 1 1 Broadcast
1 1 0 16 special command 1
Command specific Special command
spaces
1 1 1 0 x x x 1
1 1 1 1 0 x x 1 Reserved Reserved
1 1 1 1 1 0 x 1
Instance byte
Addressing
15 14 13 12 11 10 09 08
0 0 0 32 Instance numbers Instance number
1 0 0 32 Instance groups Instance group
1 1 0 32 Instance types Instance type
0 0 1 32 Instance numbers Feature on instance number level
1 0 1 32 Instance groups Feature on instance group level
0 1 1 32 Instance types Feature on instance type level
1 1 1 1 1 1 0 1 Feature on instance broadcast level
1 1 1 1 1 1 1 1 Instance broadcast
1 1 1 1 1 1 0 0 Feature on device level
1 1 1 1 1 1 1 0 Device
0 1 0 x x x x x Reserved
1 1 1 0 x x x x
1 1 1 1 0 x x x
1 1 1 1 1 0 x x
• for standard commands, the indication of whether a device command, feature command or
an instance command is being transmitted;
• for standard instance commands, the method of instance addressing used by the
transmitter;
• command specific information for special commands;
• for standard commands, reserved instance addresses. Reserved instance addresses shall
not be used by the transmitter;
• for standard feature commands, the feature that is being addressed;
• reserved information for reserved commands.
7.2.2.1 General
For event messages, the 24 bit forward frame shall be encoded as shown in Table 3.
a
Bits Event scheme /
source
Event source information Event info
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9...0
0 64 short addresses 0 0 32 instance types 1 Device
0 64 short addresses 0 1 32 instance numbers 2 Device/instance
1 0 32 device groups 0 0 32 instance types Event 3 Device group
1 0 32 instance types 0 1 32 instance numbers 0 Instance
1 1 32 instance groups 0 0 32 instance types 4 Instance group
1 1 0 x x x x 0 1 x x x x x
1 1 1 0 x x x 0 1 x x x x x
1 1 1 1 0 x x 0 1 x x x x x
1 1 1 1 1 0 x 0 1 x x x x x Reserved Reserved
1 1 1 1 ! 1 0 0 1 x x x x x
1 1 1 ! 1 1 1 0 1 0 x x x x
1 1 1 1 1 1 1 0 1 1 0 x x x
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 21 –
a
Bits Event scheme /
source
Event source information Event info
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9...0
Short address/device group
1 1 1 1 1 1 1 0 1 1 1 Device power cycle
information, refer to 9.6.2.
a Refer to 9.6.2 of this standard for further information on event schemes.
• the indication that an event message, not an instruction or query, is being transmitted:
Bit 16 is clear for event messages;
• relevant event instance type information, such that the receiver of an event message will
be able to understand the meaning of the event;
• relevant event source information, such that the receiver of an event message may be
able to understand where the message is coming from;
• reserved values.
Events are instance type specific. This means that the event source information must be such
that a receiver can derive – either explicitly or implicitly – the instance type of the transmitting
instance. The identified event source schemes in Table 3 (and only these) satisfy this
condition.
NOTE The event source schemes are not equally valuable in terms of telling the receiver where the event
message originated.
The event information provides the 10-bit event number and/or event data. Event information
is instance type specific and is defined in the applicable Parts 3xx of this standard that
describe the instance type.
8 Timing
9 Method of operation
9.1 General
The requirements of IEC 62386-101:2014, Clause 9 apply with the following additions.
9.2.1 General
An application controller is that part of a control system that makes the system “work”:
A single-master application controller is not intended to share the bus with other control
devices.
A single-master application controller may try to configure other control devices on the bus,
and/or change the behaviour of control gear in the system, thereby using any command
defined in IEC 62386-102 and/or instructions and queries defined in IEC 62386-103.
NOTE Especially if the single-master application controller does not handle collisions appropriately, any such
attempt may fail and affect the system negatively.
On the other hand, a single-master application controller is not required to have a receiver on
board. For this reason, the following holds:
For all following subclauses, this standard assumes a control device to be a multi-master
control device.
In order to make itself known as a possibly anonymous transmitting bus unit, a single-master
application controller shall transmit a PING message at regular intervals of 10 ± 1 min. The
first such PING message shall appear at a random time between 5 min and 10 min after
completion of the power-on procedure.
For all following subclauses, this standard assumes a control device to be a multi-master
control device.
In most cases, a system will have only one application controller active (refer to 9.9.1), but
multiple application controllers can be operational in a single system.
An application controller shall accept commands (from other application controllers) according
to Table 21 and Table 22. It is part of the system integration to ensure that the application
controllers will do this in such a way that a correctly functioning system results.
NOTE 2 System integrity is easiest to achieve by allowing only a single application controller to do commissioning
and configuration.
An application controller shall not transmit event messages other than for the device power
cycle event.
NOTE 4 If an application controller is active, it can send 24-bit forward frames for purposes other than
transmitting events.
Input devices make a system sensitive to changes in its environment, by transmitting event
messages.
Input devices shall be multi-master control devices and shall allow commissioning and
configuration by an application controller.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 23 –
Input devices shall use forward frames only to transmit event messages.
9.4.1 General
An input device shall have at least one instance and a maximum of 32 instances, as shall be
indicated by “numberOfInstances”, which can be queried using
“QUERY NUMBER OF INSTANCES”.
A control device that is only an application controller shall have a “numberOfInstances” equal
to 0.
The instance type for each of the instances of an input device can be different. It can be
queried by "QUERY INSTANCE TYPE". The meaning of event information transmitted by
means of "INPUT NOTIFICATION (device/instance, event)" depends on the instance type.
Table 4 shows the instance type encoding. For further information on the different instance
types see Parts 3xx of IEC 62386.
This standard allows for the future publication of feature extensions that extend the
requirements in this specification, or exempt particular requirements.
The features for each of the instances of an input device can be different. They can be
queried by "QUERY FEATURE TYPE” and ”QUERY NEXT FEATURE TYPE”
Table 5 shows the feature type encoding. For further information on the different feature types
see Parts 3xx of IEC 62386.
Instance groups are a means for an application controller to put instances into logical groups,
across input devices. Consequently, these logical groups can be used to configure multiple
instances at once.
An application controller can use up to 32 such groups, numbered in the range [0,31]. Each
instance can be declared to be a member of up to 3 instance groups and shall expose
instance group variables as given in Table 6.
Variable Description
Instance groups are assigned and queried by using the following instance operations:
The primary group is special in the sense that only this number shall be used when reporting
events (if instance group event reporting is used). Additional groups are a means of
configuring multiple instances at once.
9.5 Commands
9.5.1 General
A control device shall check the device addressing scheme to see if it is addressed by a
command. The control device shall accept the command, unless any of the following
conditions hold:
• the command is sent using short addressing, and given short address is not equal to
“shortAddress”;
• the command is sent using device group addressing, and the given device group does not
match any of the groups identified by “deviceGroups”.
• the command is sent using broadcast unaddressed addressing and “shortAddress” is not
MASK;
• the command is sent using reserved addressing;
• the command is not defined;
• the command is sent using feature addressing, and the given feature is not implemented.
NOTE For instance commands, additional conditions for command acceptance hold. These are given in 9.5.3.
The instance byte shall be 0xFE for device commands. If the instance byte is not equal to
0xFE, the control device shall not accept these commands.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 25 –
NOTE This addressing mechanism allows the opcode values for device commands and instance commands to
overlap.
For instance commands that are accepted by an input device (refer to 9.5), the instance
addressing scheme determines the intended (set of) receiving instances within that device. An
instance shall accept the instance command, unless any of the following additional conditions
hold:
• the command is sent using Instance Number addressing and the given instance number is
not equal to “instanceNumber”;
• the command is sent using instance group addressing, and the given instance group does
not match any of the groups identified by “instanceGroup0”, “instanceGroup1” and
“instanceGroup2” (see Table 6);
• the command is sent using instance type addressing and the given instance type is not
equal to “instanceType”;
• the command is sent using reserved addressing.
For feature commands that are accepted by an input device (refer to 9.5), the feature
addressing scheme determines the intended (set of) receiving features within that device.
An application controller or input device is free to act upon reception of any event message or
to ignore the message.
NOTE If an application controller or input device is disabled, it is not allowed to send any response but can still
update its internal state based on messages received.
Since the power cycle (see 9.12.2) event is a device event, it does not adhere to the default
event frame format. Bits 12 through 0 carry device address information as is indicated in
Table 7.
Bits
12 11 10 09 08 07 06 05 04 03 02 01 00
1 = device group valid Lowest device group 1 = short address valid Short address
Bit 12 shall be set if and only if the transmitting control device is member of at least one
device group. Bits [11:7] shall indicate the lowest device group number of membership in that
case. If bit 12 is not set, bits [11:7] shall be clear.
Bit 6 shall be set if and only if the transmitting control device has a “shortAddress” different
from MASK. Bits [5:0] shall indicate the device short address in that case. If bit 6 is not set,
bits [5:0] shall be clear.
An instance of an input device shall, when transmitting an event message, use the selected
event source addressing scheme as defined in Table 8.
BS EN 62386-103:2014
– 26 – IEC 62386-103:2014 © IEC 2014
“eventScheme” Description
0 (default) Instance addressing, using instance type and number.
1 Device addressing, using short address and instance type.
2 Device/instance addressing, using short address and instance number.
3 Device group addressing, using device group and instance type.
4 Instance group addressing, using instance group and type.
NOTE 1 An instance can only implement an event scheme while certain conditions have been satisfied by the
application controller as well. Instance addressing is the only addressing scheme that will work under all
circumstances.
In the following situations, the instance shall immediately revert to the default instance
addressing scheme:
• “eventScheme” has been set to 1 or 2 whereas the containing device has no short address;
• “eventScheme” has been set to 3 whereas the containing device is not member of a device
group;
• “eventScheme” has been set to 4 whereas the instance has no primary instance group
membership (see 9.4.5).
NOTE 2 The above situations can occur because of a new “SET EVENT SCHEME (DTR0)” command and/or
because of a change of conditions.
The event message filter can be used to enable and disable specific events. To enable or
disable all events see 9.9.2.
An application controller can set the “eventFilter” by means of SET EVENT FILTER (DTR2,
DTR1, DTR0) and can query the variable by means of QUERY EVENT FILTER 0-7,
QUERY EVENT FILTER 8-15 and QUERY EVENT FILTER 16-23 respectively.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 27 –
The Parts 3xx shall define the meaning of the bits in “eventFilter”, and can reduce the width of
the variable “eventFilter” if needed. If the width is reduced to 2 bytes, DTR2 shall be ignored
for SET EVENT FILTER (DTR2, DTR1, DTR0) and QUERY EVENT FILTER 16-23 shall answer
NO. Similarly, if the width is reduced to 1 byte, also DTR1 shall be ignored for
SET EVENT FILTER (DTR2, DTR1, DTR0) and QUERY EVENT FILTER 8-15 shall also answer
NO.
9.7.1 General
An instance shall process its input signal into an input value and expose this value to the
system, as described in the following subclauses.
The processing shall be done with a precision which is indicated by “resolution”. The actual
resolution used for particular instance (type) can be subject to Part 3xx requirements and/or
manufacturer choice.
The result of the conversion shall be available in the N-byte variable “inputValue”, where N is
the minimum number of bytes needed to contain at least “resolution” bits.
NOTE 1 N is computed as (“resolution”/8) rounded up to the nearest integer. With “resolution” in the range
[1,255], “inputValue” can span up to 32 bytes.
The result of the conversion and the “inputValue” shall be MSB-aligned. Unused bits in
“inputValue” shall contain a repeating pattern of the most significant bit(s).
Table 9 provides an example, which shows a signal level of just below 50% latched into a
1-byte “inputValue” after being processed with a “resolution” of 3, 4 and 5 bits respectively.
Bits
Resolution Signal level 7 6 5 4 3 2 1 0 Input value
3-bits 3 of [0, 7] 0 1 1 0 1 1 0 1 109
4-bits 7 of [0, 15] 0 1 1 1 0 1 1 1 119
5-bits 15 of [0, 31] 0 1 1 1 1 0 1 1 123
NOTE 2 The grey shaded bits are (part of) the (first) repetition of the significant bits.
This method allows an application controller to interpret the input value correctly as an 8-bit
value, regardless of the actual instance resolution or sensor precision. The minimum value of
all bytes in “inputValue” is always 0, the maximum value 0xFF, for all resolutions. The relative
signal level corresponds (albeit with variable accuracy) to the relative input value.
An instance shall support a latching mechanism that allows an application controller to obtain
a consistent multi-byte input value. An example of such latching scenario is given in Table 10.
The application controller must start reading a multi byte value by sending command
“QUERY INPUT VALUE”. This command shall trigger a latch that contains a copy of
“inputValue” such that the remaining bytes can be read using a sequence of
“QUERY INPUT VALUE LATCH” queries. After having returned the last byte of the latch, the
instance shall not answer further “QUERY INPUT VALUE LATCH” queries until after the next
“QUERY INPUT VALUE”.
BS EN 62386-103:2014
– 28 – IEC 62386-103:2014 © IEC 2014
The “inputValue” that is latched is the “inputValue” at the moment “QUERY INPUT VALUE” is
received.
NOTE 1 This implies that if an application controller queries the “inputValue" because of an event message it has
just received, the value obtained is not necessarily the same value that triggered the event.
The latched value shall be updated only when the next “QUERY INPUT VALUE” is received. If
the application controller uses “QUERY INPUT VALUE LATCH” without having used
“QUERY INPUT VALUE” as the command before this one, the answer may contain old or
invalid data.
The application controller shall transmit the necessary queries for this scenario within a
transaction.
NOTE 3 If the application controller can work sufficiently accurately with 16-bit input for the given instance type, it
can stop after having received the most significant 16 bits of input value, and handle those bits as if they were
delivered by an instance with “resolution” equal to 16. This allows straightforward resolution-independent algorithm
implementation.
A change or a sequence of changes in the input signal of an instance shall result in an event
message as required by this document or that Part 3xx of the standard that describes the
“instanceType” (see 9.4.3) of that instance.
The event message shall be sent using “INPUT NOTIFICATION (device/instance, event)”, as
described in 11.3.1 of this standard.
NOTE The manufacturer of the input device should ensure that no event is lost. Parts 3xx of this standard may
impose additional restrictions, e.g. to avoid event flooding.
An application controller should detect system failure and recovery. Preferably, it should act
upon any bus power failure with a duration longer than 40 ms, thus anticipating a power cycle
of bus powered devices.
Next, when the system failure is resolved, the application controller should ensure that the
system resumes normal operation.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 29 –
NOTE This allows the application controller to monitor the bus, but the application controller cannot use forward
frames to react.
“applicationActive” shall be stored in NVM of the application controller. The default value shall
be TRUE in case there is an application controller present, which can be changed by another
application controller using the commands ENABLE APPLICATION CONTROLLER and
DISABLE APPLICATION CONTROLLER.
“instanceActive” shall be stored in persistent memory of the input device. The default value
shall be TRUE, which can be changed by an application controller using the commands
“ENABLE INSTANCE” and “DISABLE INSTANCE”.
To limit the event messages when enabled, filtering is also available, see 9.6.4.
NOTE Queries are the only way to get information from an instance when event messages are disabled.
In quiescent mode, the control device shall not produce any forward frames. No commands
(see also 9.9.1), and no event messages (see also 9.9.2) shall be transmitted, regardless of
“applicationActive” or any “instanceActive”.
Quiescent mode is a temporary mode which is started or restarted with the command
“START QUIESCENT MODE”. It ends automatically 15 min ± 1,5 min after the last
“START QUIESCENT MODE” command was received. Additionally, the command
“STOP QUIESCENT MODE” shall terminate quiescent mode immediately.
NOTE 1 Quiescent mode can be used by the application controller during initialisation (see 9.14) to ensure that
random address comparisons are not frustrated by forward frames from other devices on the bus.
NOTE 2 Quiescent mode works independently from “applicationActive” and “instanceActive”. This implies that
ending quiescent mode does not necessarily enable forward frame transmissions.
BS EN 62386-103:2014
– 30 – IEC 62386-103:2014 © IEC 2014
9.9.4.1 General
Operating modes 0x00 to 0x7F are defined in this standard. At least operating mode 0x00
shall be available. Operating modes 0x80 to 0xFF are manufacturer specific. The query
“QUERY MANUFACTURER SPECIFIC MODE” can be used to determine whether the control
device is in an IEC 62386 standard operating mode, or in a manufacturer specific mode.
Operating modes 0x01 to 0x7F are reserved and shall not be used.
Manufacturer specific modes should only be used if the features required by the application
are not covered by the standard. If a control device is in a manufacturer specific operating
mode, the behaviour of the control device may be manufacturer specific as well, with the
following exceptions:
• as far as the control device accesses the bus, it shall adhere to IEC 62386-101:2014.
• the control device shall adhere to this specification at least as far as the following
commands are concerned:
– “SET OPERATING MODE (DTR0)”, and “QUERY OPERATING MODE” and
“QUERY MANUFACTURER SPECIFIC MODE”.
– All special commands (see 11.9.14) except
WRITE MEMORY LOCATION (DTR1, DTR0, data), WRITE MEMORY LOCATION –
NO REPLY (DTR1, DTR0, data) and DIRECT WRITE MEMORY (DTR1, offset, data).
For the above commands the various addressing methods shall apply, see 7.2.1.2.
9.10.1 General
Memory banks are freely accessible memory spaces defined for e.g. identification of the
control device in a system. Not all consecutive memory banks need to be implemented. Also
within a memory bank not all consecutive locations need to be implemented. All implemented
memory bank locations of implemented memory banks are readable using memory access
commands. Part of the memory is read-only and programmed by the manufacturer of the
control device. For all other parts, write access using memory access commands can be
enabled by the manufacturer. Write access to a memory bank location can be locked. Memory
banks can be implemented using RAM, ROM or NVM.
implement memory bank 0 and 1 (if present), and reserves memory banks 200 to 255, this
leaves room for 198 memory banks for manufacturer specific purposes in the range of [2,199].
The byte in location 0x00 of each bank contains the address of the last accessible memory
location of the bank. The value shall be in the range [0x03,0xFE].
The byte in location 0x01 is manufacturer specific. If implemented, the usage of this byte
should be described by the manufacturer (as well as the entire content of the memory bank).
NOTE 1 It could be used for example to store a checksum in case of a memory bank with static content. Using a
checksum on a memory bank where the content is changed by the control device is not useful.
The byte in location 0x02 shall be used to lock write access. Memory location 0x02 itself shall
never be locked for writing. While this memory location contains any value different from
0x55, all memory locations marked "(lockable)" of the corresponding memory bank shall be
read only. The control device shall not change the value of the lock byte other than as a
consequence of a power cycle or of a ”RESET MEMORY BANK (DTR0)” command or other
command affecting the lock byte.
Location 0xFF is a reserved location in every memory bank, and is not accessible. This
location shall not be implemented as a normal memory bank location. When addressed, the
control device shall respond as if this location is not implemented, and it shall not increment
“DTR0”.
NOTE 2 This location is reserved in order to stop the auto increment of DTR0
In order to select a memory bank location a combination of memory bank number and location
inside the memory bank is required.
The memory bank shall be selected by setting the memory bank number in “DTR1”. The
location in the memory bank shall be selected by the value in “DTR0”.
BS EN 62386-103:2014
– 32 – IEC 62386-103:2014 © IEC 2014
If the selected memory bank s not implemented, the command shall be ignored. If the memory
bank exists, and selected memory bank location is
• not implemented, or
• above the last accessible memory location,
If the selected memory bank location is below location 0xFF, “DTR0” shall be incremented by
one, even if the memory location is not implemented. Otherwise, “DTR0” shall not change.
This mechanism allows for easy consecutive reading of memory bank locations.
To ensure consistent data when reading a multi-byte value from a memory bank, it is
recommended that a mechanism be implemented that latches all bytes of the multi-byte value
when the first byte of the multi-byte value is read and that unlatches the bytes on receipt of
any command other than "READ MEMORY LOCATION (DTR1, DTR0)".
After reading a number of bytes from a memory bank, the application controller should check
the value of “DTR0” to verify it is at the expected/desired location. Any mismatch indicates an
error while reading.
Write commands are special commands and therefore not addressable. In order to select the
correct control device(s) the addressable command “ENABLE WRITE MEMORY” shall be
used. Upon reception of “ENABLE WRITE MEMORY”, the addressed control device(s) shall
set “writeEnableState” to ENABLED.
Only while “writeEnableState” is ENABLED, and the addressed memory bank is implemented,
the control device shall accept the following commands to write to a selected memory bank
location:
• “WRITE MEMORY LOCATION (DTR1, DTR0, data)”: The control device shall confirm
writing a memory location with an answer equal to the value data.
NOTE The value that can be read from the memory bank location is not necessarily data.
A control device shall set “writeEnableState” to DISABLED if any command other than one of
the following commands is received:
• not implemented, or
• above the last accessible memory location, or
• locked (see 9.10.2), or
• not writeable
If the selected memory bank location is below 0xFF, “DTR0” shall be incremented by one.
Otherwise, “DTR0” shall not change. This mechanism allows for easy consecutive writing to
memory bank locations.
To ensure consistent data when writing a multi-byte value into a memory bank, it is
recommended that a mechanism be implemented that only accepts the new multi-byte value
for writing after all bytes of the multi-byte value have been received.
After writing a number of bytes to a memory bank, the application controller should check the
value of “DTR0” to verify it is at the expected/desired location. Any mismatch indicates an
error while writing.
NOTE “DTR0” is also incremented if a non-implemented memory bank location is addressed before 0xFF is
reached.
Memory bank 0 contains information about the control device. Memory bank 0 shall be
implemented in all multi-master control devices.
Memory bank 0 shall be implemented using the memory map shown in Table 12, with at least
the memory locations up to address 0x7F implemented, excluding reserved locations.
BS EN 62386-103:2014
– 34 – IEC 62386-103:2014 © IEC 2014
If there is more than one logical unit built into one bus unit all logical units shall have the
same values in memory bank locations 0x03 up to and including 0x19.
A bus unit might contain both control gear and control devices. They share various numbers
(e.g. GTIN, identification number, etc). To avoid problems when reading, and getting different
answers depending on the addressing scheme used, the memory bank layout are the same
for control gear and for control devices up to and including location 0x19. The data shall be
the same as well. The application controller can use either the 102 or the 103 commands to
identify the basic data, provided both are implemented.
The bytes in locations 0x03 to 0x08 ("GTIN 0" to "GTIN 5") shall contain the global trade item
number (GTIN), e.g. the EAN, in binary. The bytes shall be stored most significant first and
filled with leading zeroes.
The bytes in locations 0x09 and 0x0A ("firmware version") shall contain the firmware version
of the bus unit.
The bytes in locations 0x0B to 0x12 ("identification number byte 0" to "identification number
byte 7") shall contain 64 bits of an identification number of the bus unit, prefereably the serial
number. The identification number shall be stored with least significant byte in "identification
number byte 8" and unused bits shall be filled with 0.
The combination of the identification number and the GTIN number shall be unique.
The byte in location 0x13 and 0x14 (“hardware version”) shall contain the hardware version of
the bus unit.
The byte in location 0x15 shall contain the implemented IEC 62386-101 version number of the
bus unit.
The byte in location 0x16 shall contain the implemented IEC 62386-102 version number of the
bus unit. If no control gear is implemented, the version number shall be 0xFF.
The byte in location 0x17 shall contain the implemented IEC 62386-103 version number of the
bus unit. If no control device is implemented, the version number shall be 0xFF.
The byte in location 0x18 shall contain the number of logical control device units integrated
into the bus unit. The number of logical units shall be in the range of 1 to 64.
The byte in location 0x19 shall contain the number of logical control gear units integrated into
the bus unit. The number of logical units shall be in the range of 0 to 64.
The byte in location 0x1A shall represent the unique index number of the logical control
device unit that implements that memory bank. The valid range of this index number is 0 to
the total number of logical control device units in the bus unit minus one.
NOTE As example there might be a product containing three logical devices with three different short addresses.
Each of these control devices has the same GTIN and identification number, each reports as number of devices the
value 3 and the index of the three control devices is reported as 0, 1 or 2 respectively. Reading location 0x1A
using broadcast yields a backward frame according to IEC62386-101, 9.5.2 (overlapping backward frame).
Memory bank 1 is reserved for use by an OEM (original equipment manufacturer, e.g. a
luminaire manufacturer) to store additional information, which has no impact on the
functionality of the control device. The control device manufacturer may implement memory
bank 1.
BS EN 62386-103:2014
– 36 – IEC 62386-103:2014 © IEC 2014
If implemented, memory bank 1 shall at least implement the memory locations up to and
including address 0x10. A recommended memory map is shown in Table 13.
0x00 Address of last accessible memory location factory burn- no change ROM
in,
range
[0x10,0xFE]
a a a
0x01 Indicator byte any a
0x02 Memory bank 1 lock byte. Lockable bytes in the memory bank 0xFF 0xFF c RAM
shall be read-only while the lock byte has a value different
from 0x55.
0x03 OEM GTIN byte 0 (MSB) 0xFF no change NVM
(lockable)
0x04 OEM GTIN byte 1 0xFF no change NVM
(lockable)
0x05 OEM GTIN byte 2 0xFF no change NVM
(lockable)
0x06 OEM GTIN byte 3 0xFF no change NVM
(lockable)
0x07 OEM GTIN byte 4 0xFF no change NVM
(lockable)
0x08 OEM GTIN byte 5 (LSB) 0xFF no change NVM
(lockable)
0x09 OEM identification number byte 0 (MSB) 0xFF no change NVM
(lockable)
0x0A OEM identification number byte 1 0xFF no change NVM
(lockable)
0x0B OEM identification number byte 2 0xFF no change NVM
(lockable)
0x0C OEM identification number byte 3 0xFF no change NVM
(lockable)
0x0D OEM identification number byte 4 0xFF no change NVM
(lockable)
0x0E OEM identification number byte 5 0xFF no change NVM
(lockable)
0x0F OEM identification number byte 6 0xFF no change NVM
(lockable)
0x10 OEM identification number byte 7 (LSB) 0xFF no change NVM
(lockable)
a a a a
≥ 0x11 Additional control device information
0xFF Reserved – not implemented answer NO no change n.a.
a Purpose, default/ power on/reset value and memory access of these bytes shall be defined by the
manufacturer.
b Reset value after “RESET MEMORY BANK”
c Also used as power on value
The bytes in locations 0x03 to 0x08 ("OEM GTIN 0" to "OEM GTIN 5") should be used to
identify the product containing the control device. If the bytes are used for GTIN the bytes
shall be stored most significant bit first and filled with leading zeroes. These bytes should be
programmed by the OEM.
The bytes in locations 0x09 to 0x10 ("OEM identification number byte 0" to "OEM
identification number byte 7") should contain 64 bits of an identification number of the OEM
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 37 –
product. If the bytes are used for the identification number, it shall be stored with the least
significant byte in " identification number byte 7" and unused bits shall be filled with 0. These
bytes should be programmed by the OEM.
The combination of OEM GTIN and OEM identification number should be unique.
Memory banks 200 to 255 are reserved for future use and shall not be implemented.
9.11 Reset
A control device shall implement a reset operation to set all device variables and instance
variables (see Table 17 and Table 18) to their reset values.
NOTE For some variables this operation could have no effect at all.
The reset operation shall take at most 300 ms to complete. While the reset operation is in
progress, the control device may or may not respond to any command. However, until the
reset operation is complete, none of the affected variables have a defined value.
An application controller can trigger the reset operation using the “RESET” instruction and
should wait at least 350 ms to ensure all control devices have finished the reset operation.
A control device shall implement a reset operation to set the content of all unlocked memory
banks (see 9.10) to their reset values, followed by locking the memory banks.
NOTE For some memory bank locations this operation may have no effect at all.
The reset operation shall take at most 10 s to complete. While the reset operation is in
progress, the control device may or may not respond to any command. However, until the
reset operation is complete, none of the affected memory locations have a defined value.
An application controller can trigger the reset operation for a specific memory bank, or for all
implemented memory banks, using the “RESET MEMORY BANK (DTR0)” instruction and
should wait at least 10,1 s to ensure all devices have finished the reset memory bank
operation.
9.12.1 Power on
After an external power cycle (see IEC 62386-101:2014, subclause 4.11.1), the device shall
maintain its most recent configuration, with the following exceptions:
• the memory bank write enable state shall be disabled for all memory banks and the lock
byte shall be set to 0xFF;
• quiescent mode shall be cancelled (see 9.9.3);
• All running timers shall be stopped and cancelled/reset;
• “powerCycleSeen” shall be set to TRUE.
BS EN 62386-103:2014
– 38 – IEC 62386-103:2014 © IEC 2014
In order to observe a subsequent power cycle, the application controller should clear
“powerCycleSeen”, using the command “RESET POWER CYCLE SEEN.
In a system with multiple application controllers all application controllers may need power
cycle information of other control devices in the system. Clearing “powerCycleSeen” should be
done with some consideration.
After completing its external power cycle, a control device shall generate a power cycle event
message if “powerCycleNotification” is ENABLED.
NOTE 1 The power cycle notification is not inhibited by “applicationActive” nor by any “instanceActive”.
The event shall be generated using the “POWER NOTIFICATION (device)” message as
described in 11.2. The event message shall be sent once using priority 2 and with a uniformly
distributed delay between 1 s, 3s and 5 s after completion of the power-on procedure.
NOTE 2 Applying a random delay helps avoiding collisions of power cycle notifications.
9.13.1 General
The purpose of forward frame priorities is to facilitate appropriate system behaviour within a
multi-master system. Priorities ensure that transmissions for time critical system reaction will
have precedence over transmissions for non-time critical system operation.
• Priority 1 shall be used for all forward frames within a transaction (see
IEC62386-101:2014, subclause 9.3), except for the first forward frame. Priority 1 shall
neither be used for forward frames that are not part of a transaction, nor for those that
start a transaction.
• Priority 2 should be used to execute user instigated actions for switching or dimming the
lights. This implies appropriate event messages and arc power commands. Priority 2 might
also be used during commissioning (e.g. addressing).
NOTE 1 Examples are switching or dimming actions triggered via push-button or presence detector.
• Priority 3 should be used for configuration of a bus unit and for those event messages that
are not covered by Priorities 2 and 4.
NOTE 2 Examples are writing to memory banks or feedback events.
• Priority 4 should be used to execute automatic actions for switching or dimming the lights.
This means sending appropriate event messages and arc power commands.
NOTE 3 Examples are switching or dimming actions triggered by a light sensor.
An instance shall use a default “eventPriority” equal to Priority 4 when transmitting an event
message to produce an “INPUT NOTIFICATION (device/instance, event)”. For particular
instance types, this default priority is subject to change by Parts 3xx of this standard.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 39 –
In a system, the default “eventPriority” can be overruled by the application controller using
“SET EVENT PRIORITY (DTR0)”. “QUERY EVENT PRIORITY” can be used to observe the
currently active “eventPriority”.
9.14.1 General
“shortAddress” shall be derived from data or “DTR0” depending on the command used. It shall
be set on receipt of “PROGRAM SHORT ADDRESS (data)” or
“SET SHORT ADDRESS (DTR0)” as follows:
A control device shall implement an initialisation state, only in which, apart from the other
operations identified in this standard, a set of commands are enabled that allow an application
controller to detect and uniquely identify control devices available on the bus and assign short
addresses to these devices.
The initialisation state is a temporary state which is entered with the command
“INITIALISE (device)”. It ends automatically 15 min ± 1,5 min after the last
“INITIALISE (device)” command was received. Additionally, a power cycle or the command
“TERMINATE” shall cause the control device to leave the initialisation state immediately.
The control device shall have three possible values for “initialisationState”:
During identification no variables shall be affected unless explicitly stated otherwise. Where
appropriate, variables can be temporarily ignored, so that after the identification has ended,
there are no side effects.
Identification shall be stopped upon reception of any instruction other than INITIALISE (device)
or “IDENTIFY DEVICE”.
Identification can be started by sending the instruction “IDENTIFY DEVICE”. This shall start or
restart a 10 s ± 1 s timer. While the timer is running, a procedure enabling an observer to
identify the selected control device shall run. If the timer expires, identification shall stop.
Control devices and instances shall expose whether an error has occurred by setting (in case
of error) and resetting (in case of no error) the following flags.
Each control device shall expose its features as a combination of device capabilities as given
in Table 14:
Each control device shall expose its status as a combination of device properties as given in
Table 15:
“resetState” shall be set to TRUE if all the NVM variables mentioned in Table 17 and Table 18
are at their reset value. The NVM variables that are marked with ‘no change’ in the reset
value column shall not be considered. NVM variables defined in implemented Parts 3xx shall
be included.
Each instance shall expose its status as a combination of instance properties as given in
Table 16:
Physical non-volatile memory typically supports a limited number of write cycles. Since many
variables are NVM type, the physical limitations need some attention.
A control device should store NVM variables in such a way that their content is never lost and
the intended lifetime of the device can be reached. This means that it may not be possible to
physically write every change in a variable immediately. There may be situations in which the
control device is not able to physically write the variables to NVM, especially if a particular
NVM variable is changed very frequently.
Since the application controller cannot know the control device’s internal mechanism for
physically saving persistent variables, the instruction “SAVE PERSISTENT VARIABLES” is
defined to force the control device to physically write all variables of type NVM to memory.
This command is an addition to the normal writing of NVM variables. Its intended use is to
ensure that important changes made by an application controller cannot be lost, e.g. after
assigning all short addresses or setting other important (and stable) configuration data.
Clearly it is not intended to be used after every value change. Typically, this command is used
only a handful of times for an entire installation.
NOTE Typically the command can be used a few thousand times before causing physical damage to the control
device’s NVM.
Physically saving the variables in response to the instruction shall take at most 300 ms to
complete. While the saving operation is on-going, the control device may or may not respond
to any command.
10 Declaration of variables
Table 17 shows the default values, the reset values, the range of validity and the type of
memory of the defined instance independent variables.
Table 18 shows the default values, the reset values, the range of validity and the type of
memory of the defined variables of each of the instances.
The variables that are declared in this section shall not be made available for writing through
a memory bank.
11 Definition of commands
11.1 General
Table 19 to Table 22 give an overview of the control device's event messages and
commands.
Event message name Event source information Event info References Command
subclause
INPUT NOTIFICATION (device/instance, event) device/instance event 9.6.2 and 9.7.4 11.3.1
Send
twice
DTR0
DTR1
DTR2
Answer
App Ctrl
Input dev
IDENTIFY DEVICE Device 0xFE 0x00 9.14.3 11.4.2
RESET POWER CYCLE SEEN Device 0xFE 0x01 9.12.1 11.4.3
Send
twice
DTR0
DTR1
DTR2
Answer
App Ctrl
Input dev
QUERY VERSION NUMBER Device 0xFE 0x34 4.2 11.6.7
QUERY NUMBER OF INSTANCES Device 0xFE 0x35 9.4 11.6.9
QUERY CONTENT DTR0 Device 0xFE 0x36 11.6.8
BS EN 62386-103:2014
Send
twice
DTR0
DTR1
DTR2
Answer
App Ctrl
Input dev
SET PRIMARY INSTANCE GROUP (DTR0) Device Instance 0x64 9.4.5 11.8.4
SET INSTANCE GROUP 1 (DTR0) Device Instance 0x65 9.4.5 11.8.5
SET INSTANCE GROUP 2 (DTR0) Device Instance 0x66 9.4.5 11.8.6
SET EVENT SCHEME (DTR0) Device Instance 0x67 9.6.2 11.8.7
SET EVENT FILTER (DTR2, DTR1, DTR0) Device Instance 0x68 9.6.4 11.8.9
Send
twice
DTR0
DTR1
DTR2
Answer
TERMINATE 0xC1 0x00 0x00 11.10.1
INITIALISE (device) 0xC1 0x01 device 9.14 11.10.3
BS EN 62386-103:2014
The event message notifies of a change or a series of changes of “inputValue” at the instance
of an input device as required by this specification or by the Part 3xx of IEC 62386
corresponding to the “instanceType” of the instance.
The event notifies of a control device power cycle completion and shall be generated following
the requirements as stated in 9.12.2.
11.4.1 General
Device control instructions are used to modify property values of a control device. For this
reason a device control instruction shall not be executed, unless it is received twice according
to the requirements as stated in 9.3 of IEC 62386-101:2014.
Unless explicitly stated otherwise in the description of particular device control instruction, the
following holds:
• the instruction shall be ignored if so required by the provisions of 9.5 of this standard;
• the control device shall not reply to the instruction.
The control device shall start or restart a 10 s ±1 s identification procedure which shall enable
an observer to distinguish any control device(s) running this process from any devices (of the
same type) which are not running it.
Identification can be used during commissioning in that it allows the installer to e.g. allocate
the particular identified device to a particular device group.
The indication can be done e.g. by flashing a LED, by producing a sound or other visual or
audible means. The exact process used to identify is manufacturer specific and should be
described in the manual.
NOTE The application controller can also stop the identification process using a “RESET” command.
This command shall reset “powerCycleSeen” of the receiving control device to FALSE.
11.5.1 General
Device configuration instructions are used to change the configuration and/or the mode of
operation of the control device. For this reason a device configuration instruction shall not be
executed, unless it is received twice according to the requirements as stated in 9.3 of
IEC 62386-101:2014.
• the instruction shall be ignored if so required by the provisions of 9.5 of this standard;
• the control device shall not reply to the instruction.
11.5.2 RESET
All variables shall be changed to their reset values. Control devices shall start to react
properly to commands no later than 300 ms after the instruction has been received.
If during a reset mains power fails, it is not guaranteed that “RESET” is completed.
The command shall trigger the process to change the memory bank content to its reset values
as follows:
• if “DTR0” = 0: all implemented and unlocked memory banks except memory bank 0 shall
be reset;
• in all other cases: the memory bank identified by “DTR0” shall be reset, provided it is
implemented and unlocked.
The command shall be ignored if “DTR0” does not contain a valid “shortAddress” value.
NOTE There is no command to explicitly disable memory write access, since any command that is not directly
involved with writing into memory banks will reset “writeEnableState” back to DISABLED.
If “DTR0” does not correspond to an implemented operating mode, the command shall be
ignored.
The control device shall set those bits in “deviceGroups[15:0]” that are set in [“DTR2:DTR1”].
The other bits shall not change.
The control device shall set those bits in “deviceGroups[31:16]” that are set in [“DTR2:DTR1”].
The other bits shall not change.
The control device shall clear those bits in “deviceGroups[15:0]” that are set in
[“DTR2:DTR1”]. The other bits shall not change.
The control device shall clear those bits in “deviceGroups[31:16]” that are set in
[“DTR2:DTR1”]. The other bits shall not change.
The control device shall start or restart quiescent mode by setting “quiescentMode” to
ENABLED and (re-)triggering the timer.
The control device shall physically store all device and instance variables identified in
Table 17 and Table 18 as non-volatile memory (NVM). This shall include all device and
instance NVM variables defined in the applicable Parts 3xx.
The control device might not react to commands after reception of this command. Control
devices shall start to react properly to commands no later than 300 ms after the instruction
has been received.
This command is recommended to be used typically after commissioning. Due to the limited
number of write-cycles of persistent memory, application controlers should limit the use of this
command. Internal processing of data might be suspended while this command is being
executed.
11.6.1 General
Device queries are used to retrieve device property values from a control device. The
addressed control device returns the queried property value in a backward frame.
Unless explicitly stated otherwise in the description of particular device query, the following
holds:
• the query shall be ignored if so required by the provisions of 9.5 of this standard.
When applicable, the query shall be ignored if any of the parameter values (in “DTR0”,
“DTR1” and “DTR2”) are outside the range of validity of the addressed device variables, as
given in Table 17.
The answer shall be the status, which is formed by a combination of control device properties.
The answer shall be the detailed error information regarding an application controller:
The answer shall be the detailed error information regarding an input device:
• if an error in the input device has occurred (as indicated by “inputDeviceError”), but the
device is not able to give detailed error information: MASK;
• if no input device error has occurred: NO.
NOTE Since the control device answers only if no short address is stored, the use of the command is useful only
in broadcast mode or when device group addressing is used.
The query shall be ignored if the memory bank identified by “DTR1” is not implemented.
If executed, the answer shall be the content of the memory location identified by offset
“DTR0” within memory bank “DTR1”.
The control device shall answer NO if the addressed memory location is not implemented.
If the addressed offset is below location 0xFF in the bank, the control device shall increment
“DTR0” by one.
The answer shall be YES when “operatingMode” is in the range [0x80,0xFF] and NO
otherwise.
The answer shall be the version number of Part 3xx of this standard where xx is given by
DTR0.
Refer to IEC 62386 Part 3xx, subclause 4.2 for further information.
Instance control instructions are used to modify property values of an instance of an input
device.
Unless explicitly stated otherwise in the description of particular instance control instruction,
the following holds:
• the instruction shall be ignored if so required by the provisions of 9.5.3 of this standard;
• the input device shall not reply to the instruction.
NOTE This edition of Part 103 of the standard does not describe any instance control instructions. However, the
above requirements do apply to instance instructions described in Parts 3xx.
11.8.1 General
Instance configuration commands are used to change the configuration and/or the mode of
operation of an instance within the input device. For this reason an instance configuration
instruction shall not be executed, unless it is received twice according to the requirements as
stated in 9.3 of IEC 62386-101:2014.
• the instruction shall be ignored if so required by the provisions of 9.5.3 of this standard;
• the input device shall not reply to the instruction.
The instance shall have the primary membership to an instance group assigned or removed,
by setting “instanceGroup0” to “DTR0”.
The command shall be ignored if “DTR0” is not in the range [0,31] and different from MASK.
The instance shall have an additional membership to an instance group assigned or removed,
by setting “instanceGroup1” to “DTR0”.
The command shall be ignored if “DTR0” is not in the range [0,31] and different from MASK.
The instance shall have an additional membership to an instance group assigned or removed,
by setting “instanceGroup2” to “DTR0”.
The command shall be ignored if “DTR0” is not in the range [0,31] and different from MASK.
The instance shall, if the provisions identified in 9.6.2 allow so, apply a new event addressing
scheme for subsequent “INPUT NOTIFICATION (device/instance, event)” events by setting
“eventScheme” to “DTR0”.
NOTE Circumstances may dictate that the operation cannot be granted by the receiving instance, meaning that
the answer to the corresponding “QUERY EVENT SCHEME” can be different from the event scheme requested
here.
11.9.1 General
Instance queries are used to retrieve instance property values from an instance of an input
device. The addressed input device returns the property value queried in a backward frame.
Unless explicitly stated otherwise in the description of particular instance query, the following
holds:
• the query shall be ignored if so required by the provisions in 9.5.3 of this standard;
• if the query addresses multiple instances within the input device, the query shall be
answered as if each instance is a logical device (see IEC 62386-101:2014, subclause
9.5.2).
• if an error has occurred (as indicated by “instanceError”), but the instance is not able to
give detailed error information: MASK.
• if no error has occurred: NO.
NOTE Detailed error information is instance type specific and is described in Parts 3xx of this standard.
The answer shall be YES, if “instanceActive” is TRUE in at least one of the addressed
instances, and NO otherwise.
The instance shall latch a new “inputValue” and reply with the most significant byte of the
latched input value.
If the query addresses multiple instances within the input device, it shall be ignored.
The instance shall reply with the next byte from a latched “inputValue”.
Following the least significant byte of the latched input value, the answer shall be NO, until a
new “QUERY INPUT VALUE” has been executed.
If the query addresses multiple instances within the input device, it shall be ignored.
• if directly preceded by “QUERY FEATURE TYPE”, and more than one device/instance
feature is supported: the first and lowest device/instance feature number;
• if directly preceded by “QUERY NEXT FEATURE TYPE”, and not all device/instance
features have been reported: the next lowest device/instance feature number;
• if directly preceded by “QUERY NEXT FEATURE TYPE”, and all device types have been
reported: 254;
• in all other cases: NO.
The sequence of commands shall only be accepted as long as they use the same address
byte instance byte combination. Multi-master transmitters shall send such sequence as a
transaction.
11.10.1 General
All special mode commands shall be interpreted as instructions unless explicitly stated
otherwise.
11.10.2 TERMINATE
The following processes shall be terminated immediately upon reception of this command:
The command could also terminate other processes as identified in the relevant 3xx parts.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 59 –
This command shall not be executed, unless it is received twice according to the
requirements as stated in 9.3 of IEC 62386-101:2014.
Only devices matching the given device shall respond to the command, as indicated in Table
23:
The command shall start or prolong the initialisation state, by setting “initialisationState” to
ENABLED if it was DISABLED and (re-)trigger the timer. There shall be no answer.
11.10.4 RANDOMISE
This instruction shall not be executed, unless it is received twice according to the
requirements as stated in 9.3 of IEC 62386-101:2014.
If executed, the instruction shall generate a random value for “randomAddress”, in the range of
[0x000000,0xFFFFFE] which shall be available within 100 ms for use.
If there are multiple logical units present and the command is received using broadcast
addressing, the generated random addresses within the bus unit shall be unique, i.e. every
logical unit shall have a random address that is not found in any of the other logical units
contained in the bus unit.
There shall be no reply to this instruction. Refer to 9.14 for further information.
11.10.5 COMPARE
11.10.6 WITHDRAW
NOTE 1 Before withdrawing a control device, the application controller may want to assign it a short address,
using “PROGRAM SHORT ADDRESS (data) ”.
NOTE 2 The effect is that the control device is excluded from subsequent “COMPARE” operations, thus allowing
the application controller to conduct a (binary) search operation across all devices until the “COMPARE” query
leads to no answer (from any control device) on the bus.
If the query is executed, the answer shall be YES if “shortAddress” is equal to given data, and
NO otherwise.
If the command is executed, the control device shall write data into the memory location
identified by offset “DTR0” within memory bank “DTR1” and return data as an answer.
NOTE 2 Simultaneous writing to multiple control devices will probably lead to framing errors because of colliding
answers.
NOTE 3 The value that can be read from the memory bank location is not necessarily data.
• not implemented, or
• above the last accessible memory location, or
• locked (see 9.10.2), or
• not writeable,
the answer to WRITE MEMORY LOCATION (DTR1, DTR0, data) shall be NO and no memory
location shall be written to.
If the addressed offset is below location 0xFF in the bank, the control device shall increment
“DTR0” by one.
This instruction is identical to the “WRITE MEMORY LOCATION (DTR1, DTR0, data)”
command (see 11.10.13), except that the receiving control device shall not reply to the
command.
If the command is executed, the control device shall copy the value of offset to “DTR0”, then
data shall be written into the memory location identified by “DTR0” within memory bank
“DTR1” and return data as an answer.
NOTE 2 Simultaneous writing to multiple control devices will probably lead to framing errors because of colliding
answers.
• not implemented, or
• above the last accessible memory location, or
• locked (see 9.10.2), or
• not writeable
the answer to WRITE MEMORY LOCATION (DTR1, DTR0, data) shall be NO and no memory
location shall be written to.
If the addressed offset is below location 0xFF in the bank, the control device shall increment
“DTR0” by one.
“DTR1” shall be set to the given data1; “DTR0” shall be set to the given data0.
“DTR2” shall be set to the given data2; “DTR1” shall be set to the given data1.
The instruction shall be executed unless any of the following conditions hold:
• Cb ≠ 0
• PPPb > 5
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 63 –
• PPPb < 1
• Ab = 1 and “applicationControllerPresent” = FALSE
If executed, and Ab = 0: a 24 bit forward frame shall be sent with the following content:
If executed, and Ab = 1: a 16 bit forward frame shall be sent with the following content:
As the command is not addresseable, the command shall be executed once per bus unit
independent of its number of instances and/or logical devices.
The forward frame shall be sent using priority PPPb and shall then be repeated RRb times. If
Tb = 1, the frames shall be sent in a transaction. If Tb=0, the repeated frames shall be sent
using the priority set by PPPb.
NOTE This command is used within the test procedures to test collision detection for multi-master application
controller and input devices.
12 Test procedures
12.1.1 General
The requirements of IEC 62386-101:2014, 12.1 apply also for control device tests.
Each test sequence indicates whether it shall be run for all logical devices in parallel or per
selected logical device.
If a bus powered device containing an internal bus power supply is tested according to this
part, such a device shall be handled as a bus powered device in all tests. There shall be no
external power supply, effectively keeping the internal bus power supply off during testing.
If a device contains a bus power supply, the tests as defined in IEC 62386-101 shall be
executed.
If not mentioned otherwise, each command shall be sent using one of the following device
addressing modes:
• broadcast, if the test shall be run for all logical units in parallel;
• short address of the logical unit under test, if the test shall be run for each selected logical
unit.
When a command has to be sent to a different device address, the address shall be given in
the form as follows:
When an instance command has to be sent the address shall be given as follows:
When a feature command has to be sent the address shall be given as follows:
If not mentioned otherwise, the configuration commands shall be sent twice. When a
command needs to be sent once, it is noted as:
The DUT shall be connected to the bus interface and mains power (if applicable).
The power supply shall be set to the values defined in 12.2 by GLOBAL_VBusHigh,
GLOBAL_VBusLow, GLOBAL_Ibus.
If not mentioned otherwise, the tester shall use the fall time, rise time, half bit time, double
half time, and settling time (between any frame and a forward frame) given in the global
variables. Moreover, the power supply shall be adjusted to the values defined by the global
variables.
Each output message of the tests executed on a logical unit shall be preceded by the string
“LogicalUnit” followed by the short address of the logical unit under test. The output message
shall look as:
A dash ("-") given in any table for "command" should be interpreted as "send nothing".
This instruction is used to send a waveform with special timing requirements, like particular
settling times or pulse times.
The very next frame after sending the complete waveform will be returned. If there is no
activity until the timeout is reached, NO will be returned.
Additionally the time between the trigger event and the start of the pulse can be defined and
also the duration of the pulse itself. The pulse is sent once after the trigger condition is met
and is not repeated on other occurrences of the trigger condition.
This command is used to start a bus recording for later analysis of the recorded signal. This
command clears previous recordings.
Additionally a trigger condition can be provided to define the exact starting point of the
recording. This command also clears previous recordings.
This command is used to parse a recording for a certain command. The return value shall be
the number of occurences of the specified command within this part of the recording or zero if
no occurences found.
This command returns the time difference between a specified reference point and the start –
first falling edge – of the first occurrence of the specified frame after the reference point within
a recording. If after the reference point in the recording no searched frame is contained the
command shall return a negative number.
This command returns the time difference between a specified reference point and the start of
the first occurrence of a stop condition after the reference point within a recording. If the bus
is already idle at the reference point and continues to be idle for the time period of a stop
condition, the command shall return zero.
BS EN 62386-103:2014
– 66 – IEC 62386-103:2014 © IEC 2014
If after the reference point in the recording no stop condition is contained the command shall
return a negative number.
This command is used to parse a recording for a break condition (minimum 1,2 ms active
state). The return value shall be true if a break condition is part of the recording at least once
or false if not.
Contains = FindBreakCondition(Recording)
This command returns the time difference between a specified reference point and the start of
the first occurrence of a break condition (minimum 1,2 ms active state) after the reference
point within a recording. If the bus is already in active state at the reference point and
continues to be idle for the break time, the command shall return zero.
If after the reference point in the recording no break condition is contained, the command
shall return a negative number.
This command returns the time difference between two specified reference points within a
recording. The time difference is calculated on the basis of Trigger Condition 2 – Trigger
Condition 1.
The current test procedures can be executed on a DUT with a maximum of 63 logical units.
Short address 63 is reserved for testing purpose.
A DUT shall be claimed to be compliant to the IEC 62386 standard only if all tests are passed
without any error for all logical units.
Whenever within a test procedure a command is sent, a series of possible outcomes can
follow:
• Backward Frame;
• No Answer;
• Any Violation (Bit Timing, Frame Sequence, Frame Size).
• a query for a value has to be answered with a valid backward frame containing a value
within a certain range of validity;
• a Yes/No query has to be answered with “No Answer” or a valid backward frame
containing 255;
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 67 –
Often such incidents do not indicate a malfunction against the subject of the current test
procedure, but a communication problem in general.
unexpected
Command name
Violation Value No Answer
unexpected
Command name
Violation Value No Answer
If in certain cases a test procedure has to check on an exception, e.g. no answer when using
a different address than the DUT is configured for, this can be indicated by using the “accept”
statement followed by the exceptions which shall be excluded from the general exception
handling. The exception then is returned to the function caller and can be handled there
individually.
12.2 Preamble
The test preamble sets the global parameters, checks the default values if the device is
factory new, and assigns to each logical unit a short address equal to its index. For each
logical unit the following information is stored:
• instance Types (an array showing the types of the implemented instances);
• feature Types (a sub-array of instances, showing the types of the implemented features);
• extendedVersionNumber (an array of extended version numbers of Parts 103 and 3xx);
• runTests (indicates whether tests shall be performed for that logical unit).
Test description:
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 69 –
if (GLOBAL_MultiMasterControlDevice == No)
SingleMasterApplicationControllerPING ()
halt 2 No further test procedures are applicable to a single master application controller.
else
answer = QUERY DEVICE CAPABILITIES
if (answer == NO)
halt 2 DUT not found
endif
endif
report 1 The check for factory default variables will be skipped for this DUT since the
device is not factory new.
operatingMode = QUERY OPERATING MODE
endif
// Get information per logical unit and store them as global parameters
for (i = 0; i < 97; i++)
GLOBAL_logicalUnit[j].extendedVersions[i] = -1
endfor
// query 103 version (same as for instance type 0)
GLOBAL_logicalUnit[j].extendedVersions[0] = GetVersionNumber ()
for (j = 0; j < GLOBAL_numberShortAddresses; j++)
GLOBAL_logicalUnit[j].numberOfInstances = QUERY NUMBER OF
INSTANCES, send to device (ShortAddress (j))
for (i = 0; i < GLOBAL_logicalUnit[j].numberOfInstances; i++)
// query instance type
answer = QUERY INSTANCE TYPE, send to device ShortAddress (j),
send to instance InstanceNumber (i)
GLOBAL_logicalUnit[j].instanceTypes[i] = answer
// query instance type version
if (GLOBAL_logicalUnit[j].extendedVersions[answer] == -1)
DTR0 (answer)
GLOBAL_logicalUnit[j].extendedVersions[answer] = QUERY
EXTENDED VERSION NUMBER, send to device ShortAddress (j)
endif
// query feature type
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 71 –
// Test factory default values of the variables which are different per logical unit
if (factoryNewDevice == Yes)
for (logicalUnitAddress = 0; logicalUnitAddress <
GLOBAL_numberOfLogicalUnits; logicalUnitAddress++)
CheckFactoryDefault103PerLogicalUnit (logicalUnitAddress;
operatingMode)
endfor
endif
// Define a variable to be used for further testing, to know which logical unit is under
test
GLOBAL_currentUnderTestLogicalUnit = 0
// If multiple logical units are available in the bus unit, ask the user if tests shall be
run for all logical units or for specific ones
if (GLOBAL_numberOfLogicalUnits != 1)
answer = UserInput (Shall the tests be run for all logical units?, YesNo)
if (answer == Yes)
for (i = 0; i < GLOBAL_numberOfLogicalUnits; i++)
GLOBAL_logicalUnit[i].runTests = true
endfor
BS EN 62386-103:2014
– 72 – IEC 62386-103:2014 © IEC 2014
else
for (i = 0; i < GLOBAL_numberOfLogicalUnits; i++)
answer = UserInput (Shall the tests be run for logical unit with index
i ?, YesNo)
if (answer == Yes)
GLOBAL_logicalUnit[i].runTests = true
else
GLOBAL_logicalUnit[i].runTests = false
endif
endfor
endif
else
// Tests shall be run for the only one logical unit available in the bus unit
GLOBAL_logicalUnit [0] .runTests = true
endif
endif
endif
12.2.1.1 CheckFactoryDefault103
The test subsequence checks the 103 factory default variables. As the operating mode can
differ per logical unit it is checked either in this subsequence or after each logical device has
a short address assigned with the test subsequence CheckFactoryDefault103PerLogicalUnit()
subsequence.
Test description:
(operatingMode) = CheckFactoryDefault103 ()
else
report 4 DUT is in a manufacturer specific mode, operating mode answer.
operatingMode = answer
endif
endif
endif
return (operatingMode)
BS EN 62386-103:2014
– 74 – IEC 62386-103:2014 © IEC 2014
12.2.1.2 AddressPreamble
The test subsequence clears all short addresses, then discovers the logical units available in
a bus unit and gives each of them a short address equal to their index number. The
subsequence returns the number of logical units found.
Test description:
numAssignedShortAddresses = AddressPreamble ()
searchCompleted = false
numAssignedShortAddresses = 0
assignedAddresses[63] = false
highestAssigned = -1
// Clear all short addresses, then detect all units and assign them short addresses
DTR0(MASK)
SET SHORT ADDRESS
INITIALISE (MASK)
RANDOMISE
wait 100 ms // after stop condition of RANDOMISE command
while (!searchCompleted )
// Check if any unit is still unaddressed
SetSearchAddress (0xFFFFFF)
answer = COMPARE
if (answer == NO)
searchCompleted = true
endif
if (!searchCompleted)
if (numAssignedShortAddresses < 63)
searchAddress = 0xFFFFFF
for (i = 23; i >= 0; i--)
mask = (1 << i)
searchAddress = searchAddress & (~mask)
SetSearchAddress (searchAddress)
answer = COMPARE
if (answer == NO)
// No unit in the requested random address range => revert mask
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 75 –
12.2.1.3 CheckFactoryDefault103PerLogicalUnit
The test subsequence checks the default values of operating mode, for each logical unit, in
case these were not tested before.
Subsequence shall be run for the logical unit with short address given by address variable.
Test description:
if (operatingMode == -1)
answer = QUERY OPERATING MODE, send to device ShortAddress (address)
if (answer == 0)
report 1 Logical unit address is in the 0x00 operating mode.
else
if (0x01 <= answer AND answer <= 0x7F)
error 1 Logical unit address: Logical unit is in a reserved operating mode.
Actual: answer. Expected: 0, [0x80,0xFF].
report 2 In order to proceed with testing, logical unit address is set to operating
mode 0x00.
DTR (0)
SET OPERATING MODE, send to device ShortAddress (address)
else
report 3 LogicalUnit address: Logical unit is in a manufacturer specific mode,
operating mode answer.
endif
endif
endif
// Check default value of the 103 device variables
answer = QUERY DEVICE CAPABILITIES, send to device ShortAddress (address), accept
Value
answer2 = QUERY DEVICE STATUS, send to device ShortAddress (address), accept Value
if (answer != 0000 00XXb)
error 2 Unused bytes not set to zero. Answer: answer. Expected: 0000 00XXb.
endif
if (answer == XXXX XXX1b)
GLOBAL_logicalUnit[address].applicationController == true
report 4 Application controller present.
else
GLOBAL_logicalUnit[address].applicationController == false
report 5 No Application controller present.
endif
if (answer2 == 0XX0 X000b)
error 3 Wrong value for device status. Answer: answer. Expected: 0XX0 X000b.
endif
if (answer == XXXX XXX0b AND answer2 == XXXX 1XXXb)
error 4 Non existing application controller is reported active. Answer: answer2.
Expected: XXXX 0XXXb.
endif
if (answer == XXXX XXX1b AND answer2 == XXXX 0XXXb)
error 5 Wrong default value for application controller status. Answer: answer2. Expected:
XXXX 1XXXb (enabled).
endif
// Check default value of the 103 instance variables
for (i = 0; i < GLOBAL_logicalUnit[address].numberOfInstances; i++)
for (j = 0; j <= 6; j++)
answer = query[j], send to device ShortAddress (address), send to instance
InstanceNumber (i), accept Value
if (answer != expectedAnswer[j])
error 6 Wrong default value at instance i for variable[j]. Answer: answer.
Expected: expectedAnswer[j].
endif
endfor
answer = QUERY INSTANCE TYPE, send to device ShortAddress (address), send to
instance InstanceNumber (i), accept Value
if (answer >= 32)
error 7 Wrong instance type number at instance i. Answer: answer. Expected: [0,
31].
else if (answer == 0)
eventFilter = GetEventFilter (send to device ShortAddress (address), send to
instance InstanceNumber (i))
if (eventFilter != 0xFFFFFF)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 77 –
12.2.1.4 SingleMasterApplicationControllerPING
For installation troubleshooting single master application controllers are meant to send out a
cyclic PING message. This subsequence checks for the first PING being sent between 5 min
to 10 min after power on and a cyclic repetition after 10 min with 10% tolerance.
Also the test checks on the single master transmitter bit timings on all of the repetitive PING
messages.
Test description:
SingleMasterApplicationControllerPING ()
// Wait for first PING after power up occurs between 5 min and 10 min
PowerCycleAndWaitForDecoder (5)
StartBusRecording (record)
start_timer (timer)
do
pingFound = FindFrame (record, PING)
timestamp = get_timer (timer) // time in seconds
while (pingFound == 0 AND timestamp < 600)
if (pingFound == 0)
error 1 Single master application controller did not sent PING command within 10 min
after power up.
else
if (timestamp < 300)
error 2 Single master application controller sent PING before 5 min after power up.
Actual: timestamp s. Expected: >= 300s.
else
report 1 Single master application controller sent PING timestamp s after power up.
endif
for (k = 0; k < 2; k++)
// Wait for next PING occurs between 10 min +/-10%
StartBusRecording (record)
BS EN 62386-103:2014
– 78 – IEC 62386-103:2014 © IEC 2014
start_timer (timer)
do
pingFound = FindFrame (record, PING)
timestamp = get_timer (timer) // time in seconds
while (pingFound == 0 AND timestamp < 660)
if (pingFound == 0)
error 3 Single master application controller did not repeated PING command
within 10 min +10%.
else
if (timestamp < 540)
error 4 Single master application controller repeated PING before 10 min -
10%. Actual: timestamp s. Expected: >= 540s.
else
report 2 Single master application controller repeated PING after
timestamp s.
endif
for (i = 0; i < 6; i++)
timeTe = Measure (Time of period[i] of PING frame at 8 V in µs)
if (TeNo[i] == 1)
if (timeTe < 336 OR timeTe > 467)
error 5 Incorrect half bit timing at period[i] in PING. Actual:
timeTe µs. Expected: 336 µs <= half bit time <= 467 µs.
else
report 3 Half bit timing at period[i] in PING. Actual: timeTe µs.
endif
endif
if (TeNo[i] == 2)
if (timeTe < 733 OR timeTe > 934)
error 6 Incorrect double half bit timing at period[i] in PING.
Actual: timeTe µs. Expected: 733 µs <= double half bit time <=
934 µs.
else
report 4 Double half bit timing at period[i] in PING. Actual: timeTe
µs.
endif
endif
endfor
for (j = 0; j < 2; j++)
fallTimeRelative = Measure (Time between 10% and 90% of the signal
voltage swing for edge[i] falling edge in PING frame in µs)
riseTimeRelative = Measure (Time between 10% and 90% of the signal
voltage swing for edge[i] rising edge in PING frame in µs)
if (fallTimeRelative < 3)
error 7 Wrong fall time at GLOBAL_VbusHigh V and 250 mA in edge[i]
falling edge in PING frame. Actual: fallTimeRelative µs. Expected: >=
3 µs.
endif
if (riseTimeRelative < 3)
error 8 Wrong rise time at GLOBAL_VbusHigh V and 250 mA in
edge[i] rising edge in PING frame. Actual: riseTimeRelative µs.
Expected: >= 3 µs.
endif
endfor
for (j = 0; j < 2; j++)
voltage = Measure (Last high voltage of signal before edge[i] edge in V)
if (voltage < 12)
fallTimeAbsolute = Measure (Time between (GLOBAL_VbusHigh -
0,5) V and 4,5 V of edge[i] falling edge in backward frame in µs)
riseTimeAbsolute = Measure (Time between 4,5 V and
(GLOBAL_VbusHigh - 0,5) V of edge[i] rising edge in backward frame
in µs)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 79 –
else
fallTimeAbsolute = Measure (Time between 11,5 V and 4,5 V of
edge[i] falling edge in backward frame in µs)
riseTimeAbsolute = Measure (Time between 4,5 V and 11,5 V of
edge[i] rising edge in backward frame in µs)
endif
if (fallTimeAbsolute > 25)
error 9 Wrong fall time at GLOBAL_VbusHigh V and 250 mA in edge[i]
falling edge in PING frame. Actual: fallTimeAbsolute µs. Expected: <=
25 µs.
endif
if (riseTimeAbsolute > 25)
error 10 Wrong rise time at GLOBAL_VbusHigh V and 250 mA in
edge[i] rising edge in PING frame. Actual: riseTimeAbsolute µs.
Expected: <= 25 µs.
endif
endfor
endif
endfor
endif
StopBusRecording (record)
Table 27 – Parameters for test sequence Transmitter bit timing
Test sequence checks if DUT is polarity insensitive with regard to bus interface connections.
Test sequence applies for DUTs without or with an inactive integrated bus power supply.
Test description:
if (GLOBAL_internalBPS == No)
answer = QUERY DEVICE CAPABILITIES, accept No Answer
if (answer != NO)
report 1 Communication possible at current polarity.
else
error 1 No communication at current polarity.
endif
Change (Swap data wires at DUT bus interface)
BS EN 62386-103:2014
– 80 – IEC 62386-103:2014 © IEC 2014
wait 100ms
answer = QUERY DEVICE CAPABILITIES, accept No Answer
if (answer != NO)
report 2 Communication possible at inverted polarity.
else
error 2 No communication at inverted polarity.
Change (Swap data wires at DUT bus interface)
wait 100ms
endif
else
report 3 Polarity test not executed due to presence of internal power supply.
endif
Test sequence checks if the interface is able to withstand the maximum and minimum voltage
ratings.
Test description:
if (GLOBAL_Ibus == 0)
report 1 Test not executed since device under test does not allow for additional external
power supplies.
else
Apply (Current of GLOBAL_Ibus mA + 10 mA on bus interface)
for (i = 0; i < 2; i++)
Vbus = voltage[i]
Apply (Disconnect interface)
Apply (Voltage of Vbus V on bus interface)
Apply (Reconnect interface)
// The voltage may change
wait 1 min
Apply (Voltage of GLOBAL_VbusHigh V on bus interface)
DTR0 (13)
for (j = 0; j < 12; j++)
DTR0 (value[j])
answer = QUERY CONTENT DTR0
if (answer != value[j])
error 1 No successful operation after applying rating of Vbus V at bus
interface for 1 min. Actual: answer. Expected: value[j].
endif
endfor
endfor
endif
Table 28 – Parameters for test sequence Maximum and minimum system voltage
Test step i 0 1
voltage [V] 22,5 -6,5
Test step j 0 1 2 3 4 5 6 7 8 9 10 11
value 0 1 2 4 8 16 32 64 85 128 170 255
Check over-voltage protection of the interface for the maximum rated external voltage of the
system.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 81 –
Test description:
Test sequences checks current consumption while the bus is in idle state.
Test description:
if (GLOBAL_internalBPS == Yes)
report 1 Test is not applicable.
BS EN 62386-103:2014
– 82 – IEC 62386-103:2014 © IEC 2014
else
currentLimit = 2
if (GLOBAL_busPowered)
currentLimit = UserInput (Enter the current consumption shown on the label or
stated in the literature, value [mA])
endif
Apply (Linear voltage change from 0 V to 22,5 V within 10 s to bus terminals as
illustrated in Phase 1 of Figure 2)
QUERY CONTENT DTR0
// Voltage drop shall be applied directly after valid stop condition of forward frame to
discharge internal capacitor of the receiver
Apply (Immediate voltage drop from 22,5 V to 0 V - see Figure 2)
Apply (Voltage of 0 V during 20 s - see Phase 2 in Figure 2)
Apply (Immediate voltage change from 0 V to 22,5 V at end of Phase 2 of Figure 2)
current1 = Measure (Maximum current consumption in mA at bus terminals during Phase
1)
current2 = Measure (Current consumption in mA at bus terminals during the immediate
voltage change at end of Phase 2)
if (current1 <= currentLimit)
report 2 Maximum current consumption measured during Phase1 is current1 mA.
Expected: <= currentLimit mA.
else
error 1 Wrong maximum current consumption during Phase1. Actual: current1 mA.
Expected: <= currentLimit mA.
endif
if (current2 <= currentLimit)
report 3 Maximum current consumption measured at end of Phase 2 is current2 mA.
Expected: <= currentLimit mA.
else
error 2 Wrong maximum current consumption at end of Phase 2. Actual: current2
mA. Expected: <= currentLimit mA.
endif
endif
Voltage
22,5 V
Phase 1
Phase 2
0V
10 s 20 s Time
IEC
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 83 –
Test description:
// 250 mA if allowed, internal current in case of single internal BPS. Maximum current allowed
is provided.
Apply (Current of GLOBAL_Ibus mA on bus interface)
// Test at minimum voltage and maximum current
if (GLOBAL_internalBPS)
Vbus = 12
Apply (Clamp bus voltage to Vbus V on bus interface)
else
Vbus = 10
Apply (Voltage of Vbus V on bus interface)
endif
CheckTxVoltages (Vbus; GLOBAL_Ibus)
if (GLOBAL_Ibus > 0)
// Test at 20,5 V and maximum current. GLOBAL_Ibus = 0 in case of single internal BPS
Apply (Voltage of 20,5 V on bus interface)
CheckTxVoltages (20,5; GLOBAL_Ibus)
endif
if (GLOBAL_internalBPS)
// Test at internal bus power supply voltage and maximum current if allowed
Apply (Voltage of GLOBAL_internalVoltage V on bus interface)
CheckTxVoltages (GLOBAL_internalVoltage; GLOBAL_Ibus)
// Test using only internal bus power supply
if (GLOBAL_Ibus > 0)
// Switch off test power supply, minimum current
Apply (Current of 0 mA on bus interface)
CheckTxVoltages (GLOBAL_internalVoltage; 0)
endif
else
// Test for current of 8 mA and different voltages
Apply (Current of 8 mA on bus interface)
Apply (Voltage of 10 V on bus interface)
CheckTxVoltages (10; 8)
Apply (Voltage of 20,5 V on bus interface)
CheckTxVoltages (20,5; 8)
endif
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
12.3.5.1 CheckTxVoltages
Test description:
Test sequence evaluates correctness of first and last falling and rising edges within a
backward frame at different voltage and current settings.
Test description:
endif
if (GLOBAL_internalBPS)
// Test at internal bus power supply voltage and maximum current
Apply (Voltage of GLOBAL_internalVoltage V on bus interface)
CheckMaximumTxRiseFallTimes (GLOBAL_internalVoltage; GLOBAL_Ibus])
// Test using only internal bus power supply if not covered by previous step
if (GLOBAL_Ibus > 0)
// Switch off test power supply
Apply (Current of 0 mA on bus interface)
CheckMaximumTxRiseFallTimes (GLOBAL_internalVoltage; 0)
else
CheckMinimumTxRiseFallTimes (GLOBAL_internalVoltage; 0)
endif
else
// Test for current of 8 mA and different voltages
Apply (Current of 8 mA on bus interface)
Apply (Voltage of 10 V on bus interface)
CheckMaximumTxRiseFallTimes (10; 8)
Apply (Voltage of 12 V on bus interface)
CheckMaximumTxRiseFallTimes (12; 8)
Apply (Voltage of 20,5 V on bus interface)
CheckMaximumTxRiseFallTimes (20,5; 8)
endif
Table 30 – Parameters for test sequence Transmitter rising and falling edges
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
12.3.6.1 CheckMinimumTxRiseFallTimes
This subsequence checks the minimum rise and fall times of a signal sent by transmitter.
Test description:
endfor
return
12.3.6.2 CheckMaximumTxRiseFallTimes
This subsequence checks the maximum rise and fall times of a signal sent by transmitter.
Test description:
This test sequence checks transmitter half bit time and double half bit timing being in limits.
Test description:
if (GLOBAL_Ibus > 0)
// Test for 20,5 V and maximum current if possible
Apply (Voltage of 20,5 V on bus interface)
CheckTxBitTiming (20,5; GLOBAL_Ibus)
endif
if (GLOBAL_internalBPS)
// Test at internal bus power supply voltage and maximum current if applicable
Apply (Voltage of GLOBAL_internalVoltage V on bus interface)
CheckTxBitTiming (GLOBAL_internalVoltage; GLOBAL_Ibus)
// Test using only internal bus power supply if not covered by previous step
if (GLOBAL_Ibus > 0)
// Switch off test power supply
Apply (Current of 0 mA on bus interface)
CheckTxBitTiming (GLOBAL_internalVoltage; 0)
endif
else
// Test for current equal to 8 mA and different voltages
Apply (Current of 8 mA on bus interface)
Apply (Voltage of 10 V on bus interface)
CheckTxBitTiming (10; 8)
Apply (Voltage of 20,5 V on bus interface)
CheckTxBitTiming (20,5; 8)
endif
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
12.3.7.1 CheckTxBitTiming
Test description:
endif
endfor
return
Table 31 – Parameters for test sequence Transmitter bit timing
Test description:
minTime = 100
maxTime = 0
for (i = 0; i < 12; i++)
DTR0 (value[i])
for (j = 0; j < 10; j++)
answer = QUERY CONTENT DTR0
answerTime = Measure (Settling time between forward frame and backward frame of
QUERY CONTENT DTR0 in ms)
// Test transmitter forward backward frame settling time according to Table 17
IEC62386-101 Ed2.0
if (answerTime < 5,5 OR answerTime > 10,5)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 89 –
error 1 Incorrect answer time at test step (i,j) = (i,j). Actual: answerTime ms.
Expected: 5,5 ms <= settling time <= 10,5 ms.
endif
if (answerTime < minTime)
minTime = answerTime
endif
if (answerTime > maxTime)
maxTime = answerTime
endif
endfor
endfor
report 1 Minimum measured settling time is minTime ms.
report 2 Maximum measured settling time is maxTime ms.
Table 32 – Parameters for test sequence Receiver frame timing
Test step i 0 1 2 3 4 5 6 7 8 9 10 11
value 0 1 2 4 8 16 32 64 85 128 170 255
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
• 40 ms bus power interruptions are ignored by control gear; tested four times;
• start-up behavior after a external power cycle is correct; tested four times. In case of no
internal bus power supply four different times are used;
• start-up behavior after a bus power failure is correct.
Test description:
Test step i 0 1 2 3
delayTime [ms] 50 250 340 500
busPowerDown [ms] 100 500 1000 2000
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
The test sequence checks if the receiver threshold is in the expected range.
Test description:
DTR0 (55)
Apply (Voltage of Vbus V on bus interface)
Apply (DTR0 (255) with low voltage of 6,5 V)
Apply (Voltage of GLOBAL_VbusHigh V on bus interface)
answer = QUERY CONTENT DTR0, accept No Answer
if (answer != 255)
if (Vbus < 10)
warning 1 DTR0 (255) not executed correctly for a bus high voltage of
Vbus V and a bus low voltage of 6,5 V. Loop: i Actual: answer. Expected:
255.
else
error 1 DTR0 (255) not executed correctly for a bus high voltage of Vbus V
and a bus low voltage of 6,5 V. Loop: i Actual: answer. Expected: 255.
endif
endif
endfor
endfor
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
Test description:
Vbus = GLOBAL_VbusHigh
for (i = 0; i < 4; i++)
nd
// Command byte send with nominal timing; boundary combinations in 2 byte.
for (m = 0; m < 5; m++)
lowTime = TeLowTime[m]
for (n = 0; n < 5; n++)
highTime = TeHighTime[n]
for (j = 0; j < 10; j++)
DTR0 (0)
// All other commands shall be executed with nominal timing
Apply (command[i] with bit timings given in Table)
answer = QUERY CONTENT DTR0
if (answer != expectation[i])
error 1 command[i] not correctly executed at half bit high time
highTime µs half bit low time lowTime µs. Actual: answer. Expected:
expectation[i].
endif
endfor
endfor
endfor
endfor
for (i = 4; i < 11; i++)
// step 4: no violation
// step 5: 750 µs half bit violation high bit 5
// step 6: 750 µs half bit violation low bit 2
// step 7: 1250 µs double half bit violation low bit 4 and 3
// step 8: 1250 µs double half bit violation low bit 8 and 7
// step 9: 1200 µs double half bit violation low bit 4 and 3
BS EN 62386-103:2014
– 92 – IEC 62386-103:2014 © IEC 2014
Test step m 0 1 2 3 4
Test step n 0 1 2 3 4
Test step l 0 1
busVoltage [V] 10 20,5
Test step i 0 1 2 3 4 5 6 7 8 9 10
command DTR0 (240) DTR0 (15) DTR0 (85) DTR0 (255) DTR0 (15) DTR0 (15) DTR0 (15) DTR0 (15) DTR0 (15) DTR0 (15) DTR0 (15)
expectation 240 15 85 255 15 0 0 0 0 0 0
bus bus bus bus bus time bus bus bus bus bus bus
time time time time time time time time time time
voltage / volta volta volta volta volta [µs] volta volta volta volta volta volta
[µs] [µs] [µs] [µs] [µs] [µs] at [µs] [µs] [µs] [µs]
time ge ge ge ge ge at ge ge ge ge ge ge
at 8V at 8V at 8V at 8V at 8V 8V at 8V at 8V at 8V at 8V
[V] [V] [V] [V] [V] 8V [V] [V] [V] [V] [V] [V]
BS EN 62386-103:2014
0 416 0 416 0 416 0 416 0 334 0 334 0 334 0 334 0 334 0 334 0 334
start bit
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
0 416 0 416 0 416 0 416 0 334 0 334 0 334 0 334 0 334 0 334 0 334
bit 15
IEC 62386-103:2014 © IEC 2014
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
VBus 416 VBus 416 VBus 416 VBus 416 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
bit 14
0 416 0 416 0 416 0 416 0 500 0 500 0 500 0 500 0 500 0 500 0 500
0 416 0 416 0 416 0 416 0 500 0 500 0 500 0 500 0 500 0 500 0 500
bit 13
VBus 416 VBus 416 VBus 416 VBus 416 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
– 93 –
bit 12
0 416 0 416 0 416 0 416 0 334 0 334 0 334 0 334 0 334 0 334 0 334
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
bit 11
0 416 0 416 0 416 0 416 0 334 0 334 0 334 0 334 0 334 0 334 0 334
VBus 416 VBus 416 VBus 416 VBus 416 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
bit 10
0 416 0 416 0 416 0 416 0 334 0 334 0 334 0 334 0 334 0 334 0 334
0 416 0 416 0 416 0 416 0 500 0 500 0 500 0 500 0 500 0 500 0 500
bit 9
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
0 416 0 416 0 416 0 416 0 500 0 500 0 500 0 500 0 500 0 500 0 500
bit 8
VBus 416 VBus 416 VBus 416 VBus 416 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 600
lowTi high high high
0 VBus VBus 0 VBus 334 VBus 334 VBus 334 VBus 334 VBus 750 VBus 334 VBus 600
me Time Time Time
bit 7
high lowTi lowTi lowTi
VBus 0 0 VBus 0 500 0 500 0 500 0 500 0 500 0 500 0 500
Time me me me
lowTi high high high
bit 6 0 VBus 0 0 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
me Time Time Time
Test step i 0 1 2 3 4 5 6 7 8 9 10
high lowTi lowTi lowTi
VBus 0 VBus VBus 0 500 0 500 0 334 0 500 0 500 0 500 0 500
Time me me me
lowTi high high high
0 VBus VBus 0 VBus 334 VBus 750 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
me Time Time Time
bit 5
high lowTi lowTi lowTi
VBus 0 0 VBus 0 334 0 334 0 334 0 334 0 500 0 500 0 334
Time me me me
lowTi high high high
0 VBus 0 0 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
me Time Time Time
bit 4
high lowTi lowTi lowTi
VBus 0 VBus VBus 0 500 0 500 0 500 0 500 0 500 0 600 0 500
Time me me me
high lowTi lowTi lowTi
VBus 0 VBus 0 0 500 0 500 0 500 0 750 0 500 0 600 0 500
Time me me me
bit 3
lowTi high high high
0 VBus 0 VBus VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334 VBus 334
me Time Time Time
high lowTi lowTi lowTi
VBus 0 0 0 0 500 0 500 0 750 0 500 0 500 0 500 0 500
Time me me me
bit 2
lowTi high high high
0 VBus VBus VBus VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500 VBus 500
– 94 –
It is recommended that this test be repeated at the maximum and minimum operating temperature.
IEC 62386-103:2014 © IEC 2014
BS EN 62386-103:2014
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 95 –
All phase lengths (half bits and double half bits) are set to the same value. One phase is set
to special test value, resulting in a still valid waveform or causing a bit timing violation. The
test is repeated for different idle bus voltages.
Test description:
waveForm[28] = {417, 417, 417, 833, 833, 833, 417, 417, 417, 417,
833, 417, 417, 833, 417, 417, 417, 417, 417, 417,
833, 417, 417, 417, 417, 417, 417, 417}
// nominal timing for command DTR0(15)
for (i = 0; i <= 1; i++)
for (j = 0; j <= 8; j++)
for (k = 0; k <= 27; k ++) // k selects phase position to modify
// assemble the test frame
expected = expect [ j ]
for (x = 0; x <= 27; x++)
if (x == k)
// insert the modified phase length at the selected phase position
if (phase[ x ] == H)
// if a half bit starts in the middle of a logical bit it shall not be
extended as it would result in an valid double half bit and not in a
bit timing violation.
if (expect[ j ] == accept OR bitstart[ x ] == Y)
waveForm[ x ] = modHalf[j]
else
waveForm[ x ] = half[j]
expected = accept
endif
else
waveForm[ x ] = modDouble[j]
endif
else
// use a valid phase length at all other phase positions
if (phase[ x ] == H)
waveForm[ x ] = half[j]
else
waveForm[ x ] = double[j]
endif
endif
endfor
// send the test frame
for ( x = 0; x < 10; x ++)
DTR0(0)
// All other commands shall be executed with nominal timing
if (i == 0)
// minimum voltage
if (GLOBAL_internalBPS)
Apply (Clamp voltage to 12 V on bus interface)
busVoltage = 12
else
Apply (Voltage of 10 V on bus interface)
busVoltage = 10
endif
else
// maximum voltage
if (GLOBAL_Ibus == 0)
Apply (Voltage of GLOBAL_VbusHigh V on bus interface)
BS EN 62386-103:2014
– 96 – IEC 62386-103:2014 © IEC 2014
busVoltage = GLOBAL_VbusHigh
else
Apply (Voltage of 20,5 V on bus interface)
busVoltage = 20,5
endif
endif
Apply (waveForm[])
Apply (Voltage of GLOBAL_VbusHigh on bus interface)
answer = QUERY CONTENT DTR0
if ( expected == accept)
if ( answer != 15)
error 1 Test command DTR0 (15) not correctly executed with a
half bit time half [ j ] µs and double half bit time double [ j ] µs and a
modified half bit time modHalf [ j ] µs respectively double half bit
time modDouble [ j ] µs at signal phase k. Bus Voltage: busVoltage.
Actual: answer . Expected: 15.
endif
else
if ( answer != 0)
error 2 Test command DTR0 (15) not ignored or executed falsely
with a half bit time half [ j ] µs and double half bit time double [ j ] µs
and a modified half bit time modHalf [ j ] µs respectively double half
bit time modDouble [ j ] µs at signal phase k. Bus Voltage:
busVoltage. Actual: answer . Expected: 0.
endif
endif
endfor
endfor
endfor
endfor
Table 35 – Parameters for test sequence extended receiver bit timing
Phase
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
x
phase H H H D D D H H H H D H H D H H H H H H D H H H H H H H
bitstart Y N Y N N N N Y N Y N N Y N N Y N Y N Y N N Y N Y N Y N
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 97 –
12.3.13 Receiver forward frame violation
The test sequences checks if the receiver is able to recover after the reception of an non-
standard forward frame.
Test description:
Test
value waveform text
step i
2400 µs + 11010001111110000b + 2400 µs + 1 16 bit frame DTR0 (240) according Part 102
0 7
11111111 11111110 00110110b not ignored
2400 µs + 1010b + 2400 µs + 1 11111111 Few bits (frame size violation) changed the
1 10
11111110 00110110b content of DTR0
2400 µs + 1 11000001 00110000 00001111 0b 25 bit frame containing DTR0 (15) in first 24
2 0
+ 2400 µs + 1 11111111 11111110 00110110b bits not ignored
Test description:
if (answer0 != value[j])
error 1 Unexpected value for DTR0 for FF-FF settling time set to
settlingTime[i] ms. Actual: answer0. Expected: value[j].
endif
if (answer1 != value[j])
error 2 Unexpected value for DTR1 for FF-FF settling time set to
settlingTime[i] ms. Actual: answer1. Expected: value[j].
endif
else
if (answer0 != 13)
error 3 Unexpected value for DTR0 for FF-FF settling time set to
settlingTime[i] ms. Actual: answer0. Expected: 13.
endif
if (answer1 != 13)
error 4 Unexpected value for DTR1 for FF-FF settling time set to
settlingTime[i] ms. Actual: answer1. Expected: 13.
endif
endif
endfor
endfor
// BF-FF frame tests
for (i = 0; i < 4; i++)
for (j = 0; j < 12; j++)
DTR1 (13)
answer0 = QUERY CONTENT DTR0
wait settlingTime[i] ms // settling time between BF-FF
DTR1 (value[j])
answer1 = QUERY CONTENT DTR1
if (i < 2)
if (answer1 != value[j])
error 5 DTR1 not accepted for BF-FF settling time set to settlingTime[i]
ms. Actual: answer1. Expected: value[j].
endif
else
if (answer1 != 13)
error 6 DTR1 not ignored for BF-FF settling time set to settlingTime[i] ms.
Actual: answer1. Expected: 13.
endif
endif
endfor
endfor
Table 37 – Parameters for test sequence Receiver frame timing
Test step i 0 1 2 3
settlingTime [ms] 3 2,4 1,4 1,2
Test step j 0 1 2 3 4 5 6 7 8 9 10 11
value 0 1 2 4 8 16 32 64 85 128 170 255
It is recommended that this test be repeated at the maximum and minimum operating
temperature.
• send twice frames with maximum send twice settling time between the forward frames are
correctly received;
• if send twice commands with one command in-between for minimum settling times are
ignored.
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 99 –
Test sequence shall be run for all logical units in parallel.
Test description:
DTR2 (0)
for (value = 0; value < 16; value++)
// Correct reception for maximum send twice settling time
DTR1 (value)
ADD TO DEVICE GROUPS 0-15
DTR1 (value + 1)
ADD TO DEVICE GROUPS 0-15, send once
wait 94 ms // settling time
ADD TO DEVICE GROUPS 0-15, send once
answer = QUERY DEVICE GROUPS 0-7
if (answer != value + 1)
error 1 Send twice ADD TO DEVICE GROUPS 0-15 within 94 ms settling time
between forward frames not accepted. Actual: answer. Expected: value + 1.
endif
// Ignore send twice for too long send twice settling time
DTR1 (value)
ADD TO DEVICE GROUPS 0-15
DTR1 (value + 1)
ADD TO DEVICE GROUPS 0-15, send once
wait 105 ms // settling time
ADD TO DEVICE GROUPS 0-15, send once
answer = QUERY DEVICE GROUPS 0-7
if (answer != value)
error 2 Send twice ADD TO DEVICE GROUPS 0-15 within 105 ms settling time
between forward frames not ignored. Actual: answer. Expected: value.
endif
endfor
// Ignore send twice command for command in-between with minimum settling times
for (value = 0; value < 16; value++)
DTR1 (value)
DTR0 (255)
ADD TO DEVICE GROUPS 0-15
DTR1 (value + 1)
ADD TO DEVICE GROUPS 0-15, send once
wait 13,5 ms // settling time
DTR0 (value)
wait 13,5 ms // settling time
ADD TO DEVICE GROUPS 0-15, send once
answer = QUERY DEVICE GROUPS 0-7
if (answer != value)
error 3 Send twice not ignored for command in-between at test step = value. Actual:
answer. Expected: value.
endif
answer = QUERY CONTENT DTR0
if (answer != value)
error 4 Command in-between DTR0 (value) not correctly executed at test step =
value. Actual: answer. Expected: value.
endif
endfor
// Ignore send twice command for command in-between with minimum settling times, accept
nd
2 send twice
for (value = 0; value < 16; value++)
DTR1 (value)
DTR0 (255)
ADD TO DEVICE GROUPS 0-15
DTR1 (value + 1)
ADD TO DEVICE GROUPS 0-15, send once
BS EN 62386-103:2014
– 100 – IEC 62386-103:2014 © IEC 2014
This test procedure requests a test frame to be sent with a priority 2 up to 5. At each time a
frame with an according priority level one level higher than the requested test frame is send
before to check for collision avoidance.
Test description:
ResetDevice (false)
pulseStartDelayStep = 1
ResetDevice (false)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 101 –
Table 38 – Parameters for test sequence transmitter collision avoidance by priority
Test
frame
step i
0 0x000000
1 0xFFFFFF
Priority Idletime
1 10,5 ms
2 14,7 ms
3 16,1 ms
4 17,7 ms
5 19,3 ms
In this test sequence the idle time of a certain bit in the DUT signal is truncated by start
transmitting an active signal from the tester.
The truncating low pulse from the test system ends 483 (max half bit 433µs + 50µs) after the
rising edge of the truncated idle phase (or after 916 for max double half bit 866µs + 50µs).
• longer than 400 (or 800 for double half bit), the DUT shall continue its transmission;
• smaller than 356 (or 723 for double half bit), the DUT shall abort the transmission. It might
also destroy the frame;
• between 356..400 (or 723..800 for double half bit), the DUT might react either way.
The test system records the bus signal during the test and checks either for aborting and
possibly destruction of the DUT test frame:
or continued transmission:
Test description:
ResetDevice (false)
pulseStartDelayStep = 1
BS EN 62386-103:2014
– 102 – IEC 62386-103:2014 © IEC 2014
// wait here until two complete 24 bit frames are received: The first one is the “SEND
TESTFRAME” of the test system and the second one is the test frame itself if no
collision was detected or the repeated test frame after the first test frame was
invalidated by a break condition
wait until two 24 bit frames are received
StopBusRecording (record)
if (testFrameFound == 0)
error 1 Testframe not received
else
if (bitDuration > bitOkDuration[i])
// here the test frame should be ok, the DUT can react in two ways:
// a) continue with transmission
// b) retreat the transmission
if (stopConditionStart == 0)
// case b)
// DUT has retreated because stop condition occurred directly after
releasing the bus by the test system
else
// case a)
// DUT has continued transmission because stop condition // occurred
later than the rising edge which releases the bus => check if test
frame was sent correctly from the beginning, which means that test
frame started at first falling edge otherwise the test frame is a
repeated one
if (testFrameStart != 0)
// test frame is a repeated one
error 3 Test frame is a repeated one and the first test frame was
not continued at bit duration: bitDuration µs
endif
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 103 –
ResetDevice (false)
BS EN 62386-103:2014
– 104 – IEC 62386-103:2014 © IEC 2014
Maximum
Test initPulse maxPulse pulseStop bitOk bitNotOk Break
frame
step i StartDelay StartDelay Reference Duration Duration Condition
Delay
0 0xFFFFFF 300 450 483 400 356 476+416
1 0x000000 670 850 916 800 723 943+416
In this test sequence the active time of a certain bit in the DUT signal is extended by start
transmitting an active signal from the tester.
The low pulse from the test system to extend the pulse from the DUT starts 50µs after the
falling edge of the active phase of the DUT is about to be extended.
• smaller than 433 (or 866 for double half bit) the DUT shall continue its transmission;
• longer than 476 (or 943 for double half bit) the DUT shall abort the transmission. It might
also destroy the frame;
• between 433..476 (or 866..943 for double half bit) the DUT might react either way.
The test system records the bus signal during the test and checks either for both aborting and
destruction of the DUT test frame:
or continued transmission:
Test description:
ResetDevice (false)
pulseLengthStep = 1
// wait here until two complete 24 bit frames are received: The first one is the “SEND
TESTFRAME” of the test system and the second one is the test frame itself if no
collision was detected or the repeated test frame after the first test frame was
invalidated by a break condition
wait until two 24 bit frames are received
StopBusRecording (record)
if (testFrameFound == 0)
error 1 Testframe not received
else
if (bitDuration < bitOkDuration[i])
// here the test frame should be ok, the DUT can react in two ways:
// a) continue with transmission
// b) retreat the transmission
if (stopConditionStart == 0)
// case b)
// DUT has retreated because stop condition occurred directly after
releasing the bus by the test system
else
// case a)
// DUT has continued transmission because stop condition occurred
later than the rising edge which releases the bus => check if test
frame was sent correctly from the beginning which means that test
frame started at first falling edge otherwise the test frame is a
repeated one
if (testFrameStart != 0)
// test frame is a repeated one
error 3 Test frame is a repeated one and the first test frame was
not continued at bit duration: bitDuration µs
endif
endif
else if (bitDuration > bitNotOkDuration[i])
// here the test frame should be a repeated one, so that before the DUT
has:
// a) retreated or
// b) destroyed the first test frame
if (!breakConditionFound)
// case a)
// here the DUT retreated so that the stop condition is expected
directly after the pulse otherwise the reaction is not correct
if (stopConditionStart != 0)
BS EN 62386-103:2014
– 106 – IEC 62386-103:2014 © IEC 2014
error 4 DUT has not retreated the transmission nor send a break
condition at bit duration: bitDuration µs
endif
else
// case b)
// here the DUT has send a break condition to destroy the first test
frame => check if break condition timing is ok
if (breakConditionStart > maximumBreakConditionDelay[i])
error 5 The break condition was set to late at bit duration:
bitDuration µs
endif
endif
else
// only informative because of grey zone
// case a) continue the transmission
// case b) retreat the transmission
// case c) destroy the transmission
if (breakConditionFound)
// case c)
// here the DUT has send a break condition to destroy the first test
frame => check if break condition timing is ok
if (breakConditionStart > maximumBreakConditionDelay[i])
error 6 The break condition was set to late at bit duration:
bitDuration µs
endif
else
if (stopConditionStart == 0)
// case b)
// DUT has retreated because stop condition occurred directly
after releasing the bus by the test system
else
// case a)
// DUT has continued transmission because stop condition
occurred later than the rising edge which releases the bus =>
check if test frame was sent correctly from the beginning which
means that test frame started at first falling edge otherwise the
test frame is a repeated one
if (testFrameStart != 0)
// test frame is a repeated one
Error 7 Test frame is a repeated one and the first test frame
was not continued @ bit duration: bitDuration µs
endif
endif
endif
endif
endif
endfor
endfor
ResetDevice (false)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 107 –
Table 40 – Parameters for test sequence transmitter
collision detection for extended active phase
Maximum
Test initPulse initPulse maxPulse pulseStart bitOk bitNotOk Break
step i Length Length Length Delay Duration Duration Condition
Delay
0 0xFFFFFF 330 480 50 433 476 476+416
1 0x7FFFFF 760 950 50 866 943 943+416
In this test sequence the deviceGroups are set to non-reset values. After sending a RESET
command or after setting the deviceGroups back to their reset values, the deviceGroups shall
be checked for their reset values. The resetState and the status of DUT are checked also
after each change of the deviceGroups.
Test description:
ResetDevice ()
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 1 Wrong answer at QUERY DEVICE STATUS after RESET command. Actual:
answer. Expected: X1XX XXXXb.
endif
for (i = 0; i < 32; i++)
for (j = 0; j < 2; j++)
mask = (0x00000001 << i)
AddDeviceGroups (mask)
answer = QUERY RESET STATE
if (answer != NO)
error 2 Wrong answer at QUERY RESET STATE at test step (i,j) = (i,j). Actual:
answer. Expected: NO.
endif
answer = QUERY STATUS
if (answer != X0XX XXXXb)
error 3 Wrong answer at QUERY STATUS at test step (i,j) = (i,j). Actual:
answer. Expected: X0XX XXXXb.
endif
if (j == 0)
ResetDevice ()
else
RemoveDeviceGroups (mask)
endif
answer = GetDeviceGroups ()
if (answer != 0x00000000)
error 4 No RESET of deviceGroups at test step (i,j) = (i,j). Actual: answer.
Expected: 0x00000000.
endif
answer = QUERY RESET STATE
if (answer != YES)
error 5 Wrong answer at QUERY RESET STATE at test step (i,j) = (i,j). Actual:
answer. Expected: YES.
endif
answer = QUERY DEVICE STATUS
BS EN 62386-103:2014
– 108 – IEC 62386-103:2014 © IEC 2014
In this test sequence the quiescentMode is set to non-reset values. After sending a RESET
command or after setting the quiescentMode back to its reset value, the quiescentMode shall
be checked for its reset value. The resetState and the status of DUT are checked also after
each change of the quiescentMode.
Test description:
ResetDevice ()
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 1 Wrong answer at QUERY DEVICE STATUS after RESET command. Actual:
answer. Expected: X1XX XXXXb.
endif
for (j = 0; j < 2; j++)
START QUIESCENT MODE
answer = QUERY RESET STATE
if (answer != NO)
error 2 Wrong answer at QUERY RESET STATE at test step (j) = (j). Actual:
answer. Expected: NO.
endif
answer = QUERY STATUS
if (answer != X0XX XXXXb)
error 3 Wrong answer at QUERY STATUS at test step (j) = (j). Actual: answer.
Expected: X0XX XXXXb.
endif
if (j == 0)
ResetDevice ()
else
STOP QUIESCENT MODE
endif
answer = QUERY QUIESCENT MODE
if (answer != NO)
error 4 No RESET of quiescentMode at test step (j) = (j). Actual: answer. Expected:
NO.
endif
answer = QUERY RESET STATE
if (answer != YES)
error 5 Wrong answer at QUERY RESET STATE at test step (j) = (j). Actual:
answer. Expected: YES.
endif
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 6 Wrong answer at QUERY STATUS at test step (j) = (j). Actual: answer.
Expected: X1XX XXXXb.
endif
endfor
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 109 –
12.4.3 RESET instance groups
In this test sequence the instance Groups are set to non-reset values. After sending a RESET
command or after setting the instance Groups back to their reset values, the instance Groups
shall be checked for their reset values. The resetState and the status of DUT are checked
also after each change of the instance Groups.
Test description:
ResetDevice ()
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 1 Wrong answer at QUERY DEVICE STATUS after RESET command. Actual:
answer. Expected: X1XX XXXXb.
endif
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (i = 0; i < numberOfInstances; i++)
for (c = 0; c < 3; c++)
for (j = 0; j < 2; j++)
for (k = 0; k < 32; k = k + 8)
DTR0 (k)
setCommand[c]
answer = QUERY RESET STATE
if (answer != NO)
error 2 Wrong answer at QUERY RESET STATE at test step (i, j,
k, c) = (i, j, k, c). Actual: answer. Expected: NO.
endif
answer = QUERY STATUS
if (answer != X0XX XXXXb)
error 3 Wrong answer at QUERY STATUS at test step (i, j, k, c) =
(i, j, k, c). Actual: answer. Expected: X0XX XXXXb.
endif
if (j == 0)
ResetDevice ()
else
DTR0 (MASK)
setCommand[c]
endif
answer = queryCommand[c]
if (answer != MASK)
error 4 No RESET of instanceGroups at test step (i, j, k, c) = (i, j,
k, c). Actual: answer. Expected: MASK.
endif
answer = QUERY RESET STATE
if (answer != YES)
error 5 Wrong answer at QUERY RESET STATE at test step (i, j,
k, c) = (i, j, k, c). Actual: answer. Expected: YES.
endif
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 6 Wrong answer at QUERY STATUS at test step (i, j, k, c) =
(i, j, k, c). Actual: answer. Expected: X1XX XXXXb.
endif
endfor
endfor
endfor
BS EN 62386-103:2014
– 110 – IEC 62386-103:2014 © IEC 2014
endfor
endif
Table 41 – Parameters for test sequence RESET instance groups
In this test sequence the instance event filter is set to non-reset values. After sending a
RESET command or after setting the instance event filter back to its reset values, the
instance event filter shall be checked for its reset values. The resetState and the status of
DUT are checked also after each change of the instance event filter.
Test description:
ResetDevice ()
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 1 Wrong answer at QUERY DEVICE STATUS after RESET command. Actual:
answer. Expected: X1XX XXXXb.
endif
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (i = 0; i < numberOfInstances; i++)
answer = QUERY INSTANCE TYPE, send to instance InstanceNumber (i)
if (answer == 0)
for (j = 0; j < 2; j++)
for (k = 0; k < 24; k++)
setEventFilter (~(0x000001 << k))
answer = QUERY RESET STATE
if (answer != NO)
error 2 Wrong answer at QUERY RESET STATE at test step (i, j,
k) = (i, j, k). Actual: answer. Expected: NO.
endif
answer = QUERY STATUS
if (answer != X0XX XXXXb)
error 3 Wrong answer at QUERY STATUS at test step (i, j, k) =
(i, j, k). Actual: answer. Expected: X0XX XXXXb.
endif
if (j == 0)
ResetDevice ()
else
setEventFilter (0xFFFFFF)
endif
answer = getEventFilter ()
if (answer != 0xFFFFFF)
error 4 No RESET of eventFilter at test step (i, j, k) = (i, j, k).
Actual: answer. Expected: MASK.
endif
answer = QUERY RESET STATE
if (answer != YES)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 111 –
error 5 Wrong answer at QUERY RESET STATE at test step (i, j,
k) = (i, j, k). Actual: answer. Expected: YES.
endif
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 6 Wrong answer at QUERY STATUS at test step (i, j, k) =
(i, j, k). Actual: answer. Expected: X1XX XXXXb.
endif
endfor
endfor
endif
endfor
endif
In this test sequence the instance event scheme is set to non-reset values. After sending a
RESET command or after setting the instance event scheme back to its reset values, the
instance event scheme shall be checked for its reset values. The resetState and the status of
DUT are checked also after each change of the instance event scheme.
Test description:
ResetDevice ()
answer = QUERY DEVICE STATUS
if (answer != X1XX XXXXb)
error 1 Wrong answer at QUERY DEVICE STATUS after RESET command. Actual:
answer. Expected: X1XX XXXXb.
endif
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (i = 0; i < numberOfInstances; i++)
for (j = 0; j < 2; j++)
for (k = 1; k < 5; k++)
DTR0 (k)
SET EVENT SCHEME
answer = QUERY RESET STATE
if (answer != NO)
error 2 Wrong answer at QUERY RESET STATE at test step (i, j, k) =
(i, j, k). Actual: answer. Expected: NO.
endif
answer = QUERY STATUS
if (answer != X0XX XXXXb)
error 3 Wrong answer at QUERY STATUS at test step (i, j, k) = (i, j,
k). Actual: answer. Expected: X0XX XXXXb.
endif
if (j == 0)
ResetDevice ()
else
DTR0 (0)
SET EVENT SCHEME
endif
answer = QUERY EVENT SCHEME
if (answer != MASK)
error 4 No RESET of quiescentMode at test step (i, j, k) = (i, j, k).
Actual: answer. Expected: MASK.
endif
BS EN 62386-103:2014
– 112 – IEC 62386-103:2014 © IEC 2014
This test sequence checks the behaviour of DUT in the following conditions:
In the first six cases, the RESET command should not be executed. In the last case RESET
command should be executed. Where given, the command in-between should be accepted.
Test description:
ResetDevice ()
// Test send RESET once
START QUIESCENT MODE
RESET, send once
wait 400 ms //100 ms for "virtual" send-twice + 300 ms needed for RESET
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 1 RESET sent once executed. Actual: answer. Expected: YES.
endif
// Test send RESET with timeout
START QUIESCENT MODE
RESET, send once
wait 105 ms // settling time
RESET, send once
wait 300 ms
answer = QUERY QUIESCENT MODE
if (answer != YES)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 113 –
error 2 RESET with timeout executed. Actual: answer. Expected: YES.
endif
// Test send RESET with a frame in-between
START QUIESCENT MODE
// The following 3 steps must be sent within 75 ms, counted from the last rise bit of first
"RESET, send once" command until first fall bit of second "RESET, send once" command
RESET, send once
idle 13 ms + 110010 + idle 13 ms // settling time: idle 13 ms followed by a frame, followed by
13 ms
RESET, send once
wait 300 ms
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 3 RESET with few bits in-between executed. Actual: answer. Expected: YES.
endif
// Test send RESET with broadcast command in-between
START QUIESCENT MODE
DTR0 (0)
// The following 3 steps must be sent within 75 ms, counted from the last rise bit of first
"RESET, send once" command until first fall bit of second "RESET, send once" command
RESET, send once
DTR0 (1)
RESET, send once
wait 300 ms
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 4 RESET with command in-between executed. Actual: answer. Expected: YES.
endif
answer = QUERY CONTENT DTR0
if (answer != 1)
error 5 Command in-between RESET not executed. Actual: answer. Expected: 1.
endif
// Test send RESET with group command in-between
START QUIESCENT MODE
// The following 3 steps must be sent within 75 ms, counted from the last rise bit of first
"RESET, send once" command until first fall bit of second "RESET, send once" command
RESET, send once
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to device GroupAddress (0),
accept No Answer
RESET, send once
wait 300 ms
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 6 RESET with command in-between executed. Actual: answer. Expected: YES.
endif
if (answerCmdInBetween != NO)
error 7 Command in-between RESET executed. Actual: answerCmdInBetween.
Expected: NO.
endif
// Test send RESET with short command in-between
START QUIESCENT MODE
// The following 3 steps must be sent within 75 ms, counted from the last rise bit of first
"RESET, send once" command until first fall bit of second "RESET, send once" command
RESET, broadcast, send once
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to device ShortAddress (63)
RESET, broadcast, send once
wait 300 ms
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 8 RESET with command in-between executed. Actual: answer. Expected: YES.
endif
if (answerCmdInBetween != NO)
BS EN 62386-103:2014
– 114 – IEC 62386-103:2014 © IEC 2014
In this test sequence, all user programmable parameters of the DUT are attempted to be
changed using configuration instructions sent as follows:
• one single command is sent instead of two identical commands, therefore the parameter
should not change;
• command is sent twice with a settling time of 105 ms which is longer than the defined
settling time, therefore the parameter should not change;
• command is sent three times with a settling time between the first two commands of
105 ms, and a settling time between the next two commands of 50 ms. Therefore, the first
command should be ignored, and the next two should be interpreted as a send-twice
command. As a consequence the parameter should change.
Test description:
oldAddress = GLOBAL_currentUnderTestLogicalUnit
for (i = 0; i < 13; i++)
for (j = 0; j < 3; j++)
ResetDevice ()
DTR0 (0)
DTR1 (1)
command1[i]
if (j == 0) // Test send command once
command2[i], send once
else if (j == 1) // Test send command with timeout
command2[i], send once
wait 105 ms // settling time
command2[i], send once
else // Test send command with timeout followed by a new command
command2[i], send once
wait 105 ms // settling time
command2[i], send once
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014
– 115 –
wait 50 ms // settling time
command2[i], send once
endif
if (j < 2)
answer = query[i]
if (answer != value1[i])
error 1 Wrong setting of errorText[i] at test step (i,j) = (i,j). Actual: answer.
Expected: value[i].
endif
else
if (i < 12)
answer = query[i]
else
answer = query[i], send to device ShortAddress (63), accept No Answer
endif
if (answer != value2[i])
error 2 Wrong setting of errorText[i] at test step (i,j) = (i,j). Actual: answer.
Expected: value[i].
endif
endif
if (i == 10 OR i == 11)
TERMINATE
endif
endfor
endfor
SetShortAddress (63; oldAddress)
Table 42 – Parameters for test sequence Send twice timeout (device)
Test
command1 command2 query value1 value2 errorText
step i
0 - ADD TO DEVICE GROUPS 0-15 QUERY DEVICE GROUPS 8-15 0x00 0x01 gearGroups0-15
1 ADD TO DEVICE GROUPS 0-15 REMOVE FROM DEVICE GROUPS 0-15 QUERY DEVICE GROUPS 8-15 0x01 0x00 gearGroups0-15
2 - ADD TO DEVICE GROUPS 16-31 QUERY DEVICE GROUPS 24-31 0x00 0x01 gearGroups16-31
3 ADD TO DEVICE GROUPS 16-31 REMOVE FROM DEVICE GROUPS 16-31 QUERY DEVICE GROUPS 24-31 0x01 0x00 gearGroups16-31
DISABLE APPLICATION QUERY APPLICATION
4 ENABLE APPLICATION CONTROLLER NO YES applicationActive
CONTROLLER CONTROLLER ENABLED
ENABLE APPLICATION QUERY APPLICATION
5 DISABLE APPLICATION CONTROLLER YES NO applicationActive
CONTROLLER CONTROLLER ENABLED
6 START QUIESCENT MODE STOP QUIESCENT MODE QUERY QUIESCENT MODE YES NO quiescentMode
QUERY APPLICATION
7 STOP QUIESCENT MODE START QUIESCENT MODE NO YES quiescentMode
CONTROLLER ENABLED
DISABLE POWER CYCLE QUERY POWER CYCLE
8 ENABLE POWER CYCLE NOTIFICATION NO YES powerCycleNotification
NOTIFICATION NOTIFICATION
– 116 –
In this test sequence, all user programmable parameters of the DUT are attempted to be
changed using configuration instructions sent as follows:
• one single command is sent instead of two identical commands, therefore the parameter
should not change;
• command is sent twice with a settling time of 105 ms which is longer than the defined
settling time, therefore the parameter should not change;
• command is sent three times with a settling time between the first two commands of 105
ms, and a settling time between the next two commands of 50 ms. Therefore, the first
command should be ignored, and the next two should be interpreted as a send-twice
command. As a consequence the parameter should change.
Test description:
oldAddress = GLOBAL_currentUnderTestLogicalUnit
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (k = 0; k < numberOfInstances; k++)
for (i = 0; i < 8; i++)
for (j = 0; j < 3; j++)
ResetDevice ()
DTR0 (4)
command1[i] , send to instance InstanceNumber (k)
if (j == 0) // Test send command once
command2[i], send once, send to instance InstanceNumber (k)
else if (j == 1) // Test send command with timeout
command2[i], send once, send to instance InstanceNumber (k)
wait 105 ms // settling time
command2[i], send once, send to instance InstanceNumber (k)
else // Test send command with timeout followed by a new command
command2[i], send once, send to instance InstanceNumber (k)
wait 105 ms // settling time
command2[i], send once, send to instance InstanceNumber (k)
wait 50 ms // settling time
command2[i], send once, send to instance InstanceNumber (k)
endif
answer = query[i] , send to instance InstanceNumber (k)
if (j < 2)
if (answer != value1[i])
error 1 Wrong setting of errorText[i] at test step (i,j,k) = (i,j,k).
Actual: answer. Expected: value[i].
endif
else
if (answer != value2[i])
error 2 Wrong setting of errorText[i] at test step (i,j,k) = (i,j,k).
Actual: answer. Expected: value[i].
endif
endif
endfor
endfor
endfor
endif
Table 43 – Parameters for test sequence Send twice timeout (instance)
Test
command1 command2 query value1 value2 errorText
step i
0 SET EVENT PRIORITY, DTR0 (2) SET EVENT PRIORITY QUERY EVENT PRIORITY 4 2 eventPriority
DTR0 (2), SET EVENT PRIORITY,
1 SET EVENT PRIORITY QUERY EVENT PRIORITY 2 4 eventPriority
DTR0 (4)
2 DISABLE INSTANCE ENABLE INSTANCE QUERY INSTANCE ENABLED NO YES instanceActive
3 ENABLE INSTANCE DISABLE INSTANCE QUERY INSTANCE ENABLED YES NO instanceActive
QUERY PRIMARY INSTANCE
4 - SET PRIMARY INSTANCE GROUP MASK 4 instanceGroup0
GROUP
5 - SET INSTANCE GROUP 1 QUERY INSTANCE GROUP 1 MASK 4 instanceGroup1
6 - SET INSTANCE GROUP 2 QUERY INSTANCE GROUP 2 MASK 4 instanceGroup2
7 - SET EVENT SCHEME QUERY EVENT SCHEME 0 4 eventScheme
– 118 –
IEC 62386-103:2014 © IEC 2014
BS EN 62386-103:2014
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 119 –
In this test sequence, all user programmable device parameters of the DUT are attempted to
be changed using device configuration instructions send as follows:
• device configuration instruction is sent with a frame in-between, frame which consists of
few bits, but not a command;
• device configuration instruction is sent with a command in-between, command which is
broadcast sent;
• device configuration instruction is sent with a command in-between, command which is
sent to a certain group address;
• device configuration instruction is sent with a command in-between, command which is
sent to a certain short address;
• device configuration instruction is sent with a command in-between, and configuration
instruction is sent again once.
In the first four cases, the device configuration command should not be executed. In the last
case the device configuration instruction should be accepted. Where given, the command in-
between should be accepted.
Test description:
oldAddress = GLOBAL_currentUnderTestLogicalUnit
for (i = 0; i < 12; i++)
if (i == 4 AND GLOBAL_logicalUnit[oldAddress].applicationController == false))
i = i + 2 // Skip the next two test steps if no application controller is present
endif
// Test the rejection of the configuration instruction
for (j = 0; j < 5; j++)
ResetDevice ()
DTR0 (0)
DTR1 (1)
command1[i]
// The following steps must be sent within 75 ms, counted from the last rise bit of
first "command2[i], send once" command until first fall bit of the last "command2[i],
send once" command
command2[i], send once
if (j == 0)
idle 13 ms + 110010 + idle 13 ms // Idle 13 ms followed by a frame, followed by
13 ms - Test send command with a frame in-between
else if (j == 1)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to device
Broadcast (), accept No Answer
else if (j == 2)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to device
GroupAddress (0), accept No Answer
else if (j == 3)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to device
ShortAddress (oldAddress), accept No Answer
else
answerCmdInBetween = QUERY DEVICE CAPABILITIES send to device
ShortAddress (63), accept No Answer
endif
command2[i], send once
answer = query[i]
BS EN 62386-103:2014
– 120 – IEC 62386-103:2014 © IEC 2014
if (answer != value1[i])
error 1 Wrong setting of errorText[i] at step (i,j) = (i,j). Actual: answer.
Expected: value1[i].
endif
if (j == 1 OR j == 3 )
if (answerCmdInBetween == NO)
error 2 Command in-between not executed at step (i,j) = (i,j). Actual:
answerCmdInBetween. Expected: not NO.
endif
else
if (answerCmdInBetween != NO)
error 3 Command in-between executed at step (i,j) = (i,j). Actual:
answerCmdInBetween. Expected: NO.
endif
endif
endfor
// Test the acceptance of the configuration instruction
ResetDevice ()
DTR0 (0)
DTR1 (1)
DTR2 (0)
command1[i]
// The following four steps must be sent within 75 ms, counted from the last rise bit of
first "command2[i], send once" command until first fall bit of the last "command2[i], send
once" command
command2[i], send once
DTR2 (1)
command2[i], send once
command2[i], send once
wait 100 ms
answer = query[i]
if (answer != value2[i])
error 4 Wrong setting of errorText[i] at step i = i. Actual: answer. Expected:
value2[i].
endif
answer = QUERY CONTENT DTR2
if (answer != 1)
error 5 Wrong value of DTR2 at step i = i. Actual: answer. Expected: 1.
endif
if (i == 10 OR i == 11)
TERMINATE
endif
endfor
Table 44 – Parameters for test sequence Commands in-between (device)
Test
command1 command2 query value1 value2 errorText
step i
0 ADD TO DEVICE GROUPS 0-15 QUERY DEVICE GROUPS 8-15 0x00 0x01 gearGroups0-15
1 ADD TO DEVICE GROUPS 0-15 REMOVE FROM DEVICE GROUPS 0-15 QUERY DEVICE GROUPS 8-15 0x01 0x00 gearGroups0-15
BS EN 62386-103:2014
2 ADD TO DEVICE GROUPS 16-31 QUERY DEVICE GROUPS 24-31 0x00 0x01 gearGroups16-31
3 ADD TO DEVICE GROUPS 16-31 REMOVE FROM DEVICE GROUPS 16-31 QUERY DEVICE GROUPS 24-31 0x01 0x00 gearGroups16-31
DISABLE APPLICATION QUERY APPLICATION
4 ENABLE APPLICATION CONTROLLER NO YES applicationActive
CONTROLLER CONTROLLER ENABLED
IEC 62386-103:2014 © IEC 2014
In this test sequence, all user programmable instance parameters of the DUT are attempted
to be changed using instance configuration instructions sent as follows:
• instance configuration instruction is sent with a frame in-between, frame which consists of
few bits, but not a command;
• instance configuration instruction is sent with a command in-between, command which is
broadcast sent;
• instance configuration instruction is sent with a command in-between, command which is
sent to a certain group address;
• instance configuration instruction is sent with a command in-between, command which is
sent to a certain short address;
• instance configuration instruction is sent with a command in-between, and configuration
instruction is sent again once.
In the first four cases, the instance configuration command should not be executed. In the last
case the instance configuration instruction should be accepted. Where given, the command
in-between should be accepted.
Test description:
oldAddress = GLOBAL_currentUnderTestLogicalUnit
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (k = 0; k < numberOfInstances; k++)
for (i = 0; i < 8; i++)
// Test the rejection of the configuration instruction
for (j = 0; j < 5; j++)
ResetDevice ()
DTR0 (4)
command1[i], send to instance InstanceNumber (k)
// The following steps must be sent within 75 ms, counted from the last rise
bit of first "command2[i], send once" command until first fall bit of the last
"command2[i], send once" command
command2[i], send once, send to instance InstanceNumber (k)
if (j == 0)
idle 13 ms + 110010 + idle 13 ms // Idle 13 ms followed by a frame,
followed by 13 ms - Test send command with a frame in-between
else if (j == 1)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to
device Broadcast (), accept No Answer
else if (j == 2)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to
device GroupAddress (0), accept No Answer
else if (j == 3)
answerCmdInBetween = QUERY DEVICE CAPABILITIES, send to
device ShortAddress (oldAddress), accept No Answer
else
answerCmdInBetween = QUERY DEVICE CAPABILITIES send to
device ShortAddress (63), accept No Answer
endif
command2[i], send once, send to instance InstanceNumber (k)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 123 –
Test
command1 command2 query value1 value2 errorText
step i
0 SET EVENT PRIORITY, DTR0 (2) SET EVENT PRIORITY QUERY EVENT PRIORITY 4 2 eventPriority
DTR0 (2), SET EVENT PRIORITY,
1 SET EVENT PRIORITY QUERY EVENT PRIORITY 2 4 eventPriority
DTR0 (4)
2 DISABLE INSTANCE ENABLE INSTANCE QUERY INSTANCE ENABLED NO YES instanceActive
3 ENABLE INSTANCE DISABLE INSTANCE QUERY INSTANCE ENABLED YES NO instanceActive
QUERY PRIMARY INSTANCE
4 - SET PRIMARY INSTANCE GROUP MASK 4 instanceGroup0
GROUP
5 - SET INSTANCE GROUP 1 QUERY INSTANCE GROUP 1 MASK 4 instanceGroup1
6 - SET INSTANCE GROUP 2 QUERY INSTANCE GROUP 2 MASK 4 instanceGroup2
7 - SET EVENT SCHEME QUERY EVENT SCHEME 0 4 eventScheme
– 124 –
IEC 62386-103:2014 © IEC 2014
BS EN 62386-103:2014
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 125 –
The test sequence checks if reserved modes (0x01 to 0x7F) are reserved by trying to set the
DUT in one of those modes, and checks if there are any manufacturer specific modes (0x80 to
0xFF) and if so, the DUT should keep reacting according to specification.
Test description:
This sequence first tests if an application controller is present (Bit 0 of QUERY DEVICE
CAPABILITIES).
Afterwards the application controller will be enabled (send twice ENABLE APPLICATION
CONTROLLER) and its status will be checked, also after power cycle (combined bus and
mains).
In the next step the application controller will be disabled and its status will be checked, also
after power cycle (combined bus and mains).
Test description:
ResetDevice (true)
appControllerExist = HasApplicationController()
if (!appControllerExist)
report 1 No application controller is present
ResetDevice (false)
For installation troubleshooting only single master application controllers are meant to send
out a cyclic PING message. This test sequence checks for multi master control devices if no
PING is sent within 10 min +10% after power up.
Test description:
PowerCycleAndWaitForDecoder (5)
// Wait for no PING occurs within 10 min +10%
StartBusRecording (record)
start_timer (timer)
do
pingFound = FindFrame (record, PING)
timestamp = get_timer (timer) // time in seconds
while (pingFound == 0 AND timestamp < 660)
if (pingFound > 0)
error 1 PING command sent by a multi master control device.
endif
BS EN 62386-103:2014
– 128 – IEC 62386-103:2014 © IEC 2014
StopBusRecording (record)
In order to check the quiescent mode the sequence first checks for an application controller
and instances of an input device. If found, the application controller (send twice ENABLE
APPLICATION CONTROLLER) and/or instances (send twice ENABLE INSTANCE) will be
enabled.
The sequence checks for the quiescent mode being disabled after a power cycle. The
quiescent mode is set (send twice START QUIESCENT MODE) and queried through QUERY
QUIESCENT MODE and QUERY DEVICE STATUS Bit 1. After 5 min the quiescent mode will
be retriggered (send twice START QUIESCENT MODE) and checked, if the timeout of 15 min
(10% tolerance) is met based on the time of the retrigger command. While this time the bus is
checked for no forward frame other than the query commands of the test system.
After this the Quiescent mode will be set and checked immediately again. After this the
quiescent mode will be terminated (send twice STOP QUIESCENT MODE) and checked.
Test description:
This sequence first enables the power cycle notification (ENABLE POWER CYCLE
NOTIFICATION) and then generates a power cycle. After this the bus is checked for the
power cycle notification event message being sent out by the DUT earliest 1,3 s after power
cycle completion and maximum after 5 s + power on time for the DUT.
In the second step the power cycle notification is disabled (DISABLE POWER CYCLE
NOTIFICATION) and a power cycle generated. The bus is checked for 5 s + power on time for
the DUT, not containing any power cycle notification event message.
Test description:
ResetDevice(false)
// enable power cycle notification and check state
ENABLE POWER CYCLE NOTIFICATION
enabled = QUERY POWER CYCLE NOTIFICATION
if (enabled == NO)
error 1 Power cycle notification was not enabled. Actual: NO. Expected: YES.
endif
// Check for POWER NOTIFICATION sent between 1,3 s and 5 s after power cycle
PowerCycleAndWaitForDecoder (5)
StartBusRecording (record)
start_timer (timer)
do
powerNotificationFound = FindFrame (record, POWER NOTIFICATION)
timestamp = get_timer (timer) // time in ms
while (powerNotificationFound == 0 AND timestamp < 10000)
if (powerNotificationFound > 0)
if (timestamp < 1 300)
error 2 POWER NOTIFICATION sent earlier than 1.3s after power cycle. Actual:
timestamp ms. Expected: >= 1300ms.
else if (timestamp > 5 000)
error 3 POWER NOTIFICATION sent later than 5s after power cycle. Actual:
timestamp ms. Expected: <= 5000ms.
else
report 1 NOTIFICATION was sent after timestamp ms.
endif
else
error 4 POWER NOTIFICATION was not sent within 10 s after power cycle.
endif
// check state after power cycle
enabled = QUERY POWER CYCLE NOTIFICATION
if (enabled == NO)
error 5 Power cycle notification is not enabled after power cycle.
endif
BS EN 62386-103:2014
– 130 – IEC 62386-103:2014 © IEC 2014
The test sequence checks if storage of the short address is correctly programmed using the
short address programmed in the step before. QUERY MISSING SHORT ADDRESS and the
short address bit of the QUERY STATUS answer are also tested.
Test description:
oldAddress = GLOBAL_currentUnderTestLogicalUnit
lastAssignedAddress = oldAddress
if (GLOBAL_numberShortAddresses < 62)
numberNotAssignedAddresses = 62 - GLOBAL_numberShortAddresses + 1
intermediateAddress = GLOBAL_numberShortAddresses + (oldAddress %
numberNotAssignedAddresses)
iEnd = 7
else
iEnd = 6
endif
for (i = 0; i < iEnd; i++)
DTR0 (value[i])
SET SHORT ADDRESS, send to device address1[i]
answer = QUERY MISSING SHORT ADDRESS, send to device address2[i]
if (answer != test1[i])
error 1 Wrong answer at QUERY MISSING SHORT ADDRESS at test step i = i.
Actual: answer. Expected: test1[i].
endif
answer = QUERY STATUS, send to address2[i]
if (answer != test2[i])
error 2 Wrong answer at QUERY STATUS at test step i = i. Actual: answer.
Expected: test2[i].
endif
lastAssignedAddress = address2[i]
endfor
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 131 –
Test
step value description address1 address2 test1 test2
i
short ShortAddress ShortAddress
0 63 NO XXXXX0XXb
address 63 (oldAddress) (63)
delete short ShortAddress Broadcast
1 MASK YES XXXXX1XXb
address (63) Unaddressed
Broadcast ShortAddress
2 oldAddress oldAddress NO XXXXX0XXb
Unaddressed (oldAddress)
ShortAddress ShortAddress
3 64 no change NO XXXXX0XXb
(oldAddress) (oldAddress)
ShortAddress ShortAddress
4 128 no change NO XXXXX0XXb
(oldAddress) (oldAddress)
ShortAddress ShortAddress
5 254 no change NO XXXXX0XXb
(oldAddress) (oldAddress)
Intermediate a short ShortAddress ShortAddress
6 NO XXXXX0XXb
Address address (oldAddress) (intermediateAddress)
The test sequence checks the reset and the power-on values of the 103 variables. The reset
and power-on values of the 3xx variables are assumed to be tested in IEC 62386-3xx
standard.
Test description:
Test
command query variable reset powerOn
step i
QUERY OPERATING
0 - operatingMode operatingMode operatingMode
MODE
Application
QUERY DEVICE
1 - ControllerPresent, capabilities capabilities
CAPABILITIES
numberOfInstances
2 - GetRandomAddress () randomAddress 0xFF FF FF randomAddress
3 - GetVersionNumber () versionNumber 2.0 2.0
QUERY NUMBER OF
4 - numberOfInstances numberInstances numberInstances
INSTANCES
QUERY POWER CYCLE
5 - powerCycleSeen NO YES
SEEN
AddDeviceGroups
6 GetDeviceGroups () deviceGroups 0x0000 0000 0xFFFF FFFF
(0xFFFF FFFF)
7 DTR0 (0xAA) QUERY CONTENT DTR0 DTR0 0xAA 0x00
8 DTR1 (0xAB) QUERY CONTENT DTR1 DTR1 0xAB 0x00
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 133 –
Test
command query variable reset powerOn
step i
The test sequence checks the reset and the power-on values of the 103 instance variables.
The reset and power-on values of the 3xx instance variables are assumed to be tested in
IEC 62386-3xx standard.
Test description:
endfor
endfor
endif
Test
command query variable reset powerOn
step i
The test sequence checks the correct function of the DTR registers, by reading from and
writing to them. They need to be correct before proceeding with the next tests.
Test description:
This test procedure is checking for correct writing of two bytes to two DTR within one
command. Several different pairs of test values are written and queried again, to verify correct
operation of these DTR related commands.
Test description:
ResetDevice()
// clear DTRs before testing DTR1:DTR0 command
DTR0 (0)
DTR1 (0)
DTR2 (0)
for (i=0; i < 9; i++)
// check if DTR1:DTR0 is set correctly and is not changing DTR2 content
DTR2 (data2[i])
DTR1:DTR0 (data1[i], data0[i])
if (answer != data2[i])
error 6 Wrong value of DTR2 stored at test step i = i. Received: answer. Expected:
data2[i].
endif
endfor
ResetDevice()
Table 50 – Parameters for test sequence DTR1:DTR0 and DTR2:DTR1
This sequence checks setting and device group memberships by reading the device group
assignments and also the reaction on device group addressing using QUERY DEVICE
CAPABILITIES.
Test description:
ResetDevice()
// clear group assignment
ClearAllDeviceGroups()
// check if no group is added
AddDeviceGroups(0x0000 0000)
CheckGroupAssignment(0x0000 0000)
// check if single group is added
AddDeviceGroups(0x0000 0100)
CheckGroupAssignment(0x0000 0100)
// check if multiple groups are added
AddDeviceGroups(0x0100 0007)
CheckGroupAssignment(0x0100 0107)
// check if multiple groups are added, including which are already added
AddDeviceGroups(0x0007 0107)
CheckGroupAssignment(0x0107 0107)
// check if single groups are removed
RemoveDeviceGroups(0x0100 0000)
CheckGroupAssignment(0x0007 0107)
// check if multiple groups are removed
RemoveDeviceGroups(0x0007 0100)
CheckGroupAssignment(0x0000 0007)
// check if multiple groups are removed, including which are already removed
RemoveDeviceGroups(0x0007 0007)
CheckGroupAssignment(0x0000 0000)
ResetDevice()
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 137 –
This sequence reads the device features (QUERY DEVICE CAPABILITIES) and checks for
the unused bits (2 to 7) being zero.
If bit 1 (“numberOfInstances” is greater than 0?) is set, the test procedure checks also the
number of instances (QUERY NUMBER OF INSTANCES) being greater than zero.
Test description:
ResetDevice ()
ResetDevice ()
The test sequence checks the version number of the standard, implemented by DUT.
Test description:
endif
// Compare version number given in memory bank 0 with the answer to Query Version
Number
DTR0 (0x17)
DTR1 (0)
answerMB = READ MEMORY LOCATION
answerQVN = QUERY VERSION NUMBER, accept Value
if (answerMB != answerQVN)
error 3 Version number given in the memory bank 0 does not match to the answer of
QUERY VERSION NUMBER. Version number given in memory bank 0: answerMB.
Answer to Query Version Number: answerQVN.
endif
This sequence is testing for the bit “powerCycleSeen”. The bit is first cleared by the test
sequence and checked through QUERY DEVICE STATUS (Bit5). After a power cycle is done
the status of “powerCycleSeen” is checked again to be set. After another RESET POWER
CYCLE SEEN command the flag is checked again for being cleared.
Test description:
ResetDevice()
// clear flag first and check
RESET POWER CYCLE SEEN
status = QUERY DEVICE STATUS
if (status != XX0X XXXXb)
error 1 PowerCycleSeen not cleared after RESET POWER CYCLE SEEN. Actual: status.
Expected: XX0X XXXXb.
endif
// check if flag is set after power cycle
PowerCycleAndWaitForDecoder (5)
status = QUERY DEVICE STATUS
if (status != XX1X XXXXb)
error 2 PowerCycleSeen not set after power cycle. Actual: status. Expected: XX1X
XXXXb.
endif
// reset powerCycleSeen and check for powerCycleSeen cleared
RESET POWER CYCLE SEEN
status = QUERY DEVICE STATUS
if (status == XX1X XXXXb)
error 3 PowerCycleSeen not cleared after RESET POWER CYCLE SEEN. Actual: status.
Expected: XX0X XXXXb.
endif
ResetDevice()
This test sequence is checking for the application error information is the same from QUERY
INPUT DEVICE ERROR and Bit0 of QUERY DEVICE STATUS. If there is no error reported in
the status byte (QUERY DEVICE STATUS Bit0 equals zero), also the query input device error
shall show no answer. If there is an error reported in the status byte, the query input device
error shall show up with some value (manufacturer specific).
Test description:
ResetDevice (true )
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
//check if non-existent input device has errors
error = QUERY INPUT DEVICE ERROR
if (error)
error 1 Wrong answer without existent input device
endif
status = QUERY DEVICE STATUS
if (status == XXXX XXX1)
error 2 Wrong answer without existent input device
endif
else
//check if input device has errors
error = QUERY INPUT DEVICE ERROR
status = QUERY DEVICE STATUS
if (status == XXXX XXX1 AND error != NO)
error 3 Input device has an error code error and report is consistent. Please resolve
error before conducting this test.
else if ((status == XXXX XXX0 AND error != NO) OR (status == XXXX XXX1 AND error
== NO))
error 4 Input device has an error code error but report is inconsistent
endif
endif
ResetDevice (false )
The test sequence checks the correct function of the READ MEMORY LOCATION command
and whether memory bank 0 is implemented according to specification.
Test description:
DTR0 (0)
DTR1 (0)
answer = READ MEMORY LOCATION
if (answer == NO)
error 1 No answer received when reading the size of memory bank 0. Actual: NO.
Expected: not NO.
else // Read memory bank 0
// Read memory bank location 0x00, which may differ per logical unit
DTR1 (0)
DTR2 (128)
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
DTR0 (0)
laml[address] = READ MEMORY LOCATION, send to device ShortAddress
(address)
if (answer == NO)
error 2 LogicalUnit address: No answer received when reading memory bank
location 0. Actual: NO. Expected: not NO.
else
BS EN 62386-103:2014
– 140 – IEC 62386-103:2014 © IEC 2014
if (laml[address] < 0x1A) // Check that all mandatory memory bank locations are
implemented
error 3 LogicalUnit address: Not all mandatory memory locations
implemented. Actual: laml[address]. Expected: answer >= 0x1A.
endif
if (laml[address] >= 0x1B AND laml[address] <= 0x7F) // Check that none of the
reserved memory bank locations [0x1B,0x7F] is given as last accessible
memory location
error 4 LogicalUnit address: Reserved memory bank location laml[address]
returned as last memory bank location. Actual: laml[address]. Expected:
0x1A or [0x80,0xFE].
endif
if (laml[address] == 0xFF) // Check that reserved memory bank location 0xFF is
not given as last accessible memory location
error 5 LogicalUnit address: Reserved 0xFF memory bank location
returned as last memory bank location. Actual: laml[address]. Expected:
0x1A or [0x80,0xFE].
endif
endif
answer = QUERY CONTENT DTR0, send to device ShortAddress (address) //
Check that DTR0 incremented after reading a valid memory bank location
if (answer != 1)
error 6 LogicalUnit address: DTR0 not incremented after reading a valid
memory bank location. Actual: answer. Expected: 1.
endif
answer = QUERY CONTENT DTR1, send to device ShortAddress (address) //
Check that DTR1 not changed after reading memory bank location
if (answer != 0)
error 7 LogicalUnit address: DTR1 modified after reading a valid memory bank
location. Actual: answer. Expected: 0.
DTR1 (0)
endif
answer = QUERY CONTENT DTR2, send to device ShortAddress (address) //
Check that DTR2 not changed after reading memory bank location
if (answer != 128)
error 8 LogicalUnit address: DTR2 modified after reading a valid memory bank
location. Actual: answer. Expected: 128.
DTR2 (128)
endif
endfor
// Read memory bank location 0x01, which shall not be implemented on the logical units
DTR0 (1)
DTR2 (64)
answer = READ MEMORY LOCATION // Check that reserved memory bank location 0x01
is not implemented
if (answer != NO)
error 9 Answer received when reading reserved - not implemented memory bank
location 0x01. Actual: answer. Expected: NO.
endif
answer = QUERY CONTENT DTR0 // Check that DTR0 incremented after reading a not
implemented memory bank location
if (answer != 2)
error 10 DTR0 not incremented after reading a not implemented memory bank
location. Actual: answer. Expected: 2.
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after reading
memory bank location
if (answer != 0)
error 11 DTR1 modified after reading a not implemented memory bank location.
Actual: answer. Expected: 0.
DTR1 (0)
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 141 –
answer = QUERY CONTENT DTR2 // Check that DTR2 not changed after reading
memory bank location
if (answer != 64)
error 12 DTR2 modified after reading a not implemented memory bank location.
Actual: answer. Expected: 64.
endif
// Read the content of must be implemented memory bank locations
// Read memory bank location 0x02, which may differ per logical unit
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
DTR0 (2)
answer = READ MEMORY LOCATION, send to device ShortAddress (address)
if (answer == NO)
error 13 LogicalUnit address: An error occurred when reading valid memory
bank location 0x02.
else
if (answer <= 199)
report 1 LogicalUnit address: Last accessible memory bank = answer.
else
error 14 LogicalUnit address: Wrong last accessible memory bank
reported. Actual: answer. Expected: [0, 199].
endif
endif
answer = QUERY CONTENT DTR0, send to device ShortAddress (address) //
Check that DTR0 incremented after reading a valid memory bank location
if (answer != 3)
error 15 LogicalUnit address: DTR0 not incremented after reading valid
memory bank location. Actual: answer. Expected: 3.
endif
endfor
// Read memory bank locations 0x03 - 0x19, which shall be common for all logical units
loc0x18 = 0
DTR0 (3)
for (i = 0; i < 11; i++)
multibyte = ReadMemBankMultibyteLocation (nrBytes[i])
if (multibyte != -1)
// multibyte shall be displayed as a decimal value
report 2 text[i] = multibyte
// Check allowed range for each memory bank location
if (address[i] == 0x18)
loc0x18 = multibyte
endif
if (address[i] == 0x15)
if (multibyte == 0xFF)
error 16 For this DUT, the 101 standard must be implemented.
else if (multibyte < 00001000b)
error 17 text[i] must be at least 2.0 (00001000b).
endif
else if (address[i] == 0x16)
if (multibyte == 0xFF)
report 3 For this DUT, the 102 standard is not implemented.
else if (multibyte != 00001000b)
error 18 text[i] must be 2.0 (00001000b).
endif
else if (address[i] == 0x17)
if (multibyte == 0xFF)
error 19 For this DUT, the 103 standard must be implemented.
else if (multibyte < 00001000b)
error 20 text[i] must be at least 2.0 (00001000b).
endif
else if (address[i] == 0x18 AND (multibyte < 1 OR multibyte > 64))
error 21 text[i] must be in the range [1,64].
else if (address[i] == 0x19 AND multibyte > 64)
BS EN 62386-103:2014
– 142 – IEC 62386-103:2014 © IEC 2014
additionalData = 0
for (i = 0x80; i <= 254; i++)
answer = READ MEMORY LOCATION, send to device ShortAddress (address)
if (answer != NO)
additionalData = additionalData + 1
report 5 LogicalUnit address: Additional control gear information at
location i is answer.
if (i > laml[address])
error 31 LogicalUnit address: Additional control gear information
found at location i . Last accessible memory location is laml[address].
endif
endif
answer = QUERY CONTENT DTR0, send to device ShortAddress (address)
// Check that DTR0 incremented after reading a valid memory bank location
if (answer != i + 1)
error 32 LogicalUnit address: DTR0 not incremented after reading valid
memory bank location i. Actual: answer. Expected: i + 1.
DTR0 (i + 1)
endif
endfor
if (additionalData == 0 AND laml[address] >= 0x80)
error 33 LogicalUnit address: No answer received when reading additional
data, however additional data expected.
endif
endfor
// Read the last memory bank location
DTR0 (0xFF)
answer = READ MEMORY LOCATION
if (answer != NO)
error 34 Answer received when reading memory location 0xFF. Actual: answer.
Expected: NO.
endif
answer = QUERY CONTENT DTR0
if (answer != 255)
error 35 DTR0 modified after reading memory location 0xFF. Actual: answer.
Expected: 255.
endif
endif
Table 51 – Parameters for test sequence READ MEMORY LOCATION on Memory Bank 0
Test
address nrBytes dtrValue text
step i
0 0x03 6 9 GTIN (decimal)
1 0x09 1 10 Firmware version (major)
2 0x0A 1 11 Firmware version (minor)
3 0x0B 8 19 Serial number (decimal)
4 0x13 1 20 HW version (major)
5 0x14 1 21 HW version (minor)
6 0x15 1 22 101 version number
7 0x16 1 23 102 version number
8 0x17 1 24 103 version number
9 0x18 1 25 Number of logical control devices units in the bus unit
10 0x19 1 26 Number of logical control gear units in the bus unit
BS EN 62386-103:2014
– 144 – IEC 62386-103:2014 © IEC 2014
The test sequence checks the correct function of the READ MEMORY LOCATION command
and whether memory bank 1 is implemented according to specification.
Test description:
DTR0 (0)
DTR1 (1)
laml = READ MEMORY LOCATION
if (laml != NO)
report 1 Memory bank 1 is implemented and the last accessible memory location is laml.
if (laml < 0x10) // Check that all mandatory memory bank locations are implemented
error 1 Not all mandatory memory locations implemented. Actual: laml. Expected:
answer >= 0x10.
endif
if (laml == 0xFF) // Check that reserved memory bank location 0xFF is not given as last
accessible memory location
error 2 Reserved 0xFF memory bank location. Actual: laml. Expected: [0x10,0xFE].
endif
answer = QUERY CONTENT DTR0 // Check that DTR0 incremented after reading a valid
memory bank location
if (answer != 1)
error 3 DTR0 not incremented after reading a valid memory bank location. Actual:
answer. Expected: 1.
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after reading
memory bank location
if (answer != 1)
error 4 DTR1 modified after reading a valid memory bank location. Actual: answer.
Expected: 1.
endif
DTR0 (1)
DTR1 (1)
answer = READ MEMORY LOCATION // Read the indicator byte location 0x01
report 2 Indicator byte (memory bank 1 location 1) = answer
answer = QUERY CONTENT DTR0 // Check that DTR0 incremented after reading the
manufacturer specific memory bank location
if (answer != 2)
error 5 DTR0 not incremented after reading the manufacturer specific memory bank
location. Actual: answer. Expected: 2.
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after reading
memory bank location
if (answer != 1)
error 6 DTR1 modified after reading the manufacturer specific memory bank
location. Actual: answer. Expected: 1.
DTR1 (1)
endif
// Read the content of must be implemented memory bank locations
DTR0 (2)
for (i = 0; i < 3; i++)
if (address[i] + nrBytes[i] - 1 <= laml)
multibyte = ReadMemBankMultibyteLocation (nrBytes[i])
if (multibyte != -1)
report 3 text[i] = multibyte
else
error 7 An error occurred when reading valid memory bank location
(text[i]).
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 145 –
endif
else
error 8 Not all mandatory memory bank locations implemented.
endif
endfor
// Read above last accessible memory bank location
DTR0 (laml + 1)
for (i = laml + 1; i <= 0xFE; i++)
answer = READ MEMORY LOCATION
if (answer != NO)
error 9 Answer received when reading not implemented memory bank location
i. Actual: answer. Expected: NO.
endif
answer = QUERY CONTENT DTR0
if (answer != i + 1)
error 10 DTR0 not incremented after reading above the last accessible memory
location. Actual: answer. Expected: i + 1.
endif
endfor
// Read the last memory bank location
DTR0 (0xFF)
answer = READ MEMORY LOCATION
if (answer != NO)
error 11 Answer received when reading memory location 0xFF. Actual: answer.
Expected: NO.
endif
answer = QUERY CONTENT DTR0
if (answer != 255)
error 12 DTR0 modified after reading memory location 0xFF. Actual: answer.
Expected: 255.
endif
else
report 4 Memory bank 1 is not implemented.
// Check that indeed memory bank 1 is not implemented
for (i = 1; i <= 255; i++)
DTR0 (i)
answer = READ MEMORY LOCATION
if (answer != NO)
error 13 Answer received when reading the not implemented memory bank 1,
location i. Actual: answer. Expected: NO.
endif
answer = QUERY CONTENT DTR0
if (answer != i)
error 14 DTR0 modified after reading the not implemented memory bank 1,
location i. Actual: answer. Expected: i.
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after reading
memory bank location
if (answer != 1)
error 15 DTR1 modified after reading the not implemented memory bank 1,
location i. Actual: answer. Expected: 1.
DTR1 (1)
endif
endfor
endif
BS EN 62386-103:2014
– 146 – IEC 62386-103:2014 © IEC 2014
Table 52 – Parameters for test sequence READ MEMORY LOCATION on Memory Bank 1
The test sequence checks the correct function of the READ MEMORY LOCATION command
and checks if all other memory banks besides 0 and 1 are implemented according to
specification.
Test description:
DTR0 (2)
DTR1 (0)
lamb = READ MEMORY LOCATION
if (lamb < 2)
report 1 No other memory bank besides 0 or 1 are implemented.
else
if (lamb <= 199)
report 2 Last accessible memory bank is lamb.
else
error 1 Wrong last accessible memory bank reported. Actual: lamb. Expected: [2,
199].
lamb = 199
endif
// Find an implemented memory bank between MB 2 and MB lamb
for (i = 2; i <= lamb; i++)
DTR0 (0)
DTR1 (i)
laml = READ MEMORY LOCATION
if (laml == NO)
report 3 Memory bank i is not implemented.
else
report 4 Memory bank i is implemented.
if (laml < 3 OR laml == 0xFF)
error 2 Wrong memory location for memory bank i. Actual: laml. Expected:
[0x03,0xFE].
endif
answer = QUERY CONTENT DTR0 // Check that DTR0 incremented after
reading a valid memory bank location
if (answer != 1)
error 3 DTR0 not incremented after reading location 0 of memory bank i.
Actual: answer. Expected: 1.
endif
// Check location 0x02
DTR0 (2)
answer = READ MEMORY LOCATION
if (answer == NO)
error 4 No answer received when reading location 0x02 of memory bank i.
Actual: NO. Expected: not NO.
endif
// Check that at least one location between 0x03 and laml is implemented.
numberOfAnswers = 0
DTR0 (3)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 147 –
DTR0 (0)
for (i = 200; i < 256; i++)
DTR1 (i)
answer = READ MEMORY LOCATION
if (answer != NO)
error 13 Answer received when reading the reserved memory bank i. Actual:
answer. Expected: NO.
endif
answer = QUERY CONTENT DTR0
if (answer != 0)
error 14 DTR0 modified after reading the reserved memory bank i. Actual:
answer. Expected: 0.
DTR0 (0)
endif
endfor
endif
The test sequence checks the correct function of the WRITE MEMORY LOCATION and
WRITE MEMORY LOCATION - NO REPLY commands. Before proceeding with the test, an
implemented memory bank is needed.
Test description:
endif
answer = QUERY CONTENT DTR0 // Check if DTR0 changed after writing a valid
memory bank location in different conditions
if (answer != dtrValue[i])
error 2 DTR0 text2[i] at test step i = i. Actual: answer. Expected: dtrValue[i].
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after writing a
memory bank location
if (answer != memoryBankNr)
error 3 DTR1 modified at test step i = i. Actual: answer. Expected:
memoryBankNr.
endif
DTR0 (address[i])
DTR1 (memoryBankNr)
answer = READ MEMORY LOCATION // Check by reading if the location was
correctly written - this will also disable the writeEnableState
if (answer != readValue[i])
error 4 Wrong content of memory bank location at test step i = i. Actual:
answer. Expected: readValue[i].
endif
endfor
else
report 2 No other memory bank besides memory bank 0 is implemented.
DTR1 (0) // Select memory bank 0
// Read and store all values written in memory bank 0
for (j = 0; j < 256; j++)
DTR0 (j)
valueOnLocation[j] = READ MEMORY LOCATION
endfor
// Try writing memory bank 0
for (j = 0; j < 2; j++)
for (k = 0; k < 256; k++)
ENABLE WRITE MEMORY
DTR0 (k)
if (valueOnLocation[k] == NO)
value = 255
else
value = ~valueOnLocation[k]
endif
if (j == 0)
answer = WRITE MEMORY LOCATION (value)
if (answer != NO)
error 5 Writing a ROM memory bank location confirmed at test step
(j,k) = (j,k). Actual: answer. Expected: NO.
endif
else
WRITE MEMORY LOCATION - NO REPLY (value)
endif
answer = QUERY CONTENT DTR0 // Check DTR0
if (k == 255)
if (answer != 255)
error 6 DTR0 changed at test step (j,k) = (j,k). Actual: answer.
Expected: 255.
endif
else
if (answer != k + 1)
error 7 DTR0 not incremented at test step (j,k) = (j,k). Actual: answer.
Expected: k + 1.
endif
endif
answer = QUERY CONTENT DTR1 // Check that DTR1 not changed after trying
to write a memory bank location
BS EN 62386-103:2014
– 150 – IEC 62386-103:2014 © IEC 2014
if (answer != 0)
error 8 DTR1 modified at test step (j,k) = (j,k). Actual: answer. Expected:
0.
DTR1 (0)
endif
DTR0 (k)
answer = READ MEMORY LOCATION // Check by reading if location was
written - this will also disable the writeEnableState
if (answer != valueOnLocation[k])
error 9 Wrong content of memory bank location at test step (j,k) = (j,k).
Actual: answer. Expected: valueOnLocation[k].
ENABLE WRITE MEMORY
DTR0 (k)
WRITE MEMORY LOCATION – NO REPLY (valueOnLocation[k])
endif
endfor
endfor
endif
Table 53 – Parameters for test sequence Memory bank writing
Test
test step
step command1 command2 command3 writeValue text1 dtrValue text2 address readValue
descripton
i
Check writing of
a valid location
WRITE MEMORY not not
0 - - 0x00 3 2 0x00 when
LOCATION (0x00) confirmed incremented
BS EN 62386-103:2014
writeEnableStat
e = enabled
Check writing of
a valid location
WRITE MEMORY
1 - - NO confirmed 2 incremented 2 0x00 when
LOCATION (0x01)
IEC 62386-103:2014 © IEC 2014
writeEnableStat
e = disabled
Check writing of
WRITE MEMORY a valid location
not
2 - - LOCATION - NO NO confirmed 3 2 0x02 when
incremented
REPLY (0x02) writeEnableStat
e = enabled
Check writing of
– 151 –
lockable and MB
WRITE MEMORY DIRECT WRITE is locked for
not writing
14 LOCATION - NO - MEMORY (0x03, NO confirmed 4 3 loc0x03
incremented
REPLY (0x00) 0x0D)
WRITE MEMORY
DTR0 WRITE MEMORY memoryBankLoc not memoryBankLoc
15 LOCATION - NO NO confirmed NO
(memoryBankLoc+1) LOCATION (0x0A) +2 incremented +1
REPLY (0x55)
Check writing
WRITE MEMORY WRITE MEMORY when
DTR0 memoryBankLoc not memoryBankLoc
16 LOCATION - NO LOCATION - NO NO confirmed NO writeEnableStat
(memoryBankLoc+1) +2 incremented +1
REPLY (0x55) REPLY (0x0B) e = enabled
AND location is
DIRECT WRITE beyond the laml
WRITE MEMORY
MEMORY memoryBankLoc not memoryBankLoc
17 LOCATION - NO - NO confirmed NO
(memoryBankLoc+ +2 incremented +1
REPLY (0x55)
1, 0x0D)
IEC 62386-103:2014 © IEC 2014
BS EN 62386-103:2014
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 153 –
The test sequence checks the correct function of the ENABLE WRITE MEMORY command
and as well as the correct implementation writeEnableState variable. Before proceeding with
the test, an implemented memory bank is needed.
Test description:
Test
command1 command2 command3 value1 command4 value2 text
step i
Actual: DISABLED. Expected:
0 DTR0 (2) DTR1 (memBankNr) - - - 0
ENABLED.
Actual: DISABLED. Expected:
1 DTR0 (0) DTR1 (memBankNr) - - DTR0 (2) 1
ENABLED.
Actual: DISABLED. Expected:
2 DTR0 (2) DTR1 (0) - - DTR1 (memBankNr) 2
ENABLED.
Actual: DISABLED. Expected:
3 DTR0 (2) DTR1 (memBankNr) - - DTR2 (0) 3
ENABLED.
Actual: DISABLED. Expected:
4 DTR0 (2) DTR1 (memBankNr) - - ENABLE WRITE MEMORY 4
ENABLED.
answer = QUERY DEVICE Actual: ENABLED. Expected:
5 DTR0 (2) DTR1 (memBankNr) - - NO
CAPABILITIES DISABLED.
RESET Actual: ENABLED. Expected:
6 DTR0 (2) DTR1 (memBankNr) - - NO
wait 300 ms DISABLED.
PowerCycleAndWaitForDecoder (5)
Actual: ENABLED. Expected:
– 154 –
The test sequence checks the correct function of the ENABLE WRITE MEMORY command.
Before proceeding with the test, an implemented memory bank is needed. The command shall
be executed only if it is received twice.
This test sequence checks the behaviour of DUT in the following conditions:
In all these cases, the command should not be executed. Where given, the command in-
between should be accepted.
Test description:
wait 300 ms
DTR0 (2)
DTR1 (memBankNr)
// The following steps must be sent within 75 ms, counted from the last rise bit of
first "ENABLE WRITE MEMORY, send once" command untill first fall bit of second
"ENABLE WRITE MEMORY, send once" command
ENABLE WRITE MEMORY, send once
if (i == 0)
idle 13 ms + 110010 + idle 13 ms // settling time: idle 13 ms and send a frame
followed by 13 ms - Test send command with a frame in-between
answer2 == NO
else if (i == 1)
answer2 == QUERY DEVICE GROUPS 0-7, send to device Broadcast (),
accept No Answer // Test send command with broadcast command in-between
else if (i == 2)
answer2 == QUERY DEVICE GROUPS 0-7, send to device GroupAddress (0),
accept No Answer // Test send command with group command in-between -
gearGroups0
else if (i == 3)
answer2 == QUERY DEVICE GROUPS 0-7, send to device ShortAddress
(GLOBAL_currentUnderTestLogicalUnit), accept No Answer //Test send
command with short command in-between
else
answer2 == QUERY DEVICE GROUPS 0-7, send to device ShortAddress (63),
accept No Answer //Test send command with short command in-between
endif
ENABLE WRITE MEMORY, send once
answer = WRITE MEMORY LOCATION (i)
if (answer != NO)
error 2 writeEnableState enabled at test step i = i. Actual: answer. Expected:
NO.
endif
if (i == 1 OR i == 3)
if (answer2 != 0x00)
error 3 Command in-between not executed. Actual: answer2. Expected:
0x00.
endif
else
if (answer2 != NO)
error 4 Command in-between executed. Actual: answer2. Expected: NO.
endif
endif
endfor
endif
Table 55 – Parameters for test sequence ENABLE WRITE MEMORY: timeout / command
in-between
The test sequence checks the correct function of the RESET MEMORY BANK command.
Before proceeding with the test, an implemented memory bank is needed. The command shall
be executed only if it is received twice.
This test sequence checks the behaviour of DUT in the following conditions:
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 157 –
In all these cases, the command should not be executed. Where given, the command in-
between should be accepted.
Test description:
RESET
wait 300 ms
DTR0 (2)
DTR1 (memBankNr)
ENABLE WRITE MEMORY
answer = WRITE MEMORY LOCATION (i)
if (answer != i)
error 3 Wrong value written at test step i = i. Actual: answer. Expected: i.
endif
DTR0 (memBankNr)
// The following steps must be sent within 75 ms, counted from the last rise bit of
first "RESET MEMORY BANK, send once" command untill first fall bit of second
"RESET MEMORY BANK, send once" command
RESET MEMORY BANK, send once
if (i == 0)
idle 13 ms + 110010 + idle 13 ms // settling time: idle 13 ms and send a frame
followed by 13 ms - Test send command with a frame in-between
answer2 == NO
else if (i == 1)
answer2 == QUERY DEVICE GROUPS 0-7, send to device Broadcast (),
accept No Answer // Test send command with broadcast command in-between
else if (i == 2)
answer2 == QUERY DEVICE GROUPS 0-7, send to device GroupAddress (0),
accept No Answer // Test send command with group command in-between -
gearGroups0
else if (i == 3)
answer2 == QUERY DEVICE GROUPS 0-7, send to device ShortAddress
(GLOBAL_currentUnderTestLogicalUnit), accept No Answer //Test send
command with short command in-between
else
answer2 == QUERY DEVICE GROUPS 0-7, send to device ShortAddress (63),
accept No Answer //Test send command with short command in-between
endif
RESET MEMORY BANK, send once
wait 10,1 s
DTR0 (2)
answer = READ MEMORY LOCATION
if (answer != i)
error 4 Memory bank memBankNr reset at test step i = i. Actual: answer.
Expected: i.
endif
if (i == 1 OR i == 3)
if (answer2 != 0x00)
error 3 Command in-between not executed. Actual: answer2. Expected:
0x00.
endif
else
if (answer2 != NO)
error 4 Command in-between executed. Actual: answer2. Expected: NO.
endif
endif
endfor
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 159 –
The test sequence checks the correct function of the RESET MEMORY BANK. Before
proceeding with the test, an implemented memory bank is needed.
Test description:
endif
endif
endfor
endfor
endif
Table 57 – Parameters for test sequence RESET MEMORY BANK
Test description:
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
// Test reset value for initialisationState variable
TERMINATE
RESET
wait 300 ms
INITIALISE (responsiveDevice) // initialisationState = ENABLED
RESET
wait 300 ms
RANDOMISE
wait 100 ms
answer = GetRandomAddress ()
if (answer == 0xFF FF FF)
error 1 initialisationState disabled by RESET command. Execution of RANDOMISE
command expected after RESET command.
endif
TERMINATE
INITIALISE (responsiveDevice)
WITHDRAW // initialisationState = WITHDRAWN
RESET
wait 300 ms
RANDOMISE
wait 100 ms
answer = GetRandomAddress ()
if (answer == 0xFF FF FF)
error 2 initialisationState disabled by RESET command. Execution of RANDOMISE
command expected after RESET command.
endif
// Test power on value for initialisationState variable
TERMINATE
INITIALISE (responsiveDevice)
PowerCycleAndWaitForDecoder (5)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 161 –
RANDOMISE
wait 100 ms
answer = GetRandomAddress ()
if (answer != 0xFF FF FF)
error 3 Wrong power on value for initialisationState. No execution of RANDOMISE
command expected after power cycle.
endif
TERMINATE
// Test that initialisationState is enabled by INITIALISE command, and that timer ends after
15 min
INITIALISE (responsiveDevice)
start_timer (timer)
answer = QUERY SHORT ADDRESS
if (answer != responsiveDevice)
error 4 initialisationState not enabled. Actual: answer. Expected: responsiveDevice.
endif
do
time = get_timer (timer)
answer = QUERY SHORT ADDRESS
if (answer != responsiveDevice)
break
endif
while (time < 17 min)
if (time < (15 - 1,5))
error 5 Initialisation timer expires too early. Actual: time min. Expected: 13,5 min < timer
< 16,5 min.
else if (time > (15 + 1,5))
error 6 Initialisation timer expires too late. Actual: time min. Expected: 13,5 min < timer <
16,5 min.
endif
TERMINATE
// Test that timer is prolonged
INITIALISE (responsiveDevice)
start_timer (timer)
wait 5 min
INITIALISE (responsiveDevice)
do
time = get_timer (timer)
answer = QUERY SHORT ADDRESS
if (answer != responsiveDevice)
break
endif
while (time < 22 min)
if (time < ((15 + 5) - 1,5))
error 7 Re-triggered initialisation timer expires too early. Actual: time min. Expected:
18,5 min < timer < 21,5 min.
else if (time > ((15 + 5) + 1,5))
error 8 Re-triggered initialisation timer expires too late. Actual: time min. Expected: 18,5
min < timer < 21,5 min.
endif
TERMINATE
12.7.2 TERMINATE
Test description:
PowerCycleAndWaitForDecoder (5)
BS EN 62386-103:2014
– 162 – IEC 62386-103:2014 © IEC 2014
RESET
wait 300 ms
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
INITIALISE (responsiveDevice)
answer = QUERY SHORT ADDRESS
if (answer != responsiveDevice)
error 1 initialisationState not enabled. Actual: answer. Expected: responsiveDevice.
endif
TERMINATE
answer = QUERY SHORT ADDRESS
if (answer != NO)
error 2 initialisationState not disabled. Actual: answer. Expected: NO.
endif
The test sequence checks the device addressing scheme defined in the standard, in two
cases: when DUT has no short address and when DUT has a short address assigned.
Test description:
RESET
wait 300 ms
oldAddress = GLOBAL_currentUnderTestLogicalUnit
newAddress = 63
for (i = 0; i < 2; i++)
SetShortAddress (fromAddress[i]; toAddress[i])
for (j = 0; j < 5; j++)
INITIALISE (device[j])
answer = QUERY SHORT ADDRESS
if (answer != shortAddress[i,j])
error 1 Wrong responsive logical unit at test step (i,j) = (i,j). Actual: answer.
Expected: shortAddress[i,j].
endif
TERMINATE
endfor
endfor
SetShortAddress (newAddress; oldAddress)
Table 58 – Parameters for test sequence INITIALISE - device addressing
shortAddress
Test GLOBAL_numberOf i=0 i=1 test step
device
step j LogicalUnits description
(no (shortAddress =
shortAddress) newAddress)
1 MASK newAddress
All logical units
0 MASK >1 invalid backward invalid backward react
frame frame
Only logical
units without
1 0111 1111b MASK NO
shortAddress
react
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 163 –
shortAddress
Test GLOBAL_numberOf i=0 i=1 test step
device
step j LogicalUnits description
(no (shortAddress =
shortAddress) newAddress)
Only logical
units with
2 newAddress NO newAddress shortAddress =
newAddress
react
No logical unit
3 1011 1111b NO NO
reacts
No logical unit
4 1100 0000b NO NO
reacts
12.7.4 RANDOMISE
The test sequence checks the correct function of the RANDOMISE command when
initialisationState has one of the following values: disabled, enabled or withdrawn.
Test description:
RESET
wait 300 ms
TERMINATE
RANDOMISE
wait 100 ms
randomAddress = GetRandomAddress ()
if (randomAddress != 0xFF FF FF)
error 1 Command executed when initialisationState is disabled. Actual: randomAddress.
Expected: 0xFF FF FF.
endif
RESET
wait 300 ms
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
INITIALISE (responsiveDevice)
RANDOMISE
wait 100 ms
randomAddress1 = GetRandomAddress ()
if (randomAddress1 == 0xFFFFFF)
error 2 Command not executed when initialisationState is enabled. Generated random
address is 0xFF FF FF.
endif
SetSearchAddress (randomAddress1)
WITHDRAW
RANDOMISE
wait 100 ms
randomAddress2 = GetRandomAddress ()
if (randomAddress2 == randomAddress1)
error 3 Command not executed when initialisationState is withdrawn. No new random
address generated.
endif
TERMINATE
12.7.5 COMPARE
The test sequence checks the correct function of the COMPARE command when
initialisationState is either disabled or enabled. Test also checks whenever DUT should send
BS EN 62386-103:2014
– 164 – IEC 62386-103:2014 © IEC 2014
Test description:
RESET
wait 300 ms
TERMINATE
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
answer = COMPARE
if (answer != NO)
error 1 Command executed when initialisationState is disabled and randomAddress =
searchAddress = 0xFF FF FF. Actual: answer. Expected: NO.
endif
INITIALISE (responsiveDevice)
answer = COMPARE
if (answer != YES)
error 2 Command not executed when initialisationState is enabled and randomAddress =
searchAddress = 0xFF FF FF. Actual: answer. Expected: YES.
endif
randomAddress = GetLimitedRandomAddress (responsiveDevice)
if (randomAddress == 0xFF FF FF)
error 3 Bad random generator. For testing purpose each byte of the random address
must be in [0x01, 0xFE] range.
else
INITIALISE (responsiveDevice)
for (i = 0; i < 7; i++)
SetSearchAddress (data[i])
answer = COMPARE
if (answer != value[i])
error 4 errorText[i] at test step i = i. Actual: answer. Expected: value[i].
endif
endfor
TERMINATE
answer = COMPARE
if (answer != NO)
error 5 Command executed when initialisationState is disabled and randomAddress
= searchAddress and different from 0xFF FF FF. Actual: answer. Expected: NO.
endif
endif
Table 59 – Parameters for test sequence COMPARE
Test
data value errorText
step i
randomAddress
0 YES Command not executed at RANDOM ADDRESS < SEARCH ADDRESS
+ 0x01 00 00
randomAddress
1 YES Command not executed at RANDOM ADDRESS < SEARCH ADDRESS
+ 0x00 01 00
randomAddress
2 YES Command not executed at RANDOM ADDRESS < SEARCH ADDRESS
+ 0x00 00 01
randomAddress
3 NO Command executed at RANDOM ADDRESS > SEARCH ADDRESS
- 0x01 00 00
randomAddress
4 NO Command executed at RANDOM ADDRESS > SEARCH ADDRESS
- 0x00 01 00
randomAddress
5 NO Command executed at RANDOM ADDRESS > SEARCH ADDRESS
- 0x00 00 01
6 randomAddress YES Command not executed at RANDOM ADDRESS = SEARCH ADDRESS
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 165 –
12.7.6 WITHDRAW
The test sequence checks the correct function of the WITHDRAW command. Test also checks
that the INITIALISE command should not restart the compare process and should not prolong
the initialisation timer.
Test description:
RESET
wait 300 ms
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
randomAddress = GetLimitedRandomAddress (responsiveDevice)
if (randomAddress == 0xFF FF FF)
error 1 Bad random generator. For testing purpose each byte of the random address
must be in [0x01, 0xFE] range.
else
for (i = 0; i < 7; i++)
TERMINATE
INITIALISE (responsiveDevice)
SetSearchAddress (data[i])
WITHDRAW
SetSearchAddress (randomAddress)
answer = COMPARE
if (answer != value[i])
error 2 errorText[i] at test step i = i. Actual: answer. Expected: value[i].
endif
endfor
INITIALISE (responsiveDevice)
answer = COMPARE
if (answer != NO)
error 3 INITIALISE resets initialisationState to ENABLED. Actual: answer. Expected:
NO.
endif
TERMINATE
endif
// Test that the initialisationState timer is re-triggered when initialisationState = WITHDRAWN
state
RESET
wait 300 ms
INITIALISE (responsiveDevice)
start_timer (timer)
wait 5 min
WITHDRAW
INITIALISE (responsiveDevice)
do
time = get_timer (timer)
answer = QUERY SHORT ADDRESS
if (answer != responsiveDevice)
break
endif
while (time < 22 min)
if (time < ((15 + 5) - 1,5) OR time > ((15 + 5) + 1,5))
error 4 Initialisation timer not re-triggering while initialisationState is withdrawn. Actual:
time min. Expected: 18,5 min < timer < 21,5 min.
endif
TERMINATE
BS EN 62386-103:2014
– 166 – IEC 62386-103:2014 © IEC 2014
Test initialisationState
data value errorText
step i after WITHDRAW
The test sequence checks first the reset and power on values for searchAddress variable.
After that, the correct function of the SEARCHADDRH, SEARCHADDRM, SEARCHADDRL
commands is checked when initialisationState is disabled, enabled or withdrawn.
Test description:
endif
// Test whether searchAddress variable is correctly set
RESET
wait 300 ms
randomAddress = GetLimitedRandomAddress (responsiveDevice)
if (randomAddress == 0xFF FF FF)
error 4 Bad random generator. For testing purpose each byte of the random address
must be in [0x01, 0xFE] range.
else
answer = COMPARE
if (answer != NO)
error 5 COMPARE executed when initialisationState was disabled. Actual: answer.
Expected: NO.
endif
INITIALISE (responsiveDevice)
SetSearchAddress (randomAddress + 0x00 01 00)
answer = COMPARE
if (answer != YES)
error 6 searchAddress not set when initialisationState was enabled. Actual: answer.
Expected: YES.
endif
SetSearchAddress (randomAddress)
WITHDRAW
SetSearchAddress (randomAddress + 0x01 00 00)
TERMINATE
INITIALISE (responsiveDevice)
answer = COMPARE
if (answer != YES)
error 7 searchAddress not set when initialisationState was withdrawn. Actual:
answer. Expected: YES.
endif
TERMINATE
endif
The test sequence checks the correct function of the PROGRAM SHORT ADDRESS
command when initialisationState is disabled, enabled or withdrawn. Test also checks
whenever command is accepted or not when different formats (valid and invalid) of the
address to be stored are given.
Test description:
RESET
wait 300 ms
TERMINATE
features = QUERY DEVICE CAPABILITIES, send to device ShortAddress (newAddress)
oldAddress = GLOBAL_currentUnderTestLogicalUnit
newAddress = 63
PROGRAM SHORT ADDRESS (newAddress)
answer = QUERY DEVICE CAPABILITIES, send to device ShortAddress (newAddress),
accept No Answer
if (answer != NO)
error 1 Command executed when initialisationState is disabled. Actual: answer.
Expected: NO.
SetShortAddress (newAddress; oldAddress)
endif
randomAddress = GetLimitedRandomAddress (oldAddress)
if (randomAddress == 0xFF FF FF)
BS EN 62386-103:2014
– 168 – IEC 62386-103:2014 © IEC 2014
error 2 Bad random generator. For testing purpose each byte of the random address
must be in [0x01, 0xFE] range.
else
INITIALISE (oldAddress)
for (i = 0; i < 7; i++)
SetSearchAddress (data[i])
PROGRAM SHORT ADDRESS (newAddress)
answer = QUERY DEVICE CAPABILITIES, sent to (ShortAddress (newAddress)) ,
accept No Answer
if (answer != value[i])
error 3 errorText1[i] at test step i = i. Actual: answer. Expected: value[i].
if (i != 6)
SetShortAddress (newAddress; oldAddress)
else
SetShortAddress (oldAddress; newAddress)
endif
endif
endfor
SetSearchAddress (randomAddress)
for (j = 0; j < 6; j++)
PROGRAM SHORT ADDRESS (address[j])
answer = QUERY DEVICE CAPABILITIES, send to device ShortAddres
(queryAddress[j]), accept No Answer
if (answer != features)
halt 1 PROGRAM SHORT ADDRESS command errorText2[j] at test step j = j.
Actual: answer. Expected: YES.
endif
endfor
// Test for all available short addresses
for (j = GLOBAL_numberShortAddresses; j < 64; j++)
PROGRAM SHORT ADDRESS (j)
answer = QUERY SHORT ADDRESS, send to device ShortAddress (j)
if (answer != j)
halt 2 PROGRAM SHORT ADDRESS command at test step j = j failed. Actual:
answer. Expected: j.
endif
endfor
WITHDRAW
PROGRAM SHORT ADDRESS (oldAddress)
answer = QUERY DEVICE CAPABILITIES, send to device ShortAddress (oldAddress),
accept No Answer
if (answer != features)
error 4 Command not executed when initialisationState is withdrawn. Actual:
answer. Expected: YES.
SetShortAddress (63; oldAddress)
endif
TERMINATE
endif
Table 61 – Parameters for test sequence PROGRAM SHORT ADDRESS
Test
data value errorText1
step i
Command executed at RANDOM ADDRESS < SEARCH
0 randomAddress + 0x01 00 00 NO
ADDRESS
Command executed at RANDOM ADDRESS < SEARCH
1 randomAddress + 0x00 01 00 NO
ADDRESS
Command executed at RANDOM ADDRESS < SEARCH
2 randomAddress + 0x00 00 01 NO
ADDRESS
Command executed at RANDOM ADDRESS > SEARCH
3 randomAddress - 0x01 00 00 NO
ADDRESS
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 169 –
Test
data value errorText1
step i
Command executed at RANDOM ADDRESS > SEARCH
4 randomAddress - 0x00 01 00 NO
ADDRESS
Command executed at RANDOM ADDRESS > SEARCH
5 randomAddress - 0x00 00 01 NO
ADDRESS
Command not executed at RANDOM ADDRESS =
6 randomAddress features
SEARCH ADDRESS
Test
address description queryAddress errorText2
step j
0 oldAddress initial address oldAddress not executed
1 0011 1111b short address 63 63 not executed
2 0100 0000b no change 63 executed
3 1000 0000b no change 63 executed
4 1111 1110b no change 63 executed
5 MASK delete short address broadcast unaddressed not executed
The test sequence checks the correct function of the VERIFY SHORT ADDRESS command
when initialisationState is disabled, enabled or withdrawn. Test also checks whenever answer
is received from DUT when different formats (valid and invalid) of the address to be verified
are given.
Test description:
RESET
wait 300 ms
TERMINATE
oldAddress = GLOBAL_currentUnderTestLogicalUnit
answer = VERIFY SHORT ADDRESS ((oldAddress << 1) + 1)
if (answer != NO)
error 1 Command executed when initialisationState is disabled. Actual: answer.
Expected: NO.
endif
for (i = 0; i < 8; i++)
INITIALISE (address[i])
DTR0 (setAddress[i])
SET SHORT ADDRESS, send to device ShortAddress (address[i])
answer = VERIFY SHORT ADDRESS (data[i])
if (answer != value[i])
error 2 errorText[i] when initialisationState is enabled at test step i = i. Actual:
answer. Expected: value[i].
endif
WITHDRAW
answer = VERIFY SHORT ADDRESS (data[i])
if (answer != value[i])
error 3 errorText[i] when initialisationState is withdrawn at test step i = i. Actual:
answer. Expected: value[i].
endif
TERMINATE
endfor
SetShortAddress (255; oldAddress)
BS EN 62386-103:2014
– 170 – IEC 62386-103:2014 © IEC 2014
Test
address setAddress data value errorText
step i
0 oldAddress oldAddress oldAddress YES Command not executed
1 oldAddress oldAddress oldAddress + 1 NO Command executed
2 oldAddress 63 63 YES Command not executed
3 63 63 62 NO Command executed
4 63 63 64 NO Command executed
5 63 63 MASK NO Command executed
6 63 63 11111110b NO Command executed
7 63 MASK MASK NO Command executed
The test sequence checks the correct function of the QUERY SHORT ADDRESS command.
Initially the correct format of short address returned by command is checked, and after that
the behaviour of DUT when initialisationState is disabled, enabled or withdrawn is tested.
Test description:
RESET
wait 300 ms
oldAddress = GLOBAL_currentUnderTestLogicalUnit
// Check answer format of QUERY SHORT ADDRESS, expected: 11111111b or 00AAAAAAb
INITIALISE (oldAddress)
for (i = 0; i < 3; i++)
DTR0 (validAddress[i])
SET SHORT ADDRESS, send to device ShortAddress (address[i)])
answer = QUERY SHORT ADDRESS, accept Value
if (answer != addressFormat[i])
error 1 Wrong format of returned short address at test step i = i. Actual: answer.
Expected format: addressFormat[i].
endif
endfor
TERMINATE
// Check behaviour of DUT with initialisationState = disabled
answer = QUERY SHORT ADDRESS
if (answer != NO)
error 2 Command executed when initialisationState is disabled. Actual: answer.
Expected: NO.
endif
randomAddress = GetLimitedRandomAddress (63)
if (randomAddress == 0xFF FF FF)
error 3 Bad random generator. For testing purpose each byte of the random address
must be in [0x01, 0xFE] range.
SetShortAddress (63; oldAddress)
else
// Check behaviour of DUT with initialisationState = enabled and different values for
randomAddress and searchAddress
INITIALISE (63)
for (j = 0; j < 7; j++)
SetSearchAddress (data[j])
answer = QUERY SHORT ADDRESS
if (answer != value[j])
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 171 –
The test sequence checks the correct function of the IDENTIFY DEVICE command. The
identification procedure timer is also checked if it is started, finished, prolonged, or aborted
according to the specification.
Test description:
RESET
wait 300 ms
responsiveDevice = GLOBAL_currentUnderTestLogicalUnit
// Test if identification procedure is started and finished within 10 s ± 1 s
UserInput (After accepting this message please check if logical unit starts an identification
procedure and measure how long the identification procedure takes (in s), OK)
IDENTIFY DEVICE
wait 12 s
started = UserInput (Did identification procedure start?, YesNo)
if (started != Yes)
error 1 Identification procedure not started by IDENTIFY DEVICE command.
else
stopped = UserInput (Did identification procedure stop?, YesNo)
if (stopped == Yes)
stoppedTime = UserInput (Enter the length of identification procedure, value [s])
if (stoppedTime < 9)
error 2 Identification procedure stopped earlier than 9 s.
else if (stoppedTime > 11)
error 3 Identification procedure not stopped after 11 s.
endif
else
error 4 Identification procedure not stopped after 11 s.
UserInput (Wait untill identification procedure stops, OK)
endif
endif
// Test if identification procedure timer is prolonged
UserInput (After accepting this message please check if logical unit starts an identification
procedure of 15 s, OK)
IDENTIFY DEVICE
wait 5 s
IDENTIFY DEVICE
wait 12 s
started = UserInput (Did logical unit start an identification procedure of 15 s ± 1 s?, YesNo)
if (started != Yes)
error 5 Identification procedure not restart on reception of a second IDENTIFY DEVICE
command.
endif
// Test if identification procedure timer is not stopped
for (i = 0; i < 4; i++)
UserInput (After accepting this message please check if logical unit starts an
identification procedure of 10 s ± 1 s, OK)
IDENTIFY DEVICE
wait 5 s
if (i < 2)
command1[i]
else
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 173 –
answer = command1[j]
if (answer != value1[i])
error 6 command1[i] not executed.
endif
endif
wait 12 s
started = UserInput (Did identification procedure last for 10 s ± 1 s?, YesNo)
if (started != Yes)
error 7 Identification procedure stopped on reception of text1[i].
endif
if (i == 1)
answer = query1[i]
if (answer != value1[i])
error 8 command1[i] not executed.
endif
TERMINATE
endif
endfor
// Test if identification procedure is aborted
DTR0 (1)
for (j = 0; j < 5; j++)
command2[j]
UserInput (After accepting this message logical unit will start an identification procedure.
Please check if identification procedure is stopped after 4 s, OK)
IDENTIFY DEVICE
wait 4 s
command3[j]
stopped = UserInput (Did logical unit start an identification procedure of 4 s?, YesNo)
if (stopped == NO)
error 9 Identification procedure not stopped by command3[j].
wait 8 s
endif
if (j >= 1)
answer = query2[j]
if (answer != value2[j])
error 10 command3[j] not executed.
endif
if (j == 1)
TERMINATE
endif
endif
endfor
Table 64 – Parameters for test sequence IDENTIFY DEVICE
Test
step command1 query1 value1
i
0 PING - -
VERIFY SHORT
INITIALISE
1 ADDRESS YES
(responsiveDevice)
(responsiveDevice)
2 COMPARE - YES
QUERY DEVICE
3 - 0XX0 X000b
STATUS
12.8.1 DTR0
Test sequence checks that the change of the DTR0 register on one logical unit will not affect
the value of the registers of the other logical units. DTR0 register shall be tested via memory
banks. After each read of a memory bank location DTR0 shall be incremented.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
DTR0 (10)
DTR1 (0)
answer = READ MEMORY LOCATION
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
for (k = 0; k < address; k++)
READ MEMORY LOCATION, send to device ShortAddress (address)
endfor
endfor
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
answer = QUERY CONTENT DTR0, send to device ShortAddress (address)
expectedValue = 10 + 1 + address
if (answer != expectedValue)
error 1 LogicalUnit address: Wrong value of DTR0. Actual: answer. Expected:
expectedValue.
endif
endfor
endif
Test sequence checks that the change of some variables on one logical unit will not affect the
values of the variables of the other logical units.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
ResetDevice ()
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 175 –
• all logical units generate a unique random address, when RANDOMISE command is sent
using broadcast as addressing mode;
• only the addressed logical unit generates a random address, when RANDOMISE
command is sent using the short address of the selected logical unit.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
ResetDevice ()
// All logical units shall generate an unique random address
INITIALISE (MASK)
RANDOMISE
wait 100 ms
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
randomAddress[address] = GetRandomAddress (address)
endfor
for (i = 0; i < GLOBAL_numberShortAddresses; i++)
if (randomAddress[i] == 0xFFFFFF)
error 1 LogicalUnit i: Wrong random address generated. Actual: 0xFFFFFF.
Expected: not 0xFFFFFF.
endif
for (j = i + 1; j < GLOBAL_numberShortAddresses; j++)
if (randomAddress[i] == randomAddress[j])
error 2 LogicalUnit i and LogicalUnit j generated the same random address
randomAddress[i].
endif
endfor
endfor
ResetDevice ()
TERMINATE
// Only one logical unit should generate a random address
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
answer = QUERY RESET STATE, send to device ShortAddress (address)
if (answer != YES)
error 3 LogicalUnit address: is not in the reset state. Actual: N0. Expected:
YES.
endif
BS EN 62386-103:2014
– 176 – IEC 62386-103:2014 © IEC 2014
INITIALISE (address)
RANDOMISE
wait 100 ms
TERMINATE
answer = QUERY RESET STATE, send to device ShortAddress (address)
if (answer != NO)
error 4 LogicalUnit address: is still in the reset state. Actual: YES. Expected:
N0.
endif
endfor
endif
12.8.4 Addressing 1
Test sequence checks the answer sent by all logical units at broadcast queries. Test sets the
quiescent mode of half of the logical units to disabled. The expected answer is YES for a
YES-NO query, and an invalid backward frame for an 8-bit query.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
ResetDevice (false)
START QUIESCENT MODE
// Quiescent mode of all logical units is on
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 1 Wrong answer received from all logical units at a YES-NO query. Actual:
answer. Expected: YES.
endif
answer = QUERY DEVICE STATUS
if (answer != 0100 0010b)
error 2 Wrong answer received from all logical units at an 8-bit query. Actual:
answer. Expected: 0100 0010b.
endif
// Quiescent mode of one logical units is off, the rest are on
for (address = 0; address < GLOBAL_numberShortAddresses; address++)
START QUIESCENT MODE
STOP QUIESCENT MODE, send to device ShortAddress (address)
for (i = 0; i < GLOBAL_numberShortAddresses; i++)
answer = QUERY QUIESCENT MODE, send to device ShortAddress (i)
if (i == address)
if (answer != NO)
error 3 Wrong answer received from logical unit address at a YES-NO
query. Actual: answer. Expected: NO.
endif
else
if (answer != YES)
error 4 Wrong answer received from logical unit i at a YES-NO query.
Actual: answer. Expected: YES.
endif
endif
endfor
answer = QUERY QUIESCENT MODE
if (answer != YES)
error 5 Wrong answer received from all logical units at a YES-NO query.
Actual: answer. Expected: YES.
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 177 –
12.8.5 Addressing 2
Test sequence checks the answer sent by all logical units at queries sent using broadcast and
grouping addressing. Test checks the behaviour of the logical units when all of them are
added to one group, and after that when half of them are in one group and the other half in a
different group. Test sets the quiescent mode of the logical units as follows:
• all enabled;
• first half of the group disabled and the rest enabled, with all logical units in one group;
Group0 quiescent mode disabled and Group1 enabled, with logical units split into two
groups;
• first half of the group enabled and the rest disabled, with all logical units in one group;
Group0 quiescent mode enabled and Group1 disabled with logical units split into two
groups;
• all disabled.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
ResetDevice (false)
for (i = 0; i < 2; i++)
if (i == 0)
AddDeviceGroups (0x00000002)
else
for (address = 0; address < (GLOBAL_numberShortAddresses >> 1);
address++)
RemoveDeviceGroups (0x00000002, ShortAddress (address))
AddDeviceGroups (0x00000001, ShortAddress (address))
endfor
endif
for (j = 0; j < 4; j++)
switch (j)
case 0: // All quiescent mode enabled
START QUIESCENT MODE
break
case 1:
BS EN 62386-103:2014
– 178 – IEC 62386-103:2014 © IEC 2014
endif
answer = QUERY STATUS, send to device GroupAddress (0)
//gearGroups0
if (answer != statusG0[j])
error 6 Wrong answer received from all logical units in gearGroups0
at an 8-bit query at test step (i,j) = (i,j). Actual: answer. Expected:
statusG0[j].
endif
endif
endfor
endfor
endif
Table 65 – Parameters for test sequence Addressing 2
Test step j 0 1 2 3
12.8.6 Addressing 3
The test sequence checks the behaviour of a logical unit at a broadcast unaddressed query.
Test description:
if (GLOBAL_numberShortAddresses == 1)
report 1 Only one logical device implemented
else
ResetDevice ()
oldAddress = GLOBAL_currentUnderTestLogicalUnit
SetShortAddress (oldAddress; 255)
INITIALISE (MASK)
RANDOMISE
wait 100 ms
answer = QUERY RANDOM ADDRESS(H), send to device BroadcastUnaddress (),
accept Violation
if (answer == Violation)
error 1 Multiple logical units answered at broadcast unaddressed command.
endif
answer = QUERY RANDOM ADDRESS(M), send to device BroadcastUnaddress (),
accept Violation
if (answer == Violation)
error 2 Multiple logical units answered at broadcast unaddressed command.
endif
answer = QUERY RANDOM ADDRESS(L), send to device BroadcastUnaddress (),
accept Violation
if (answer == Violation)
error 3 Multiple logical units answered at broadcast unaddressed command.
endif
BS EN 62386-103:2014
– 180 – IEC 62386-103:2014 © IEC 2014
This test procedure checks for addressing an instance by its instance type. Therefore the test
procedure checks for the number of implemented instances (QUERY NUMBER OF
INSTANCES) and is reading each instance type (QUERY INSTANCE TYPE). In a second loop
the sequence is checking all instance types (0 to 31 with QUERY INSTANCE TYPE),
expecting a valid answer (no bit timing error) at each instance type number, detected through
the first loop being implemented. All other instance type addressed query commands shall be
without an answer.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
numberOfInstanceTypes = 0
instanceTypeArray []
if (numberOfInstances == 0)
report 1 No instances available
else
// check each instance for its type and store it in a list
for (i = 0; i < numberOfInstances; i++)
instanceType= QUERY INSTANCE TYPE, send to instance InstanceNumber (i)
instanceTypeArray[numberOfInstanceTypes] = instanceType
numberOfInstanceTypes++
endfor
// check each possible instance type and check the answer according the array
for (type = 0; type < 32; type++)
instanceTypeCheck = QUERY INSTANCE TYPE, send to instance InstanceType (type)
accept no answer
if (instanceTypeCheck == NO)
if (containsType)
error 1 No reponse from instance type type
endif
else
if (containsType)
if (instanceTypeCheck != type)
error 2 Invalid instance type from instance type type reported
endif
else
error 3 Response from non-existent instance type type received
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 181 –
endif
endif
endfor
endif
ResetDevice (false)
12.9.2 Instance Primary Group
This sequence sets the primary instance group (SET PRIMARY INSTANCE GROUP (DTR0))
one number after the other and checks for the group assigned by QUERY PRIMARY
INSTANCE GROUP and reaction to an instance group addressed command (QUERY
INSTANCE STATUS).
It also checks for DTR values above 31 to be ignored and MASK to remove any instance
group assignment.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// clear all instance groups
DTR0 (MASK)
SET PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 1, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 2, send to instance InstanceBroadcast ()
if (checkGroup == setInstanceGroup)
if (answer == NO)
error 2 No response from instance group checkGroup with
primary instance group set to setInstanceGroup
endif
else
if (answer != NO)
error 3 Response received from instance group checkGroup with
primary instance group set to setInstanceGroup
endif
endif
endfor
BS EN 62386-103:2014
– 182 – IEC 62386-103:2014 © IEC 2014
endfor
// set primary instance group to 9 for the following check of invalid values
DTR0 (9)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber (i)
answer = QUERY PRIMARY INSTANCE GROUP, send to instance InstanceNumber
(i)
if (answer != 9)
error 6 Primary instance group is not set to 9
endif
// primary instance group is 9 and should not change when group is set to an invalid
value
for (setInstanceGroup = 32; setInstanceGroup < 255; setInstanceGroup++)
DTR0 (setInstanceGroup)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber (i)
answer = QUERY PRIMARY INSTANCE GROUP, send to instance
InstanceNumber (i)
if (answer != 9)
error 7 Primary instance group is not 9
endif
endfor
endfor
endif
ResetDevice (false)
12.9.3 Instance Group 2
This sequences sets the instance group 2 (SET INSTANCE GROUP 2 (DTR0)) one number
after the other and checks for the group assigned by QUERY INSTANCE GROUP 2 and
reaction to an instance group addressed command (QUERY INSTANCE STATUS).
It also checks for DTR values above 31 to be ignored and MASK to remove any instance
group assignment.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 183 –
if (numberOfInstances == 0)
report 1 No instances available
else
// clear all instance groups
DTR0 (MASK)
SET PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 1, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 2, send to instance InstanceBroadcast ()
if (checkGroup == setInstanceGroup)
if (answer == NO)
error 2 No response from instance group checkGroup with
“instanceGroup2” set to setInstanceGroup
endif
else
if (answer != NO)
error 3 Response received from instance group checkGroup with
“instanceGroup2” set to setInstanceGroup
endif
endif
endfor
endfor
if (answer != NO)
error 5 Response received with “instanceGroup2” = MASK
endif
endfor
endif
// instance group 2 is 9 and should not change when group is set to an invalid value
for (setInstanceGroup = 32; setInstanceGroup < 255; setInstanceGroup++)
DTR0 (setInstanceGroup)
SET INSTANCE GROUP 2, send to instance InstanceNumber (i)
answer = QUERY INSTANCE GROUP 2, send to instance InstanceNumber (i)
if (answer != 9)
error 7 “instanceGroup2” is not 9
endif
endfor
endfor
endif
ResetDevice (false)
12.9.4 Instance Group 1
This sequences sets the instance group 1 (SET INSTANCE GROUP 1 (DTR0)) one number
after the other and checks for the group assigned by QUERY INSTANCE GROUP 1 and
reaction to an instance group addressed command (QUERY INSTANCE STATUS).
It also checks for DTR values above 31 to be ignored and MASK to remove any instance
group assignment.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// clear all instance groups
DTR0 (MASK)
SET PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 1, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 2, send to instance InstanceBroadcast ()
if (checkGroup == setInstanceGroup)
if (answer == NO)
error 2 No response from instance group checkGroup with
“instanceGroup1” set to setInstanceGroup
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 185 –
else
if (answer != NO)
error 3 Response received from instance group checkGroup with
“instanceGroup1” set to setInstanceGroup
endif
endif
endfor
endfor
if (answer != NO)
error 5 Response received with “instanceGroup1” = MASK
endif
endfor
// instance group 1 is 9 and should not change when group is set to an invalid value
for (setInstanceGroup = 32; setInstanceGroup < 255; setInstanceGroup++)
DTR0 (setInstanceGroup)
SET INSTANCE GROUP 1, send to instance InstanceNumber (i)
answer = QUERY INSTANCE GROUP 1, send to instance InstanceNumber (i)
if (answer != 9)
error 7 “instanceGroup1” is not 9
endif
endfor
endfor
endif
ResetDevice (false)
12.9.5 Instance Group Combinations
This sequence checks for multiple instance group assignments. For this, the instance group 1
(SET INSTANCE GROUP 1 (DTR0)) and instance group 2 (SET INSTANCE GROUP 2
(DTR0)) are set to certain group numbers and the sequence then sets the primary instance
group (SET PRIMARY INSTANCE GROUP (DTR0)) one number after the other and checks for
the reaction to an instance group addressed command (QUERY INSTANCE STATUS), being
executed according to the current group assignments.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// clear all instance groups
DTR0 (MASK)
SET PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 1, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 2, send to instance InstanceBroadcast ()
// check when only two group slots are the same group
DTR0 (255)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber (i)
DTR0 (6)
SET INSTANCE GROUP 1, send to instance InstanceNumber (i)
SET INSTANCE GROUP 2, send to instance InstanceNumber (i)
// check when only two group slots are the same group
DTR0 (7)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber (i)
SET INSTANCE GROUP 1, send to instance InstanceNumber (i)
DTR0 (255)
SET INSTANCE GROUP 2, send to instance InstanceNumber (i)
// check when only two group slots are the same group
DTR0 (8)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber (i)
SET INSTANCE GROUP 2, send to instance InstanceNumber (i)
DTR0 (255)
SET INSTANCE GROUP 1, send to instance InstanceNumber (i)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 187 –
ResetDevice (false)
12.9.6 Multiple Instances Answer
If there is more than one instance implemented, this test sequence is checking for correct
answer when more than one instance is queried. In a first step all event priorities are set to
the same value through an instance broadcast. Afterwards the priority is queried also through
broadcast and the answer shall be a correct frame displaying the event priority set.
Afterwards the first instance event priority is set to another value than the others and the
instances are queried again through a broadcast. Here the answer shall be a frame,
containing a bit timing error.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances < 2)
report 1 No multiple instances available
else
// clear all instance groups
DTR0 (MASK)
SET PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 1, send to instance InstanceBroadcast ()
SET INSTANCE GROUP 2, send to instance InstanceBroadcast ()
// set one instances (one before last) to instance group 5 => expect error when broadcast
DTR0 (5)
SET PRIMARY INSTANCE GROUP, send to instance InstanceNumber
(numberOfInstances-2)
answer = QUERY PRIMARY INSTANCE GROUP, send to instance InstanceGroup (3)
if (answer != 3)
error 2 Wrong answer of instance group 3
endif
answer = QUERY PRIMARY INSTANCE GROUP, send to instance InstanceGroup (5)
if (answer != 5)
error 3 Wrong answer of instance group 5
endif
answer = QUERY PRIMARY INSTANCE GROUP, send to instance InstanceBroadcast
(), accept violation
if (answer != ERROR)
error 4 Wrong answer with different return values
BS EN 62386-103:2014
– 188 – IEC 62386-103:2014 © IEC 2014
endif
endif
ResetDevice (false)
12.10 Instance configuration instructions
This sequence first tests if the device has instances implemented (QUERY INSTANCE
NUMBER). If any instances are implemented, they are disabled (DISABLE INSTANCE) and
enabled (ENABLE INSTANCE) again, one after each other and the enable status (QUERY
INSTANCE STATUS Bit1 and QUERY INSTANCE ENABLED) will be observed.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
// disable each instance one by one and do a full check after each disable
for (i = 0; i < numberOfInstances; i++)
// at this point at least one instance should be enabled
enable = QUERY INSTANCE ENABLED, send to instance InstanceBroadcast ()
if (!enabled)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 189 –
if (checkInstance <= i)
// instance should be disabled
if (enabled)
error 7 Instance checkInstance is enabled.
endif
// enable each instance one by one and do a full check after each enable
for (i = 0; i < numberOfInstances; i++)
ENABLE INSTANCE, send to instance InstanceNumber (i)
if (checkInstance <= i)
// instance should be enabled
if (!enabled)
error 13 Instance checkInstance is not enabled.
endif
ResetDevice (false)
In the first step different event schemes (1 to 4, 0) are set for all instances one after another.
The DUT is configured in a way that all requirements for allowing the event scheme to be set
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 191 –
are met. All instance event schemes are verified through a QUERY EVENT SCHEME, also
checking that the event schemes of other instances’ remain unchanged.
For the second step the configuration of the DUT is changed in a way that the requirements
for allowing the event schemes other than 0 are not met. For all instances the event schemes
1 to 4 are set and the fall back to event scheme 0 is verified.
In the third step the DUT meets the requirements for certain event schemes at the moment
when there are set. The configuration is changed later in a way that the requirements are not
met any longer and the implicit fall back to event scheme 0 is verified.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// store current short address for later restore
oldDeviceShortAddress = GLOBAL_currentDeviceShortAddress
// TEST CASE: set without fallback + go to fallback after setting (when removing
address)
// loop for all instances and test setting and querying event scheme
for (i = 0; i < numberOfInstances; i++)
// set event scheme to default test value
DTR0 (4)
SET EVENT SCHEME, send to instance InstanceBroadcast ()
answer = QUERY EVENT SCHEME, send to instance InstanceBroadcast ()
if (answer != 4)
error 1 Not all instances have set their event scheme to 4.
endif
if (checkInstance == i)
// check instance which event scheme is set to DTR0
if (dtrValue >= 0 AND dtrValue <= 4)
if (answer != dtrValue)
error 2 Instance checkInstance has changed the event
scheme to answer
BS EN 62386-103:2014
– 192 – IEC 62386-103:2014 © IEC 2014
endif
if (dtrValue == 1 OR dtrValue == 2)
// remove group assignments
RemoveDeviceGroups(0x0000 0001)
if (answer != 0)
error 6 Instance checkInstance has not changed to
fall back event scheme after removing group
assignment
else if (dtrValue == 4)
// remove group assignments
RemoveDeviceGroups(0x0000 0001)
// ---------------------------------------------------
// TEST CASE: go to fallback when setting
// ---------------------------------------------------
// loop for all instances and test setting and querying event scheme
for (i = 0; i < numberOfInstances; i++)
// set event scheme to default test value
DTR0 (0)
SET EVENT SCHEME (device broadcast unaddressed, instance broadcast)
answer = QUERY EVENT SCHEME (device broadcast unaddressed, instance
broadcast)
if (answer != 0)
error 11 Not all instances have set their event scheme to 0.
endif
ResetDevice (false)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 195 –
This test sequence reads the resolution for all implemented instances. The results are put into
the test report. This test sequence is checking the readout of an input value (QUERY INPUT
VALUE, QUERY INPUT VALUE LATCH) respective the resolution of the instance (QUERY
RESOLUTION). The test performs N+1 read actions, the first command is QUERY INPUT
VALUE and all following commands (if applicable) are QUERY INPUT VALUE LATCH with N =
round up (resolution / 8). All commands up to N shall have an answer containing a value, the
last one (N+1) shall have no answer.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// get resolution and check number of input value queries
for (i = 0; i < numberOfInstances; i++)
resolution = QUERY RESOLUTION, send to instance InstanceNumber (i)
NBytesNeeded = RoundUp (resolution / 8)
report 2 Instance i has a resolution of resolution bit(s) / NBytesNeeded byte(s)
ResetDevice (false)
This test procedure sets for all instances with instance type 0 (event filter is 24 bit wide), one
after another, the event filter to a certain test value. The event filter is checked by the
corresponding query command.
Test description:
BS EN 62386-103:2014
– 196 – IEC 62386-103:2014 © IEC 2014
ResetDevice ()
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// loop for all instances and test setting and querying event filter
for (i = 0; i < numberOfInstances; i++)
answer = QUERY INSTANCE TYPE, send to instance InstanceNumber (i)
if (answer == 0)
SetEventFilter (send to instance InstanceNumber (i), 0x010203)
answer = GetEventFilter (send to instance InstanceNumber (i))
if (answer != 0x010203)
error 1 Instance event filter not correctly set and queried afterwards.
Actual: answer. Expected: 0x010203.
endif
else
report 1 Instance type is not 0. The width of the event filter is redefined by part
3 answer of this standard.
endif
endfor
endif
ResetDevice ()
This sequence reads first the number of implemented instances (QUERY NUMBER OF
INSTANCES). This number is then crosschecked by reading each instance type (QUERY
INSTANCE TYPE) and put the result into the test sequence report. This sequence implicitly
tests the instance number addressing. Also the instance numbers of not implemented
instances (number of instances up to 31) are checked to result in no answer.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
// check each possible instance even if they do not exist
for (instance = 0; instance < 32; instance++)
answer = QUERY INSTANCE TYPE, send to instance InstanceNumber (instance),
accept no answer
if (instance < numberOfInstances)
// expect answer of instance i
if (answer == NO)
error 1 Instance instance does not report its type
else
report 1 Instance instance is from type answer
endif
else
// expect no answer of instance i
if (answer != NO)
error 2 Instance instance reports type answer but instance should not exist
else
report 2 Instance instance does not exist
endif
endif
endfor
ResetDevice (false)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 197 –
This sequence checks the unused bits of QUERY INSTANCE STATUS answer. The error bit
is not checked, as there is no definition of a specific error to be tested. The instance active bit
is tested by the procedure Instance Enable / Disable.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
//check reserved bits
for (i = 0; i < numberOfInstances; i++)
status = QUERY INSTANCE STATUS, send to instance InstanceNumber (i)
if (status != 0000 00XX)
error 1 Reserved bits of instance i status are not 0
endif
endfor
endif
ResetDevice (false)
This test sequence checks that the instance error information is the same from QUERY
INSTANCE ERROR and Bit0 of QUERY INSTANCE STATUS. If there is no error reported in
the status byte (QUERY INSTANCE STATUS Bit0 equals zero), also the query instance error
shall show no answer. If there is an error reported in the status byte, the query instance error
shall show up with some value (specified in Parts 3xx).
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
ResetDevice (false)
Through this sequence different event priorities are set (send twice SET EVENT PRIORITY)
for one instance after the other. The priority set is checked through QUERY EVENT
PRIORITY. There is also a crosscheck that other instances’ event priorities remain
unchanged.
Test description:
ResetDevice (true)
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
// set priority to default test value (to the lowest one)
DTR0 (5)
SET EVENT PRIORITY, send to instance InstanceBroadcast ()
answer = QUERY EVENT PRIORITY, send to instance InstanceBroadcast ()
if (answer != 5)
error 1 Not all instances have set their event priority to level 5
endif
if (checkInstance == i)
// check instance which event priority is set by DTR0
if (dtrValue >= 2 AND dtrValue <= 5)
if (answer != dtrValue)
error 2 Instance checkInstance has changed the event
priority to the wrong level answer
endif
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 199 –
else
// check instance where DTR0 not change event priority
if (answer != 5)
error 3 Instance checkInstance has changed the event
priority to the wrong level answer
endif
endif
else
// check instance which event priority should not changed
if (answer != 5)
error 4 Instance checkInstance has changed the event priority to
the wrong level answer
endif
endif
endfor
endfor
endfor
endif
ResetDevice (false)
12.13 Reserved Commands
The test sequence checks whether device reacts on one of the reserved standard commands.
Test description:
ResetDevice (false)
for (i = 0; i <= 3; i++)
for (opcode = fromCMD[i]; opcode <= toCMD[i]; opcode ++)
answer = Send twice device broadcast command with opcode opcode, accept
Violation, Value
if (answer != NO)
error 1 Answer after receiving reserved standard command with opcode
opcode.
endif
answer = QUERY RESET STATE
if (answer != YES)
error 2 DUT not in reset state after receiving reserved standard command with
opcode opcode.
ResetDevice ()
endif
endfor
endfor
ResetDevice (true)
The test sequence checks whether device reacts on one of the reserved instance type 0
instance commands.
Test description:
ResetDevice ()
numberOfInstances = GetNumberOfInstances ()
if (numberOfInstances == 0)
report 1 No instances available
else
for (instance = 0; instance < numberOfInstances; instance ++)
answer = QUERY INSTANCE TYPE, send to InstanceNumber (instance)
if (answer == 0)
for (i = 0; i <= 4; i++)
for (opcode = fromCMD[i]; opcode <= toCMD[i]; opcode ++)
answer = Send twice, send to InstanceNumber (instance) command
with opcode opcode, accept Violation, Value
if (answer != NO)
error 1 Answer after receiving reserved instance command
(instance type 0) with opcode opcode.
endif
answer = QUERY RESET STATE
if (answer != YES)
error 2 DUT not in reset state after receiving reserved instance
command (instance type 0) with opcode opcode.
ResetDevice ()
endif
endfor
endfor
endif
endfor
endif
Table 67 – Parameters for test sequence Reserved instance commands (instance type 0)
The test sequence checks whether device reacts on one of the reserved special commands.
Test description:
ResetDevice ()
for (i = 0; i <= 14; i++)
for (specialCMD = fromCMD[i]; specialCMD <= toCMD[i]; specialCMD ++)
for (k = 0; k <= 14; k++)
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 201 –
Test step k 0 1 2 3 4 5 6 7 8 9
opcodeByte 0 1 3 5 9 17 33 65 129 255
This sequence is sending a RESET command and afterwards is waiting for the maximum time
period allowed for the command to be executed.
Test description:
ResetDevice ()
RESET
wait 300ms
return
This sequence is sending a RESET command and optionally enables or disables the
application controller and all instances.
BS EN 62386-103:2014
– 202 – IEC 62386-103:2014 © IEC 2014
Test description:
ResetDevice (enable)
ResetDevice ()
// enable or disable the application controller and all instances
if (enable)
EnableApplicationControllerAndAllInstances ()
else
DisableApplicationControllerAndAllInstances ()
endif
return
12.14.2 EnableApplicationControllerAndAllInstances
Test description:
EnableApplicationControllerAndAllInstances ()
12.14.3 DisableApplicationControllerAndAllInstances
Test description:
DisableApplicationControllerAndAllInstances ()
12.14.4 HasApplicationController
This test procedure returns, if the DUT contains an application controller or not.
Test description:
result = HasApplicationController ()
12.14.5 GetVersionNumber
Test description:
versionNumber = GetVersionNumber ()
versionNumber = -1
answer = QUERY VERSION NUMBER, accept Value
if (answer > 3)
minor = answer & 0x03
major = answer >> 2
versionNumber = major + minor / 10
else
versionNumber = answer
endif
return versionNumber
12.14.6 AddDeviceGroups
This test procedure sets one or more device groups according to the given mask.
Test description:
AddDeviceGroups (mask)
Test description:
12.14.7 RemoveDeviceGroups
This test procedure removes one or more device groups according to the given mask.
Test description:
RemoveDeviceGroups (mask)
This test procedure removes one or more device groups according to the given mask,
additionally using the given addressing byte.
Test description:
12.14.8 ClearAllDeviceGroups
Test description:
ClearAllDeviceGroups ()
DTR2:DTR1 (0xFF,0xFF)
REMOVE FROM DEVICE GROUPS 0-15
REMOVE FROM DEVICE GROUPS 16-31
12.14.9 CheckDeviceGroups
This subsequence checks for the device group memberships by reading the device group
assignments and also by the reaction on device group addressing using QUERY DEVICE
CAPABILITIES.
Test description:
CheckGroupAssignment (checkGroupAssignment)
deviceGroups = GetDeviceGroups ()
if (checkGroupAssignment != deviceGroups)
error 1 Group assignment does not match
endif
// check all group addresses for correct reaction
for (i = 0; i < 32, i++)
status = QUERY DEVICE CAPABILITIES, send to device GroupAddress (i), accept No
Answer
if (checkGroupAssignment & (0x00000001 << i) == 0)
// group should be not assigned => device should not react on this group
if (status != NO)
error 2 Device reacts on device group i
endif
else
// group should be assigned => device should react on this group
if (status == NO)
error 3 Device does not react on device group i
endif
endif
endfor
return
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 205 –
12.14.10 GetDeviceGroups
Test description:
groups0to31 = GetDeviceGroups()
Test description:
groups0to31 = GetDeviceGroups(addressByte)
12.14.11 PowerCycle
This subsequence performs an external power cycle for both bus powered and external bus
powered devices. The duration of the power interruption is given in s.
Test description:
PowerCycle (delay)
if (GLOBAL_busPowered)
if (delay == 5)
delay = 0,550 // since a bus powered device has a power cycle of 550ms
endif
Disconnect (interface)
wait delay s
Connect (interface)
else
Switch_off (external power)
wait delay s
Switch_on (external power)
endif
return
12.14.12 PowerCycleAndWaitForBusPower
This subsequence performs a PowerCycle and waits for the bus power to be restored. The
duration of the power interruption is given in s. Subsequence returns the time (in ms) between
finishing PowerCycle and the bus power being available.
Test description:
if (GLOBAL_internalBPS)
BS EN 62386-103:2014
– 206 – IEC 62386-103:2014 © IEC 2014
12.14.13 PowerCycleAndWaitForDecoder
Test description:
PowerCycleAndWaitForDecoder (delay)
12.14.14 SetupTestFrame
This subsequence is setting DTR0, DTR1 and DTR2 as preparation to request a test frame to
be sent through the SEND TESTFRAME command.
Test description:
SetupTestFrame (frame)
return
12.14.15 GetNumberOfInstances
Test subsequence returns the number of instances present in the bus unit.
Test description:
numberOfInstances = GetNumberOfInstances ()
12.14.16 GetEventFilter
Test description:
12.14.17 SetEventFilter
Test description:
12.14.18 GetNumberOfLogicalUnits
Test subsequence returns the number of the logical control gear units present in the bus unit.
Test description:
numberLogicalUnits = GetNumberOfLogicalUnits ()
DTR1 (0)
DTR0 (0x19)
answer = READ MEMORY LOCATION
return answer
12.14.19 GetIndexOfLogicalUnit
Test subsequence returns the index number of the logical control gear unit.
Test description:
BS EN 62386-103:2014
– 208 – IEC 62386-103:2014 © IEC 2014
DTR1 (0)
DTR0 (0x1A)
answer = READ MEMORY LOCATION, send to device (ShortAddress (address))
return answer
12.14.20 GetRandomAddress
Test description:
randomAddress = GetRandomAddress ()
12.14.21 GetLimitedRandomAddress
Test subsequence tries 50 times to find a random address which has each generated byte
different that 0x00 and 0xFF.
Test description:
randomAddress = 0xFF FF FF
TERMINATE
INITIALISE (logicalUnit)
for (i = 0; i < 50; i++)
RANDOMISE
wait 100 ms
randomH = QUERY RANDOM ADDRESS (H), send to logicalUnit
randomM = QUERY RANDOM ADDRESS (M), send to logicalUnit
randomL = QUERY RANDOM ADDRESS (L), send to logicalUnit
if ((randomH != 0x00) AND (randomH != 0xFF) AND (randomM != 0x00) AND
(randomM != 0xFF) AND (randomL != 0x00) AND (randomL != 0xFF))
randomAddress = answerH << 16 + answerM << 8 + answerL
break
endif
endfor
TERMINATE
return randomAddress
12.14.22 SetSearchAddress
Test description:
SetSearchAddress (data)
12.14.23 SetShortAddress
Test subsequence sets new short address (toAddress) using SET SHORT ADDRESS, and
using the following addressing mode:
• short address of logical unit: if logical unit already has a short address assigned
(fromAddress)
• broadcast unaddressed: if logical unit has no short address assigned
Test description:
if (toAddress == 255)
dtrValue = 255
else if (toAddress <= 63)
dtrValue = toAddress
else
halt 1 Invalid toAddress argument in subsequence SetShortAddress. Actual: toAddress.
endif
DTR0 (dtrValue)
if (fromAddress != 255)
if (fromAddress <= 63)
answer = QUERY DEVICE CAPABILITIES, send to device ShortAddress
(fromAddress), accept NO
if (answer != NO)
SET SHORT ADDRESS, send to device ShortAddress (fromAddress)
else
halt 2 Invalid fromAddress argument in subsequence SetShortAddress. Actual:
fromAddress.
endif
else
halt 3 Invalid fromAddress argument in subsequence SetShortAddress. Actual:
fromAddress.
endif
else
answer = QUERY DEVICE CAPABILITIES, send to device (broadcast unaddressed) ,
accept NO
if (answer != NO)
SET SHORT ADDRESS, send to device (broadcast unaddressed)
else
halt 4 Invalid fromAddress argument in subsequence SetShortAddress. Actual:
fromAddress.
endif
endif
return
12.14.24 ReadMemBankMultibyteLocation
Test description:
multibyte = 0
for (i = 0; i < nrBytes; i++)
answer = READ MEMORY LOCATION
if (answer == NO)
multibyte = -1
BS EN 62386-103:2014
– 210 – IEC 62386-103:2014 © IEC 2014
break
endif
nrBytes - 1 - i
multibyte = multibyte + answer * 256
endfor
return multibyte
12.14.25 FindImplementedMemoryBank
Test subsequence returns the number of the first implemented memory bank above memory
bank 0 and the address of the last accessible memory location of that memory bank, for the
selected logical unit.
Test description:
memoryBankNr = 0
memoryBankLoc = 0
DTR0 (2)
DTR1 (0)
lastMemBank = READ MEMORY LOCATION
for (i = 1; i <= lastMemBank; i++)
DTR0 (0)
DTR1 (i)
answer = READ MEMORY LOCATION
if (answer != NO)
memoryBankNr = i
memoryBankLoc = answer
break
endif
endfor
return (memoryBankNr; memoryBankLoc)
12.14.26 FindAllImplementedMemoryBanks
Test subsequence returns all implemented memory banks and the address of the last
accessible memory location of each implemented memory bank above bank 0.
Test description:
memoryBankNr[0] = 0
memoryBankLoc[0] = 0
count = 0
DTR0 (2)
DTR1 (0)
lastMemBank = READ MEMORY LOCATION
for (i = 1; i <= lastMemBank; i++)
DTR0 (0)
DTR1 (i)
answer = READ MEMORY LOCATION
if (answer != NO)
memoryBankNr[count] = i
memoryBankLoc[count] = answer
count++
endif
endfor
return (memoryBankNr[]; memoryBankLoc[])
BS EN 62386-103:2014
IEC 62386-103:2014 © IEC 2014 – 211 –
12.14.27 ShortAddress
This subsequence returns a device address byte indicating a device short address generated
from the given parameter shortAddress.
Test description:
12.14.28 GroupAddress
This subsequence returns a device address byte indicating a device group address generated
from the given parameter groupAddress.
Test description:
12.14.29 Broadcast
This subsequence returns a device address byte indicating a device broadcast address.
Test description:
(addressByte) = Broadcast ()
12.14.30 BroadcastUnaddressed
This subsequence returns a device address byte indicating a device broadcast unaddressed
address.
Test description:
(addressByte) = BroadcastUnaddressed ()
12.14.31 InstanceNumber
This subsequence returns an instance address byte indicating an instance number address
generated from the given parameter instanceNumber.
BS EN 62386-103:2014
– 212 – IEC 62386-103:2014 © IEC 2014
Test description:
12.14.32 InstanceGroup
This subsequence returns an instance address byte indicating an instance group address
generated from the given parameter instanceGroup.
Test description:
12.14.33 InstanceType
This subsequence returns an instance address byte indicating an instance type address
generated from the given parameter instanceType.
Test description:
12.14.34 InstanceBroadcast
This subsequence returns an instance address byte indicating an instance broadcast address.
Test description:
(instanceByte) = InstanceBroadcast ()
12.14.35 FeatureOfInstanceNumber
This subsequence returns an instance address byte indicating a feature on instance number
address generated from the given parameter instanceNumber.
Test description:
endif
return (0010 0000b | instanceNumber)
12.14.36 FeatureOfInstanceGroup
This subsequence returns an instance address byte indicating a feature on instance group
address generated from the given parameter instanceGroup.
Test description:
12.14.37 FeatureOfInstanceType
This subsequence returns an instance address byte indicating a feature on instance type
address generated from the given parameter instanceType.
Test description:
12.14.38 FeatureOfInstanceBroadcast
Test description:
(instanceByte) = FeatureOfInstanceBroadcast ()
12.14.39 FeatureOfDevice
This subsequence returns a device and instance address byte. The device address byte
indicates a device short address generated from the given parameter shortAddress. The
insatnce address byte indicates a feature of device address.
Test description:
endif
addressByte = 0000 0001b | (shortAddress << 1)
instanceByte = 1111 1100b
return (addressByte, instanceByte)
12.14.40 FeatureOfDeviceWithGroupAddress
This subsequence returns a device and instance address byte. The device address byte
indicates a device group address generated from the given parameter groupAddress. The
insatnce address byte indicates a feature of device address.
Test description:
12.14.41 FeatureOfDeviceWithBroadcast
This subsequence returns a device and instance address byte. The device address byte
indicates a device broadcast address. The insatnce address byte indicates a feature of device
address.
Test description:
Bibliography
[1] CISPR 15, Limits and methods of measurement of radio disturbance characteristics of
electrical lighting and similar equipment
[3] IEC 60669-2-1, Switches for household and similar fixed electrical installations –
Part 2-1, Particular requirements – Electronic switches
[4] IEC 60921, Ballasts for tubular fluorescent lamps – Performance requirements
[5] IEC 60923, Auxiliaries for lamps – Ballasts for discharge lamps (excluding tubular
fluorescent lamps) – Performance requirements
[6] IEC 60929, AC and/or DC-supplied electronic control gear for tubular fluorescent
lamps – Performance requirements
[7] IEC 61347-1, Lamp controlgear – Part 1: General and safety requirements
[8] IEC 61347-2-3, Lamp control gear – Part 2-3: Particular requirements for a.c and/or
d.c. supplied electronic control gear for fluorescent lamps
[9] IEC 61547, Equipment for general lighting purposes – EMC immunity requirements
[10] IEC 62034, Automatic test systems for battery powered emergency escape lighting
[11] GS1 General Specification, Version 14: Jan-2014, [cited 2014-07-15] . Available at:
http://www.google.ch/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=2&ved=0CCI
QFjAB&url=http%3A%2F%2Fwww.gs1.at%2Findex.php%3Foption%3Dcom_phocadow
nload%26view%3Dcategory%26download%3D289%3Ags1-general-specifications-v14-
en%26id%3D9%3Ags1-spezifikationen-a-
richtlinien%26Itemid%3D304&ei=znm2U4PqFoP20gXXmIHgAQ&usg=AFQjCNHoqaUj
WXvLbyJfVJoGxgOAl63mCw
___________
This page deliberately left blank
This page deliberately left blank
NO COPYING WITHOUT BSI PERMISSION EXCEPT AS PERMITTED BY COPYRIGHT LAW
About us Revisions
We bring together business, industry, government, consumers, innovators Our British Standards and other publications are updated by amendment or revision.
and others to shape their combined experience and expertise into standards We continually improve the quality of our products and services to benefit your
-based solutions. business. If you find an inaccuracy or ambiguity within a British Standard or other
The knowledge embodied in our standards has been carefully assembled in BSI publication please inform the Knowledge Centre.
a dependable format and refined through our open consultation process.
Organizations of all sizes and across all sectors choose standards to help Copyright
them achieve their goals. All the data, software and documentation set out in all British Standards and
other BSI publications are the property of and copyrighted by BSI, or some person
Information on standards or entity that owns copyright in the information used (such as the international
We can provide you with the knowledge that your organization needs standardization bodies) and has formally licensed such information to BSI for
to succeed. Find out more about British Standards by visiting our website at commercial publication and use. Except as permitted under the Copyright, Designs
bsigroup.com/standards or contacting our Customer Services team or and Patents Act 1988 no extract may be reproduced, stored in a retrieval system
Knowledge Centre. or transmitted in any form or by any means – electronic, photocopying, recording
or otherwise – without prior written permission from BSI. Details and advice can
Buying standards be obtained from the Copyright & Licensing Department.
You can buy and download PDF versions of BSI publications, including British
and adopted European and international standards, through our website at Useful Contacts:
bsigroup.com/shop, where hard copies can also be purchased. Customer Services
If you need international and foreign standards from other Standards Development Tel: +44 845 086 9001
Organizations, hard copies can be ordered from our Customer Services team. Email (orders): orders@bsigroup.com
Email (enquiries): cservices@bsigroup.com
Subscriptions
Subscriptions
Our range of subscription services are designed to make using standards
Tel: +44 845 086 9001
easier for you. For further information on our subscription products go to
Email: subscriptions@bsigroup.com
bsigroup.com/subscriptions.
With British Standards Online (BSOL) you’ll have instant access to over 55,000 Knowledge Centre
British and adopted European and international standards from your desktop. Tel: +44 20 8996 7004
It’s available 24/7 and is refreshed daily so you’ll always be up to date. Email: knowledgecentre@bsigroup.com
You can keep in touch with standards developments and receive substantial
Copyright & Licensing
discounts on the purchase price of standards, both in single copy and subscription
format, by becoming a BSI Subscribing Member. Tel: +44 20 8996 7070
Email: copyright@bsigroup.com
PLUS is an updating service exclusive to BSI Subscribing Members. You will
automatically receive the latest hard copy of your standards when they’re
revised or replaced.
To find out more about becoming a BSI Subscribing Member and the benefits
of membership, please visit bsigroup.com/shop.
With a Multi-User Network Licence (MUNL) you are able to host standards
publications on your intranet. Licences can cover as few or as many users as you
wish. With updates supplied as soon as they’re available, you can be sure your
documentation is current. For further information, email bsmusales@bsigroup.com.