EasyManua.ls Logo

Siemens FM 450-1 - Page 40

Siemens FM 450-1
118 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Requirement
You have created a DB under STEP 7 as a data block with assigned user-speci󹪝c data type.
For this purpose select the UDT 1 as the source. The UDT 1 was copied into the block library
for the counter (FM_CNT) when the FCs were installed. You must not modify the UDT 1. Copy
the UDT 1 into your project together with the FCs.
The following valid data must be assigned to the DB required for the FC CNT_CTRL:
Module address
Set the module address (basic address of the FM 450-1) when you con󹪝gure your
hardware.
The module address must be entered in the MOD_ADR parameter in the DB.
To enter the module address, the following methods can be used:
Recommended procedure
Make the assignment of the module address to the DB in the user program so that the
assignment of the module address occurs when user program is called in OB 100 (see
example below).
Alternative procedure
You can have the module address entered automatically when you select the module in
HW Con󹪝g, open the "Properties" dialog box with the menu command Edit > Object
Properties, and select the DB using the "Mod Addr" button there. However, in this case,
the values entered in the DB (including the module addresses) will be reset to their initial
values when a consistency check (menu command Edit > Check Block Consistency
opens the "Check Block Consistency" dialog box) is performed followed by compilation
(menu command Program > Compile All in the "Check Block Consistency" dialog box).
If a consistency check is performed without compilation, the values are not changed.
The menu command Edit > Compile All is only required within a consistency check when
the project has been edited with STEP 7 V5.0 Service Pack 2 or earlier.
Channel address
The channel address of count channel 1 is the same as the module address in pointer
format. The channel address of count channel 2 is the same as the module address + 32
in pointer format.
User data length
The user data length is 32.
Example
The following contains an example of how you can implement the transfer of the module
address, the channel address, and the length of the user data to the DB in OB 100. The symbol
table contains the following assignments for this example:
FM450_DB_K1 DB 10 DB with the counter data for channel 1
FM450_DB_K2 DB 11 DB with the counter data for channel 2
You program the transfer in STL as follows:
STL
Channel 1
L 512 // Module address = 512
T FM450_DB_K1.MOD_ADR // Transfer of module address
L P# 512.0 // Module address in pointer format
Program
6.2 The FC CNT_CTRL function
Counter module FM 450-1
40 Equipment Manual, 03/2022, A5E03648739-AC

Table of Contents

Related product manuals