Siemens MOBY FC 56 Technical Description page 65

Table of Contents

Advertisement

5.2
Calling the FC 56 Cyclically (e.g., in OB 1)
The following program is an example of calling and scanning the FC 56 in an
application. The definition of the data structure is described in chapter 5.5.
Parameterization of the MOBY command was already covered in the definition of
the "MOBY DB."
Baustein: OB1 cycle execution
Netzwerk: 1
call FC56
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 FH-MT"
Params_DB
Params_ADDR :=0
CALL
"MOBY FH-MT"
Params_DB
Params_ADDR :=300
A
M
FP
M
S
"MOBY DB".SLG[1].init_run
JC
x01
AN
"MOBY DB".SLG[1].ready
JC
x01
A
"MOBY DB".SLG[1].error
JC
x01
A
M
FP
M
S
"MOBY DB".SLG[1].command_start
x01:
A
M
FP
M
S
"MOBY DB".SLG[2].init_run
JC
x02
AN
"MOBY DB".SLG[2].ready
JC
x02
A
"MOBY DB".SLG[2].error
JC
x02
A
M
FP
M
S
"MOBY DB".SLG[2].command_start
x02:
NOP
0
FC 56
J31069-D0155-U001-A0-7618
:=56
:=56
1.2
2.2
1.0
2.0
1.3
2.3
1.1
2.1
Sample Applications
// Call FC 56 for each SLG in
each cycle
// memory bit init_run for 1st SLG
// memory bit command_start for
1st SLG
// memory bit init_run for 2nd SLG
// memory bit command_start for
2nd SLG
5-3

Advertisement

Table of Contents
loading

Table of Contents