![Siemens SIWAREX WP251 Скачать руководство пользователя страница 190](http://html.mh-extra.com/html/siemens/siwarex-wp251/siwarex-wp251_manual_374538190.webp)
Communication with SIMATIC S7-1200
11.1 Integration in SIMATIC S7-1200
SIWAREX WP251
190
Manual, 12/2015, A5E37203357A
A summary of all existing command codes can be found in chapter
(Page 179).
The following equation for generation of a corresponding command code applies to the
reading of data records from the SIWAREX to the data block:
Command code = 2000 + X (X = desired data record number)
The following equation for generation of a corresponding command code applies to the
writing of data records from the data block to the SIWAREX:
Command code = 4000 + X (X = desired data record number)
Example
The following example clarifies the actions with command mailboxes and data records:
"Calibration weight 1" is to be set to a value of 12.5 from the CPU. Since "Calibration weight
1" is a parameter of
data record 3 (see section →
Scale parameters and functions
(Page 57)), service mode must first be activated. This is possible using command code "1"
(see section →
Command lists (Page 179)).
The variable "i_CMD_CODE" must therefore be assigned the value "1" and the associated
"bo_CMD_TRIGGER" set to TRUE. Subsequently, the module is directly in service mode
(DIAG LED flashes green):
i_CMD_CODE = 1
bo_CMD_TRIGGER = TRUE
Since only complete data records can be read or written, it is recommendable to now read
data record 3 into the CPU. This is carried out using command code 2003 (see chapter
→
Command lists (Page 179)):
i_CMD_CODE = 2003
bo_CMD_TRIGGER = TRUE
All current data from data record 3 are now present in the data block. The calibration weight
is then set as desired to a value of 12.5:
CALIB_WEIGHT_1 = 12.5
The modified data record 3 must now be written into the SIWAREX again. This is carried out
using command code 4003 (see chapter →
Command lists (Page 179)):
i_CMD_CODE = 4003
bo_CMD_TRIGGER = TRUE
The new calibration weight is now present in the SIWAREX and can be used. Service mode
for the module should subsequently be switched off again using command "2".
This procedure for reading and writing data records is identical for all data records.
Содержание SIWAREX WP251
Страница 28: ...Mounting 5 3 Mounting on the SIMATIC S7 1200 SIWAREX WP251 28 Manual 12 2015 A5E37203357A ...
Страница 40: ...Connection 6 12 Attachment of calibration protection plate SIWAREX WP251 40 Manual 12 2015 A5E37203357A ...
Страница 56: ...Commissioning 7 5 Service with the SIWATOOL program SIWAREX WP251 56 Manual 12 2015 A5E37203357A ...
Страница 162: ...Scale parameters and functions 8 38 DR 48 date and time 2 for Modbus SIWAREX WP251 162 Manual 12 2015 A5E37203357A ...
Страница 212: ...Technical specifications 13 3 Approvals SIWAREX WP251 212 Manual 12 2015 A5E37203357A ...
Страница 218: ...List of abbreviations B 1 List of abbreviations SIWAREX WP251 218 Manual 12 2015 A5E37203357A ...