Simatic FM 351: First Steps in Commissioning
Simatic FM 351: First Steps in Commissioning
Simatic FM 351: First Steps in Commissioning
FM 351
Getting Started Edition 02/2000
Requirements
The following requirements must be met:
You have an S7-300 station consisting of a power supply and a CPU.
You have installed STEP 7 (≥V4.02) correctly on your programming device. Please note, however, that
the instructions below relate to STEP 7 (V5.0).
You have created a project for the S7-300 station.
The programming device is connected to the CPU.
You have an FM 351 module, the configuration package belonging to the FM 351, an external 24 V DC
power supply, an encoder, a drive, and the required accessories such as bus interconnectors, front
connectors, and wiring.
To protect both your equipment and personnel, you have provided hardware limit switches and an
EMERGENCY STOP switch.
K4 K3 K2 K1
L+ M
Ext. 24 V
DC power
M supply
K3 K4 K1 K2
Plug in the wired-up front connector on the FM 351 and push it in securely.
Connect your encoder to the “ENCODER CH1” sub-D connector: Whenever possible, use a
preassembled connecting cable (refer to Appendix B of the manual; the complete pinout of the sub-D
connector is described in Section 4.1 of the manual).
Enter the parameter settings for the FM 351 with File > Save in your configuration and close the
configuration software with File > Exit.
Save the configuration you have created with Station > Save and Compile in your project.
Transfer the configuration with the CPU in the STOP mode with PLC > Download....
The data are then transferred directly to the CPU and the FM 351. From now on, as long as the
configuration on the CPU remains battery backed, the data will always be transferred from the CPU to the
FM 351 whenever the CPU changes from STOP to RUN.
Test the FM 351
Double-click the FM 351 again in HW config to open the window “Positioning Module –
[FM 351 FIX. SPEED (slot) (parameter assignment) –– project name\station name]”.
Select Test > Commissioning to open the commissioning dialog [FM 351 FIX. SPEED (slot)
(Commissioning) –– project name\station name]”.
For “Operating mode” select the “Jogging” setting and enter the required speed (rapid or creep).
Click the “On” button for “Drive Enable”. As a reaction to this setting, the “Start enable” indicator in the
commissioning dialog is displayed in green. If you have not wired the enable input on the FM 351, activate
the option “Do not evaluate enable input” under the “Function Switches” of the “Further Test Functions”
and click the “Apply” button.
Click the DIR_M or DIR_P button: The drive moves as long as you hold down the mouse button. You can
now monitor the actual value and the actual speed.
Note: The actual value changes according to the direction selected: DIR_M (move in a minus direction)
or DIR_P (move in a plus direction). If the count direction is incorrect, open the “Encoder” window in the
“Change Parameters for” group box and change the count direction from “normal” to “inverted”. You can
download the changed setting to the CPU and the FM 351 with PLC > Channel Download > 1. The
displayed actual speed for the rapid speed and creep speed indicates whether or not the digital outputs of
the FM 351 are correctly wired up.
If errors occur during the test, these are indicated by the “Error” display. You can acknowledge these
errors with Test > Error Evaluation and then continue with the test.
To allow correct positioning, you must now adapt the switchover differences and switch-off differences to
your system.
Select the “Incremental Approach Absolute” setting for the “Operating Mode” and enter the number 255
as the “Incremental Dimension Number”. The boxes “Incremental Dimension”, “Switchover Difference”
and “Switch-Off Difference” are displayed. In the “Incremental Dimension” box, enter a positive value for
the location at which you want to position. In the switchover difference and switch-off difference boxes,
enter the values set as defaults in the drive dialog. Make sure that the incremental dimension you select is
higher than the switchover and switch-off difference.
In “Further Test Functions” select the “Set Reference Point” setting, enter 0.000 mm as the reference
point and click the “Apply” button. The axis is then synchronized. The message “Channel Synchronized” is
displayed.
Select “Further Test Functions > Function Switches > Do Not Evaluate Enable Input” and click the “Apply”
button.
Activate the drive enable. The message “Start Enable” is displayed. When you click the “Start” button, the
axis starts to move to the specified incremental dimension. The “remaining distance” and “position
reached - hold” LEDs indicate the accuracy of the positioning.
By reducing or increasing the switchover and switch-off difference, you can improve the accuracy of the
positioning. You can also obtain the “position reached - hold” signal by increasing the target range.
Change the parameters until you obtain the “position reached - hold” signal and the actual value of the
positioning is close enough to the incremental dimension. Note down the current settings for the positive
switchover and switch-off difference.
To obtain the negative switchover and switch-off difference, select a negative incremental dimension.
Select “Change Parameters For > Drive” to open the window with the drive parameters and enter the
values you obtained by trial and error for the appropriate parameters.
Enter the settings with File > Save and close the configuration software with File > Exit.
Save the configuration you have created with Station > Save and Compile in your project.
Transfer the configuration with the CPU in the STOP mode with PLC > Download.
Linking into your User Program
Open the FMx51LIB in the library in the SIMATIC Manager with File > Open... > Libraries.
Copy FC0, FC1 and UDT1 from the blocks folder of the FMx51LIB library to the “Blocks” folder of your
project.
Select the menu command Insert > S7 Block > Data Block and insert DB1 in the “Blocks” folder of your
project and then select the menu command Insert > S7 Block > Organization Block and insert OB100.
Open DB1 and create it with the assigned user-defined data type UDT1. This creates the channel DB.
Select View→ Data View and enter the decimal module address in the “Actual Value” column of the
MOD_ADDR parameter and the channel number 1 for the CH_NO parameter in DB1.
Save DB1 with File > Save and close the DB editor with File > Exit.
Now open OB100 and OB1 in your project. Call FC0 in OB100 and FC1 in OB1 and supply the FCs with
parameters (refer to the manual, Section 6.2 or 6.3):
OB100:
CALL FC0
DB_NO := 1
OB1:
CALL FC1
DB_NO := 1
RET_VAL := FW0
Test: Using “Monitor/modify variables” you can now monitor the selected channel as follows:
Create a symbol with the name “ABS” for DB 1 using the symbol editor.
Select the “Blocks” folder in your project. Using the menu command Insert > S7 Block > Variable
Table insert the variable table VAT 1 and confirm with OK.
Open the variable table VAT1 and make the following entries in the “Symbol”, “Monitor Format” and
“Modify Value” columns:
Caution
! With the next two steps in the test you start the drive.
You can stop the drive again in one of the following ways:
Set the control value for the direction to 0 again and activate it
Set the control value for the drive enable to 0 again and activate it
Change the CPU to the STOP mode
Diagnostics
Errors can occur due to incorrect operator input, incorrect wiring, or conflicting parameter settings.
How to analyze such errors and messages is described in Section 6.4 and Chapter 11 of the manual.
Example
The project zEn18_01_FMx51 contains further samples that you can use as a basis and adapt to your
application.
Siemens AG
Bereich Automatisierungs- und Antriebstechnik
Geschaeftsgebiet Industrie-Automatisierungssysteme Siemens AG 2000
Postfach 4848, D-90327 Nuernberg Subject to change
C79000-Z7076-C354
Siemens Aktiengesellschaft Printed in the Fed. Rep. of Germany