![Siemens SIMATIC FC 45 Function Manual Download Page 69](http://html.mh-extra.com/html/siemens/simatic-fc-45/simatic-fc-45_function-manual_382128069.webp)
Examples/applications
6.3 Cyclic calling of FC 45 (e.g. in OB 1)
FC 45
Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618
6-7
6.3
6.3
Cyclic calling of FC 45 (e.g. in OB 1)
The following program is an example of how to call and scan FC 45 in an application. The
definition of the data structure is described in Section "Data structure definition". The
parameter settings for the MOBY command were set up during the definition of the "MOBY
DB".
Block: OB1 cycle execution
Network: 1 call FC45
memory bit 1.0 is set: Start MOBY command for 1st SLG
memory bit 1.1 is set: Start MOBY command for 2nd SLG
memory bit 1.2 is set: Start init_run for 1st SLG
memory bit 1.3 is set: Start init_run for 2nd SLG
memory byte 2: OB1 used as edge triggered memory
CALL "MOBY FC"
Params_DB :=45
Params_ADDR :=0
// Call FC 45 for each SLG in
each cycle
CALL "MOBY FC"
Params_DB :=45
Params_ADDR :=300
A M 1.2
FP M 2.2
S "MOBY DB".SLG[1].init_run
SPB x01
// memory bit init_run for
1st SLG
UN "MOBY DB".SLG[1].ready
SPB x01
U "MOBY DB".SLG[1].error
SPB x01
A M 1.0
FP M 2.0
S
"MOBY DB".SLG[1].command_start
// memory bit command_start
for 1st SLG
x01:
A M 1.3
FP M 2.3
S "MOBY DB".SLG[2].init_run
SPB x02
// memory bit init_run for
2nd SLG
UN "MOBY DB".SLG[2].ready
SP B x02
U "MOBY DB".SLG[2].error
SPB x02
U M 1.1
FP M 2.1
S
"MOBY DB".SLG[2].command_start
// memory bit command_start
for 2nd SLG
x02:
NOP 0