Examples
13.8 Sample Program 2 "Commissioning"
FM 352 electronic cam controller
156 Operating Instructions, 05/2011, A5E01071724-03
13.8 Sample Program 2 "Commissioning"
Objective
In this sample, you commission a cam controller without using the programming interface.
You control and monitor the system using the variable tables (VATs).
Requirements
You have assigned the cam controller parameters as described in the "Getting Started"
Manual.
The module address is entered in the MOD_ADDR block parameter in the channel and
diagnostic DBs.
The included channel DB already contains the DB number (3) of the parameter DB in the
PARADBNO parameter.
PARADB included in this example contains default machine and cam data.
Startup
In the startup OB (OB100), call FC CAM_INIT to initialize the channel DB. Next, set the
trigger bits for all jobs and control signals you require when the module has completed its
startup.
Cyclic operation
Open the variable tables VAT1 and VAT2, then go online to the configured CPU to monitor
the variables.
At VAT1, you can view the changes in the actual position and the track signals. The module
is in operation.
In VAT2, you can see the most important entries of the diagnostic buffer of the module. For
information on error classes and numbers, refer to the appendix "Error classes (Page 190)".
Edit the machine and cam data at DB PARADB, download the
DB to the CPU, and then
enable the control values in VAT1. This writes the new data to the module, and enables
these. Faulty data are indicated in VAT2. For information on machine and cam data, refer to
the chapter "Machine and cam data (Page 67)".
Error evaluation
Try to generate further errors:
● Define a reference point coordinate which is greater than the end of the rotary axis.
● Switch off the external power supply.
● Delete PARADB from the CPU (online), and then attempt to write machine data. The
error evaluation is intentionally programmed here so that the CPU goes to STOP mode. If
you update VAT1 once again, the error code for this error is indicated in CAM.JOB_ERR.