×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 109764573, Entry date: 04/23/2019
(2)
Rate

How do you change the parameters of the SIMATIC ET 200SP modules dynamically via the data record 128 during the CPU runtime?

  • Entry
  • Associated product(s)
Data record 128 is a parameter data record of the SIMATIC ET 200SP modules.

With data record 128 you can change the parameters of the module in your user program independently of your configuration in the hardware configuration. The parameters are transferred to the module via data record 128 with the instruction "WRREC". With the "RDREC" instruction you can read out data record 128 and determine the set parameters.

Information about the structure of data record 128 of the ET 200SP modules is available in the manual of Entry ID 84133942.

Using the instructions "WRREC" and "RDREC" you can dynamically change and read out the contents of data record 128 during the CPU runtime for all module classes of the ET 200SP product portfolios except for the fail-safe modules.

Fig. 1 shows the call and sample parameters of the instruction "WRREC".


Fig. 1

Table 1 shows the parameters of the instruction "WRREC".

ParameterDeclarationData typeDescription
REQInputBOOLREQ = 1: Perform data record transfer (start of the write procedure)
IDInputHW_IO

Identification number of the SIMATIC ET 200SP module (hardware ID):
The hardware ID is assigned automatically by STEP 7 and stored in the properties of the selected ET 200SP module in the hardware configuration.

INDEXInputDINT

Data record number:
In this example 128.

LENInputUINT

Maximum length in bytes of the data record to be transferred:
Information about the length and structure of data record 128 is available in the manual of the ET 200SP module in Entry ID: 84133942.

DONEOutputBOOLThe data record has been transferred.
BUSYOutputBOOLBUSY = 1: The write procedure has not yet finished.
ERROROutputBOOLERROR = 1: An error has occurred in the write procedure.
STATUSOutputDWORDBlock status and error information
RCORDInput/outputVARIANTData record:
Structure of data record 128 from an Array of Byte. Detailed information is available in the manual of the ET 200SP module in Entry ID 84133942.

Table 1

Fig. 2 shows the call and sample parameters of the instruction "RDREC".


Fig. 2

Table 2 shows the parameters of the "RDREC" instruction.
 

ParameterDeclarationData typeDescription
REQInputBOOLREQ = 1: Perform data record transfer (start of the read procedure)
IDInputHW_IO

Identification number of the SIMATIC ET 200SP module (hardware ID):
The hardware ID is assigned automatically by STEP 7 and stored in the properties of the selected ET 200SP module in the hardware configuration.

INDEXInputDINTData record number:
In this example 128.
MLENInputUINT

Maximum length in bytes of the data record information to be read:
Information about the length and structure of data record 128 is available in the manual of the ET 200SP module in Entry ID: 84133942.

VALIDOutputBOOLNew data record has been received and is valid.
BUSYOutputBOOLBUSY = 1: The read procedure has not yet finished.
ERROROutputBOOLERROR = 1: An error has occurred in the read procedure.
STATUSOutputDWORDBlock status and error information
LENOutputUINTLength of the read data record information
RECORDInput/outputVARIANTDestination area of the read data record:
Structure of data record 128 from an Array of Byte. Detailed information is available in the manual of the ET 200SP module in Entry ID 84133942.

Table 2

By writing the parameter data record of an ET 200SP module with the "WRREC" instruction you can change its function as part of your parameters during the CPU runtime. You can change the following parameters during the CPU runtime:

  • Measuring range of analog input modules (from 4..20mA to 0-10V, for example).
  • Resolution via the module functions "Measuring range change" or "Measuring range scaling" in order to optimize the measuring range.
  • Times (input delay time and pulse stretching, for example).
  • Enabling and disabling of channels.

Note

  • The dynamic changing of parameters during runtime is not available for fail-safe modules. The system does not permit any parameter changes of fail-safe modules during runtime.
  • Parameters changed with the "WRREC" instruction are not stored retentively on the module. When you restart the CPU, the modules concerned start again with the stored hardware configuration. 

Further Information
Detailed information about the instructions "WRREC" and "RDREC" is available in the manual in Entry ID 109755202.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links