Example: Read Out Firmware Version Of The Cpu With Get_Im_Data - Siemens SIMATIC S7-1500/ET 200MP System Manual

Hide thumbs Also See for SIMATIC S7-1500/ET 200MP:
Table of Contents

Advertisement

12.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&M0 data. The I&M0
data is the basic information for a device. The I&M0 data contains information, for example:
• Manufacturer ID
• Article number and serial number
• Hardware and firmware version.
To read out the I&M0 data, use the "Get_IM_Data" instruction. You read the I&M0 data of all
modules in the user program of the CPU with "Get_IM_Data" instructions and store the I&M
data 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&M 0 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. 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 12-6
3. Create the Insert the "Get_IM_Data" instruction in the user program, e.g. in OB 1.
Automation system
System Manual, 01/2023, A5E03461182-AK
Example: Data block for I&M data
12.9 Identification and maintenance data
Commissioning
287

Advertisement

Table of Contents
loading

Table of Contents