Parameterization
65/98
SmartWire-DT Gateway | EU5C-SWD-ETHERCAT
DOC140901UM01EN | Revision 1 | English | 2015-03 | Released | Public
© Hilscher 2015
Example 2
This example shows how to calculate the default value
0xC2
of the options
byte of the
PKE-SWD-32-Profile 2
SWD
device.
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)
=
TRUE
(1)
=
64
(Dez)
=
0x40
(Hex)
+ Bit 7 (Support of acyclic data requests)
=
TRUE
(1)
=
128
(Dez)
=
0x80
(Hex)
= Options Byte
194
(Dez)
=
0xC2
(Hex)
If you now want to allow the device to be missing within the SmartWire-DT
bus and also that it may be replaced by an universal module, you have to
set Bit 1 to FALSE and Bit 4 to TRUE. The calculation for this looks as
follows:
Bit 0 (Extended parameters)
=
FALSE
(0)
=
0
(Dez)
=
0x00
(Hex)
+ Bit 1 (Presence in SmartWire-DT network) =
FALSE
(0)
=
0
(Dez)
=
0x00
(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)
=
TRUE
(1)
=
64
(Dez)
=
0x40
(Hex)
+ Bit 7 (Support of acyclic data requests)
=
TRUE
(1)
=
128
(Dez)
=
0x80
(Hex)
= Options
Byte
208
(Dez)
=
0xD0
(Hex)
0xD0
thus is the value you have to enter as options byte for the device in
TwinCAT.
Hint
:
The Windows calculator (if configured accordingly) can be used to display
the corresponding bit values of a hexadecimal byte value. Thus you can
check, which of the bits are being set to FALSE (0) and which of the bits
are being set to TRUE (1) when you enter a certain byte value:
Figure 33: “Programmer” view of Windows 7 calculator