PROGRAMMING IN SIMATIC STEP 7
8.3 SIWAREX FTC in the Cyclic STEP 7 – Program
SIWAREX FTC communicates with the SIMATIC CPU with the function block FB
SIWA_ FTC. While programming the call, an instance data block is created for the
FB SIWA_FTC. Besides the instance data block, a scale DB is required for every
SIWAREX FTC scale, in which the scale parameters are stored. The UDT that
comes with it can also be used for creating the scale DB.
The vector DB must also be loaded in the SIMATIC CPU. A vector DB can be
used by several SIWAREX FTC modules.
Function block FB SIWA_FTC and the data block are found on the CD for the
configuration package SIWAREX FTC for SIMATIC S7 in Getting started software.
CALL "SIWA_FTC" , DB 15 (
ADDR := 256,
DB_SCALE := 15,
DB_VECTOR := 14,
CMD_IN := "DB_SCALE".i_CMD_INPUT,
SIM_VAL := "DB_SCALE".r_SIM_VALUE,
ANA_OUT := "DB_SCALE".r_ANALOG_OUT_VALUE,
DO_FORCE := "DB_SCALE".b_DIG_OUTPUT_FORCE,
TRANSITION := “DB_SCALE”.b_Reserve
CMD_INPR := "DB_SCALE".bo_CMD_IN_PROGRESS,
CMD_FOK := "DB_SCALE".bo_CMD_FINISHED_OK,
CMD_ERR := "DB_SCALE".bo_CMD_ERR,
CMD_ERR_C := "DB_SCALE".b_CMD_ERR_CODE,
REF_COUNT := "DB_SCALE".b_INFO_REFRESH_COUNT,
PROC_VAL1 := "DB_SCALE".r_PROCESS_VALUE1,
PROC_VAL2 := "DB_SCALE".dw_PROCESS_VALUE2,
SC_STATUS := "DB_SCALE".dw_SCALE_STATUS,
ERR_MSG := "DB_SCALE".bo_ERR_MSG,
ERR_MSG_TYPE := "DB_SCALE".b_ERR_MSG_TYPE,
ERR_MSG_C := "DB_SCALE".b_ERR_MSG_CODE,
FB_ERR := "DB_SCALE".bo_FB_ERR,
FB_ERR_C := "DB_SCALE".b_FB_ERR_CODE,
START_UP := "DB_SCALE".bo_START_UP_IN_PROGRESS,
CMD_EN := "DB_SCALE".bo_CMD_ENABLE,
ERR_MSG_Q := "DB_SCALE".bo_ERR_MSG_QUIT);
Figure 8-1 Call parameters for FB SIWA_FTC
8.4 Call parameters for FB SIWA_FTC
The call parameters of the FB SIWA_FTC are described in the following section.
As supplied, the call parameters are defined as variables in the scale DB. It is
possible to define the call parameters with other variables of the same type.
While calling the FB SIWA_FTC, the number of the instance DB to be generated
must be defined.
8.4.1 ADDR:= 256, Input, INT
SIWAREX FTC req
uires 16 bytes in the input and output range of the
SIMATIC CPU for operation. The ADDR parameter must correspond wit the
definition in the HW configuration.
SIWAREX FTC
8-113