Cyclic Calling Of Fb 45 (E.g. In Ob 1) - Siemens SIMATIC Ident Function Manual

For moby u, moby d, rf200, rf300
Hide thumbs Also See for SIMATIC Ident:
Table of Contents

Advertisement

6.3

Cyclic calling of FB 45 (e.g. in OB 1)

The following program is an example of how to call and scan FB 45 in an application. The
definition of the data structure is described in the section "Data structure definition
(Page 70)". The parameter settings for the RFID command were made during the definition
of the "MOBY DB".
Network 1:
memory bit 1.0 is set: Start MOBY command for 1st reader
memory bit 1.1 is set: Start MOBY command for 2nd reader
memory bit 1.2 is set: Start init_run for 1st reader
memory bit 1.3 is set: Start init_run for 2nd reader
memory byte 2: OB1 used as edge triggered memory
x01:
x02:
FB 45 for MOBY U, MOBY D, RF200, RF300
Function Manual, 07/2012, J31069-D0166-U001-A4-7618
call FB45
CALL "MOBY FB" , "Instance DB K1"
Params_DB :=45
Params_ADDR:=0
CALL "MOBY FB" , "Instance DB K2"
Params_DB :=45
Params_ADDR:=50
A
"Strt_init_run_chn1"
FP
M 2.2
S
"MOBY DB".SLG1.init_run
JC
x01
UN
"MOBY DB".SLG1.ready
JC
x01
A
"MOBY DB".SLG1.error
JC
x01
A
"Strt_cmd_chn1"
FP
M 2.0
S
"MOBY DB".SLG1.command_start
A
"Strt_init_run_chn2"
FP
M 2.3
S
"MOBY DB".SLG2.init_run
JC
x02
UN
"MOBY DB".SLG2.ready
JC
x02
A
"MOBY DB".SLG2.error
JC
x02
A
"Strt_cmd_chn2"
FP
M 2.1
S
"MOBY DB".SLG2.command_start
NOP
0
Examples/applications
6.3 Cyclic calling of FB 45 (e.g. in OB 1)
// Call FB 45 for each reader in each
cycle
// memory bit init_run for 1st reader
// memory bit command_start for 1st
reader
// memory bit init_run for 2nd reader
// memory bit command_start for 2nd
reader
67

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fb 45

Table of Contents