4 Functional Mechanisms of the Application
4.5 Message generation with the Messages block (FB10)
Monitoring of 24 V load circuits
Entry-ID: 61450284, V1.1, 05/2014
29
C
o
p
y
ri
g
h
t
S
ie
m
e
n
s
A
G
2
0
1
4
A
ll
ri
g
h
ts
re
s
e
rv
e
d
Program details
The figure below shows program details on the Messages (FB10) block.
Figure 4-6
DATA (DB2)
Messages (FB10)
EV_ID1
EV_ID2
EV_ID3
EV_ID4
EV_ID5
DW#16#6000_0001
DW#16#6000_0002
DW#16#6000_0003
DW#16#6000_0004
DW#16#6000_0005
PLC alarms
Error Channel 1
Error Channel 2
Error Channel 3
Error Channel 4
SIG_OUT1
SIG_OUT2
SIG_OUT3
SIG_OUT4
SIG_ERR_PSEDIAG
Address:
0.5
1.0
1.1
1.2
1.3
ALARM_D
EN
SIG
ID
EV_ID
CMP_ID
SD
TRUE
W#16#EEEE
DW#16#0000_0001
#SD
SIG_OUT1
EV_ID1
ALARM_D
EN
SIG
ID
EV_ID
CMP_ID
SD
TRUE
W#16#EEEE
DW#16#0000_0002
#SD
SIG_OUT2
EV_ID2
ALARM_D
EN
SIG
ID
EV_ID
CMP_ID
SD
TRUE
W#16#EEEE
DW#16#0000_0003
#SD
SIG_OUT3
EV_ID3
ALARM_D
EN
SIG
ID
EV_ID
CMP_ID
SD
TRUE
W#16#EEEE
DW#16#0000_0004
#SD
SIG_OUT4
EV_ID4
ALARM_D
EN
SIG
ID
EV_ID
CMP_ID
SD
TRUE
W#16#EEEE
DW#16#0000_0005
#SD
SIG_ERR_PSEDIAG
EV_ID5
Error FB PSE_DIAG
SIG_OUT1=1
SIG_OUT2=1
SIG_OUT3=1
SIG_OUT4=1
SIG_ERR_PSEDIAG=1
The Messages block calls the ALARM_D instruction internally. For each call, the
ALARM_D instruction generates a PLC alarm to which an optional associated
value can be attached.
When the ALARM_D instruction is called with the SIG=1 input, the PLC alarm is
triggered. The message is pending until the ALARM_D instruction is called with the
SIG=0 input.
In this application example, five PLC alarms are created in the Messages (FB10)
block:
When the outputs OUT 1 to OUT 4 of the PSE200U module take on the state
0, a PLC alarm is triggered for the respective output.
When the PSE_DIAG (FB50) block supplies an error, a PLC alarm is also
triggered.