Manual BG41/BG42/BG43 Interface modules
Rev. 99/49 3-61
3.2.9.5.10 Example
Start OB
OB21
SPA FB50
NAME #PROCW
ADR :KF 128 Building block’s peripheral address
KANR :KF 1 Channel number
MODL :KF 40 Module number
NKAN :KF 3 Maximum of inputs to be polled
FEHL :MB127 Error code in flag byte 127
:
:SPA FB 59
#Timer
:
:SPB FB 51
NAME #MODE
ADR =KF +128 Base address of the SSM, PY128
KANR =KF +1 Channel number of the module
INOU =KF +1 Analogue input number 1
MODE =KM 00000000 00000010 Signed, normalised depiction in mV, no limit
OFFS =KF +0 Offset of I/O
FEHL =MB 55 Error code to be filed in MB 55
:
:SPA FB 59
#Timer
:
SPB FB 54
NAME #UG/OG
ADR =KF +128 Base address of the SSM, PY128
K/O =KY 1,3 Channel number / input, output number
UG =KF -20 Lowest level for scaling
OG =KF +2000 Highest level for scaling
FEHL =MB 19 Error byte
:SPA FB 59
#Timer
:
There has to be a timer with 50 ms between each function call of FB FB50,
FB51 and FB54 for correct funktion of the module.
The timer has to be programmed by the user.