FM 350-1 - Getting Started

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SIMATIC

FM 350-1
First Steps in Commissioning
Getting Started Edition 11/2002
2
Getting Started FM 350-1
A5E00073045-02
This guide uses a specific example to introduce you to starting up your FM 350-1 module. It uses four
steps to lead to a functioning application in which you count the switching operations of a contact and
become familiar with and test the basic functions of the hardware and software of your FM 350-1. The
references to the manual are intended to give you an initial overview of the information in the manual.
The references refer to the FM 350-1 Function Module manual with the number A5E00073040-02.
The time required to work through the example will be approximately 1 to 2 hours, depending on how
experienced you are.
Requirements
The following requirements must be fulfilled:
You must have an S7-300 station comprising a power supply module and a CPU.
STEP 7 (V5.0) is correctly installed on your programming device (the example given in this
Getting Started was carried out with STEP 7 V5.2).
You have set up a project for the S7-300 station.
The programming device must be connected to the CPU.
You must have an FM 350-1 module, the configuration package for the FM 350-1, and the
necessary accessories such as a bus connector, front connector, sensors or switches, and wiring
material.
Installing the Configuration Package on the Programming Device
(Manual Chapter 4)
The configuration package contains a configuration tool for the FM 350-1, the functions (FC) and the
data structure (UDT) required, and a sample program.
Insert the CD in the CD drive.
Under Windows start the dialog for installing software by double-clicking the Add/Remove Programs
symbol in Control Panel.
Click Install... , start the Setup.exe file on the CD in the FMx50-1\Disk1 folder and follow the
instructions of the installation program.
Installing and Wiring the FM 350-1 (Manual Chapter 2 and 3)
To connect the 24-V sensor used in the example you must insert the coding key on the module in
position D before you insert the FM 350-1. This sets the adjustment to the sensor level (you will find
more information on the coding key in Sections 1.3 and 2.2 of the manual).
Plug the bus connector supplied with the FM 350-1 into the bus connector on the CPU. Hang the
FM 350-1 into the rail, swing it downwards, and screw it in place (you will find more detailed
instructions in Section 2.2 of the manual).
Wire up the front connector as follows (you will find the full pin assignment of the front connector in
Chapter 3 of the manual).
1
2
5
6
3
0
1
2
FM 350-1
Front connector
M
CPU Power supply module
L+
M
L+
M
L+
M
Count contact
Gate contact
L+
M
Insert the front connector in the FM 350-1 and snap it into place.
Test: Switch on the voltage on the power supply module. The red LED SF lights up. After you have
switched on the power supply module for the first time, the FM 350-1 is in the preset default
state (refer to Section 3.3 of the manual for default settings).
3
Getting Started FM 350-1
A5E00073045-02
Assigning Parameters to the FM 350-1
Open your project in the SIMATIC Manager.
Open the configuration table (HW Config) in your project.
From the hardware catalog select the FM 350-1 with the correct order number and drag it to the
required slot (in the example: slot 4).
Select the following setting in the FM 350-1 object properties in the Basic Parameters tab:
Reaction to CPU stop: STOP
Call the parameter assignment screen forms by double-clicking on this FM 350-1. To do this, you may
have to close the dialog asking you to save the configuration with OK.
Select the following settings by clicking on the buttons in the parameter assignment screen forms
(please leave all other settings unchanged, as they are not yet required for commissioning):
Operating Modes: Continuous Counting, Hardware Gate, 0 to +32 Bit
Encoders: 24V Initiator, P Switch
Inputs: Level-Controlled Hardware Gate
Process interrupt enable: not possible as deselected in basic parameters
Outputs: DO0 Inactive, DO1 Inactive
Enter the FM 350-1 parameter assignments in your configuration using the menu command File >
Save and close the parameter assignment window.
Save the configuration created by you in your project using Station > Save and Compile.
Download the configuration with the CPU in STOP mode using the menu command PLC >
Download To Module.
The data are now downloaded directly to the CPU and into the FM 350-1. The red LED SF
extinguishes. From now on, as long as the configuration remains buffered in the CPU, the data will be
transferred from the CPU to the FM 350-1 every time the CPU switches from STOP to RUN.
Test: You can now run simple tests without a program:
Close the gate contact: the green LED I0 lights up.
Close and open the count contact several times: you can monitor the state of the least
significant bit of the FM 350-1 counter via the green LED CR.
Note that a mechanical count contact can bounce.
When you open the gate contact, the gate LED I0 extinguishes and no more switching
operations are counted (the timing diagram for this function can be found in Section 8.3.7 of the
manual).
Integrating into the User Program
Open the library FMx50LIB in the SIMATIC Manager using the menu command File >
Open...Libraries.
Copy the functions FC 2 and FC 1 and the user-defined data type UDT 1 from the Blocks container
of the FMx50LIB library to the Blocks container of your project.
Insert DB 1 as DB with data type UDT 1 into the Blocks container using the menu command Insert >
S7 Block > Data Block.
Open the popup menu in HW Config by clicking with the right mouse button on the FM 350-1 entry.
Using the Object Properties menu command start the Properties FM350-1 COUNTER screen form.
Using the Mod Addr... button you can now automatically enter the module address (MOD_ADR) (in
the example: 256 corresponds to 100 Hex), the channel address (CH-ADR) and the channel length
set under Addresses in the channel data block.
4
Getting Started FM 350-1
A5E00073045-02
You can achieve this by clicking the Select DB button in the Module Address for DB screen form. Click
and select the DB 1 in the Open dialog which was started . By clicking OK the values are stored in
DB 1 and the Open and Module address for DB screen forms are automatically closed. Exit the
Properties FM350-1 COUNTER screen form with OK.
Alternatively you can also supply these parameters to DB 1 in OB100 (see manual, Section 5.1).
Open OB 1 in your project.
Call FC 2 (FC CNT_CNTL1) in OB 1 and supply parameters to FC 2 (see manual, Section 5.1):
CALL FC 2
DB_NO := 1
:
:
Assign all remaining parameters of FC 2 with free memory bits.
Save OB1 using the menu command File > Save.
Select all the blocks in your project (apart from VAT and UDT).
Download your program to the CPU using the menu command PLC > Download.
Test: Using the Monitoring and Modifying Variables application you can now monitor the count value
and the gate, for example:
In your project select the Blocks container. Insert the variable table VAT1 using the menu
command Insert > S7 Block > Variable Table and confirm with OK.
Open the variable table VAT1 and enter the following variables in the Address column:
db1.dbd34 (actual count value)
db1.dbx43.6 (status of internal gate)
Save the variable table VAT1 using the menu command Table> Save.
Switch online using the menu command PLC > Connect To > Configured CPU.
Switch to monitoring using the menu command Variable > Monitor.
Switch the CPU to RUN-P.
Generate pulses with the count contact and monitor the count value with relation to the state of
your gate contact.
Diagnostics
Errors can occur as a result of incorrect operation, incorrect wiring, or contradictory parameter
assignments which the FM 350-1 displays with the group error LED SF.
Refer to Section 5.3 and Chapter 12 of the manual for information on how you can diagnose errors
and messages.
Example
In the zEn23_01_FMx50-1 project you will find another example which you can use to guide you and
which you can adapt to your application.
Siemens Aktiengesellschaft
nderungen vorbehalten
E Siemens AG 2000 2002
A5E0007304502
Printed in the Fed. Rep. of Germany
Siemens AG
Bereich Automation and Drives
Geschftsgebiet Industrial Automation Systems
Postfach 4848, D90327 Nrnberg

You might also like