Analog Value Processing S5-100U
If you want to read in the analog value with function block FB250 (analog value reading), you have to
pre-process the analog value before calling up FB250.
Example 1:
Analog input module 466-8MC11 is inserted in slot 1, which means that the module's start address
is 72.
The analog values are stored in four consecutive bytes:
1st analog value (channel 0) in IB72
2nd analog value (channel 1) in IB73
3rd analog value (channel 2) in IB74
4th analog value (channel 3) in IB75
Function block FB72, pictured below, reads in the analog values and pre-processes them for
function block FB250 (analog value reading).
NAME :READ 466
READ IN ALL CHANNELS
0005 : OF AI 466
0006 :L IW 72 READ ALL FOUR CHANNELS
0007 :T FW 72 AND REARRANGE
0008 :L IW 74
0009 :T FW 74
000A :
000B :L FY 72 PROCESS EACH ANALOG VALUE
000C :SLW 3 AND REWRITE THEM IN
000D :T IW 72 THE PII SO THAT FB250
000E : CAN ACCESS THEM
000F :L FY 73 WITHIN THAT SCAN.
0010 :SLW 3
0011 :T IW 74
0012 :
0013 :L FY 74
0014 :SLW 3
0015 :T IW 76
0016 :
0017 :L FY 75
0018 :SLW 3
0019 :T IW 78
001A :
001B :BE
FB72 Explanation
EWA 4NEB 812 6120-02
11-17