get3502_e(2).pdf
(
45 KB
)
Pobierz
This guide uses a specific example to introduce you to starting up your FM 350-2 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-2. The
references to the manual are intended to give you an initial overview of the information in the manual.
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 (
V3.2) must be installed correctly on your programming device.
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-2 module, the configuration package for the FM 350-2, and the
necessary accessories such as an expansion bus, front connector, encoders or switches, and
wiring material.
Installing the Configuration Package on the Programming Device
The configuration package contains a configuration tool with the parameter assignment dialog boxes
for the FM 350-2, the functions (FC) and the data structure (UDT) required, and a sample program.
Make a copy of each original diskette.
Install the software from this copy by starting the installation program SETUP.EXE on diskette 1.
Follow the instructions in the installation program.
Installing and Wiring the FM 350-2
Plug the expansion bus supplied with the FM 350-2 into the bus connector on the CPU. Hang the
FM 350-2 into the rail, swing it downwards, and screw it in place (you will find more detailed
instructions in Section 3.2 of the manual).
Wire up the front connector as follows (you will find the full pin assignment of the front connector in
Chapter 4 of the manual):
Power supply
module
CPU
FM 350-2
Front connect
or
L+
M
21
22
L+
M
M
2
3
L+
M
L+
M
Count contact
Gate contact
11
Insert the front connector in the FM 350-2 and snap it into place.
Test:
Switch on the voltage on the power supply module.
The red LED SF lights up briefly and extinguishes after the internal module test has been run
successfully.
Once you have switched on the power supply for the first time, the FM 350-2 has the default
parameters assigned (the features of the default parameter assignment are described in
Section 5.2 of the manual).
Creating a Counter Data Block
Open the library fm_cntli in the SIMATIC-Manager with the menu command
File
Open
.
Copy the data structure UDT1 from the <AP–off> containter of the library fm_cntli to the “Blocks”
container (previously <AP–off>) in your project.
Insert DB1 in the “Blocks” container with the menu command
Insert
"
"
S7 Block
"
Data Block
.
Open DB1 and create DB1 with associated user-defined data type UDT1.
Select
View
Data View
and enter the value TRUE in the “Actual Value” column of the parameter
CONTROL_SIGNALS.SW_GATE0.
Save DB1 with
File
"
"
Save
.
Assigning Parameters to the FM 350-2
Open your project in the SIMATIC Manager.
Open the configuration table (Configuring Hardware application) in your project.
From the hardware catalog select the FM 350-2 with the correct order number and drag it to the
required slot.
Double-click this FM 350 to open the “FM 350-2 Counter” window.
Change to the “Addresses” tab but retain all settings in this tabbed page.
Change to the “Basic Parameters” tab. If you are prompted in a dialog box for a channel DB/counter
DB, select DB1 using
Select Data Block
.
Fill out the “Basic Parameters”:
Generate Interrupt:
No
Select Interrupt:
None
Reaction to CPU STOP: Cancel
Click the
Parameters...
button and select the following settings in the parameter assignment dialog
boxes by clicking the buttons (the settings not mentioned are not relevant for the test):
Specify Channels: Channel 0 to 7 as Single Counter
The following settings apply to channel 0.
Operating Modes:
Continuous Counting
Hardware Gate
Encoders:
Pulses and Direction
Main Count Direction Up
Interrupt Enable:
not possible as deselected in basic parameters
Outputs: Output Inactive
Enter the FM 350-2 parameter assignments in your configuration using the menu command
File
"
Save
and close the parameter assignment window.
Close the “ FM 350-2 Counter” window by clicking the
OK
button.
Save the new configuration in your project using the menu command
Station
Save
.
Download the configuration to 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-2. 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-2 every time the CPU switches from STOP to RUN.
Test:
You can now run simple tests without a program:
Open the commissioning dialog box with the menu command
Debug > Commissioning
.
Here you can open and close the software gate with the SW_GATE button. If you generate
count pulses with the switch connected to the module when the software gate is open, you can
observe the change in the count reading in this dialog box.
Note that a mechanical count contact can bounce.
Integrating into the User Program
Open the library fm_cntli in the SIMATIC Manager using the menu command
File
Open
.
Copy the function FC2 from the <AP–off> container of the library fm_cntli to the “Blocks” container of
your project (previously <AP–off>).
Open OB1 in your project.
In OB1 call FC2 and pass parameters to FC2 (see manual, Section 6.4).
"
CALL FC 2
DB_NO := DB1
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
"
Variable Table
and confirm with
OK
.
Open the variable table VAT1 and enter the following variables in the “Address” column:
db1.dbd44
(actual count value)
db1.dbx43.0
(status of internal gate)
Save the variable table VAT1 using the menu command
Table
"
S7 Block
"
"
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-2 displays with the group error LED SF.
Refer to Sections 6.3 and Chapter 11 of the manual for information on how you can diagnose errors
and messages.
Example
In the fm_cntex project you will find another example which you can use to guide you and which you
can adapt to your application.
"&'+
*"! -,(&,"+"*-' +0 -' ',*"+,!'"$
+!,+ ",'-+,*"0-,(&,"+"*-' ++/+,&
(+,! 0-*'*
"&'+
-#, ,( !' .",!(-, )*"(* '(,"
00
*"', "' ,! ) ( *&'/
"&'+ $,"' +%%+!,
Plik z chomika:
masterkom
Inne pliki z tego folderu:
ET200iS_e.pdf
(22821 KB)
DOC_AS_PL_S7300_HW_moduly.pdf
(7881 KB)
DPPA_E.PDF
(4575 KB)
dyn_funktion_e.pdf
(4571 KB)
Cpu210_e.pdf
(1429 KB)
Inne foldery tego chomika:
Autoryzacja
Kable
Logo
OP Panels
S5
Zgłoś jeśli
naruszono regulamin