Programming the FM 352
7.1 Basics of Programming an FM 352
FM 352 electronic cam controller
40 Operating Instructions, 05/2011, A5E01071724-03
7.1 Basics of Programming an FM 352
Task
You can assign parameters, control, and commission the FM 352 module via a user
program. To exchange data between the user program and module, you use the functions
(FCs) and data blocks (DBs) described below.
Preparation
● Open the block library FM352LIB in SIMATIC Manager, then copy the required functions
(FCs), function blocks (FBs), and block templates (UDTs) to the block container of your
project. If the block numbers are already being used, assign new numbers. The block
names are entered unchanged in the symbol table of your S7 program.
– CAM_INIT (FC 0):
You need this FC to initialize the channel DB following a module startup.
– CAM_CTRL (FB 1):
You need this FB for data exchange with the module. The instance DB for this block is
called "channel DB".
– CAM_DIAG (FB 2):
You need this FB when you process detailed diagnostic information in the program or
want to make this information available to an operator control and monitoring system.
The instance DB for this block is referred to as a "diagnostic DB".
– CAM_P016TYPE (UDT3):
You need this UDT to generate a parameter DB with machine data and data for 16
cams. The parameter DB is used by the FB CAM_CTRL to write or read machine or
cam data.
– CAM_P032TYPE (UDT4):
Same as CAM_P016TYPE, however for 32 cams
– CAM_P064TYPE (UDT5):
Same as CAM_P016TYPE, however for 64 cams
– CAM_P128TYPE (UDT6):
Same as CAM_P016TYPE, however for 128 cams
● Create data blocks using the UDTs in the block folder of your S7 program. If you are
using multiple modules, you require a separate set of data blocks for each module used.