Siemens S7-300 Operating Instructions Manual page 158

Fm 352 electronic cam controller
Hide thumbs Also See for S7-300:
Table of Contents

Advertisement

Examples
13.9 Sample program 3 "One Module"
Operation
The CPU is in STOP.
1. Open variable table VAT1, then transfer the control values.
2. Restart the CPU (STOP > RUN). You can see how the actual position (CAM.ACT_POS),
3. Once again, transfer the prepared control values from the VAT (this time,
The step sequence is completed after this cycle, the step number = -2, and simulation is
stopped.
If you want to repeat the entire sequence again, restart the CPU (STOP > RUN). (This
procedure is, of course, only acceptable in the sample program.)
If you have not activated the PROGDB.SWITCH switch before a CPU STOP, the cam
parameters in the parameter DB will not be reset to their original values. In this case, once
again download the parameter DB to the CPU.
Error evaluation
Any processing error will stop the step sequence and disable simulation mode. Step number
-1 will be entered.
Try to generate cam errors the central error evaluation will save to the PROGDB.CAM_ERR
bit as group error.
● Set cam positions in VAT1 which are greater than the end of rotary axis.
● Define negative cam positions in VAT1.
User program (FB PROG)
The user program accesses data in the module-specific data blocks using the
<blockname>.<symbolic name> syntax. The user program can thus operate exactly one
module.
With this type of programming, you can access DB data using symbolic names. Indirect
addressing of several modules is part of sample program 5 "MultiModules".
The user program executes a step sequence as follows:
Step 0: Initialization of the cam controller. Sets the jobs and corresponding data to be
executed at a restart of the module. The restart of the module may be triggered by a CPU
restart, or by the return of a rack, for example.
Step 1: The program waits for the set jobs to be executed.
Step 2: The program continuously reads the cam identifier bits and waits until cam 4 is set.
158
the cam data (CAM.CAM_00_31) and the track signals (CAM.TRACK_OUT) change. You
should also observe the step number of the step sequence (PROGDB.STEPNO).
When cam 4 is set (130 degrees), cams 0 and 1 are reassigned to the values you
specified in VAT 1. You can view the change in the VAT.
Next, the program waits for an external event.
PROGDB.SWITCH is evaluated). The previous values will be restored in the cam data.
FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents