Commissioning
11.9 Identification and maintenance data
Automation system
256
System Manual, 12/2017, A5E03461182-AE
11.9.3
Example: Read out firmware version of the CPU with Get_IM_Data
Automation task
You want to check whether the modules in your automation system have the current
firmware. The firmware version of the modules can be found in the I&M 0 data. The I&M0
data are the basic information of a device and contain information such as the manufacturer
ID, article number, serial number and the hardware and firmware version.
To read out the I&M0 data, use the "Get_IM_Data" instruction. You read the I&M 0 data of all
the modules in the user program of the CPU via "Get_IM_Data" instructions and store them
in a data block.
Conditions and parameters
To read out the I&M data of the CPU, use the following block parameters of the
"Get_IM_Data" instruction:
●
LADDR: Enter the HW ID of the module at the block parameter "LADDR".
●
IM_TYPE: Enter the I&M data number (e.g. "0" for I&M 0 data) at the block parameter
"IM_TYPE".
●
DATA: Area for storing the read I&M data (for example. in a global data block). Store the
I&M0 data in an area of the data type "IM0_Data".
This example shows how to read out the I&M 0 data of a CPU 1511-1 PN (6ES7511-1AK00-
0AB0). To read out the I&M 0 data of a different module, simply use the HW ID of the
module at the parameter LADDR.
Solution
To read out the I&M 0 data of the CPU, follow these steps:
1.
Create a global data block to store the I&M 0 data.
2.
Create a structure of the data type "IM0_Data" in the global data block. You can assign
any name to the structure ("imData") in this case.
Figure 11-7 Example: Data block for I&M data
3.
Create the Insert the "Get_IM_Data" instruction in the user program, e.g. in OB 1.
Summary of Contents for Simatic S7-1500/ET 200MP
Page 1: ......