EasyManua.ls Logo

Siemens S7-300 - Sample Program 1 Getting Started

Siemens S7-300
226 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...
Examples
13.7 Sample program 1 "Getting Started"
FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03
155
13.7 Sample program 1 "Getting Started"
Objective
In this example, you commission your cam controller after you have assigned its parameters
in the parameter assignment interface according to the "Getting Started" manual.
The example extends the program shown in the "Integration in the User Program" chapter of
the getting started by adding error evaluation.
Requirements
You have assigned the cam controller parameters as described in the "Getting Started"
Manual.
Startup
Enter the address of your module in channel DB at the MOD_ADDR address.
In the startup OB (OB 100), call FC CAM_INIT to reset all control and checkback signals as
well as job management in the channel DB.
Cyclic operation
1. Open the variable table.
2. Go online to the configured CPU to monitor the variables.
3. Transfer the prepared control values.
The module changes to simulation mode. You can see how the actual value
CAM.ACT_POS and track signals CAM.TRACK_OUT change dynamically.
4. Now change the simulation direction, specify different reference point coordinates, then
disable simulation etc. by modifying and transferring the control values.
Error evaluation
Generate a data error by entering a reference point coordinate greater than the end of rotary
axis (for example, 10000000). The CPU goes into STOP. In an example, this is the simplest
method of indicating an error. You can, of course, program a more sophisticated method.
Open the hardware configuration and double-click the FM 352. This opens the parameter
assignment interface. Select Test > Error evaluation to view the cause of the error.
To clear the error:
1. Enter a valid control value.
2. Switch the CPU to STOP.
3. Switch the CPU to RUN mode.
4. Enable the control values. If you enable the control values before restarting the CPU,
they are canceled by the initialization routine in OB100, and thus have no effect.

Table of Contents

Other manuals for Siemens S7-300

Related product manuals