101BExtended instructions
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
263
8.3.2
RALRM
You can use the RALRM (Read alarm) instruction with PROFINET and PROFIBUS.
Table 8- 73 RALRM instruction
LAD / FBD
SCL
Description
"RALRM_DB"(
mode:=_int_in_,
f_ID:=_word_in_,
mlen:=_uint_in_,
new=>_bool_out_,
status=>_dword_out_,
ID=>_word_out_,
len=>_uint_out_,
tinfo:=_variant_inout_,
ainfo:=_variant_inout_);
Use the RALRM (read alarm) instruction to read diagnostic
interrupt information from a DP slave or PROFINET I/O device.
The information in the output parameters contains the start
information of the called OB as well as information of the
interrupt source.
Call RALRM only within the interrupt OB that was started by the
CPU operating system as a response to the peripheral I/O
interrupt that you want to examine.
1
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "RALRM_DB" is the name of the instance DB.
Table 8- 74 Data types for the parameters
Parameter and type
Data type
Description
MODE
IN
Byte, USInt, SInt, Int Operating mode
F_ID
IN
HW_IO (Word)
Logical start address of the component (module) from which interrupts
are to be received
Note: The device ID can be determined in one of two ways:
By making the following "Network view" selections:
–
Device (gray box)
–
"Properties" of the device
–
"Hardware identifier"
Note: Not all devices display their Hardware identifiers, however.
By making the following "Project tree" menu selections:
–
PLC tags
–
Default tag table
–
System constants tab
–
All configured device Hardware identifiers are displayed.
MLEN
IN
Byte, USInt, UInt
Maximum length in bytes of the data interrupt information to be
received
NEW
OUT
Bool
A new interrupt was received.
STATUS
OUT
DWord
Error code of the DP Master