Parameterization
64/98
SmartWire-DT Gateway | EU5C-SWD-ETHERCAT
DOC140901UM01EN | Revision 1 | English | 2015-03 | Released | Public
© Hilscher 2015
Example 1
This example shows how to calculate the default value
0x02
of the options
byte of the
DIL-SWD-32-001
SWD
device.
The
02
value of the options byte results from the fact that all bits except Bit
1 have been set to FALSE, thus all having the byte value
0
; Bit 1 on the
other hand has been set to TRUE, thus having the byte value
02
, which
after logical ORing amounts to the value
0x02
for the whole options byte:
Bit 0 (Extended parameters)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 1 (Presence in SmartWire-DT network)
=
TRUE
(1)
=
2
(Dez)
=
0x02
(Hex)
+
Bit 2 (Cyclic input data with CRC8)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 3 (Format of payload data words)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 4 (Substitution by universal module)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 5 (reserved)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 6 (Support of data profiles)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 7 (Support of acyclic data requests)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
=
Options Byte
2
(Dez)
=
0x02
(Hex)
This options byte means for the
DIL-SWD-32-001
device that it must be
present in the current bus configuration (Bit 1 = TRUE), but that is has no
extended parameters (Bit 0 = FALSE) and does not use CRC8 with its
cyclic input data (Bit 2 = FALSE) etc.
If you now want to allow the substitution of the device within the SmartWire-
DT bus by an universal module, you have to set Bit 4 to TRUE and then
add the newly created byte value (in this case
16
[Dez]
respectively
0x10
[Hex]
) to the other byte values in order to calculate options byte:
Bit 0 (Extended parameters)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 1 (Presence in SmartWire-DT network) =
TRUE
(1)
=
2
(Dez)
=
0x02
(Hex)
+
Bit 2 (Cyclic input data with CRC8)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 3 (Format of payload data words)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 4 (Substitution by universal module)
=
TRUE
(1)
=
16
(Dez)
=
0x10
(Hex)
+
Bit 5 (reserved)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 6 (Support of data profiles)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+
Bit 7 (Support of acyclic data requests)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
=
Options Byte
18
(Dez)
=
0x12
(Hex)
0x12
thus is the value you have to enter as options byte for the device in
TwinCAT, in case you want to allow its replacement by universal module.