Secondary address
The secondary address like also the primary address is used to identify the device. The advantage of the secondary addressing is among other things a bigger number of addresses (slaves). Only by the identification number 100 million different values can be build. Furthermore the assignment of primary addresses is not applicable.
According to M-Bus standard a secondary address has the following structure:
Ident-No.: 4 Byte / 8-digit BCD device identification number
Herstellerkürzel : 2 Byte / vendor short symbol
Version: 1 Byte / Generation number of the vendor
Medium: 1 Byte / Medium
If the secondary address should be used, the primary address is set to 253.
The secondary address is given to the function block via the structure "stSecAdr" (ST_MBUS_SecAdr).
Vendor short symbol, version and Medium are each internally set to 16#FF by default. So these values have not to be set explicitly.
Request example:
stSecAdr1.udiIdNumber := 16#12345678;
stSecAdr1.uiManufacturer := 16#FFFF;
stSecAdr1.usiMedium := 16#FF;
stSecAdr1.usiVersion := 16#FF;
fbmeter(usiAddress := 253,
stSecAdr.udiIdNumber := stSecAdr1,
stCom := stComKL6781_1);
or also
fbmeter.stSecAdr.udiIdNumber := 16#12345678;
fbmeter(usiAddress := 253,
stCom := stComKL6781_1);