Simatic CP 341 First Steps: Getting Started Guide
Simatic CP 341 First Steps: Getting Started Guide
First Steps
This Guide uses a real-life example to take you through the four steps for setting up a fully functional application that will enable you to transfer data via the serial interface and to familiarize yourself with and test the basic hardware and software features of your CP 341. The cross-references tell you where to find more detailed information on specific topics in the operating manual. It will take you between one and two hours to work your way through the example, depending on your prior experience.
Preconditions
These are the preconditions for this example: S You have an S7-300 station, consisting of power supply module and CPU. S STEP 7 (wV5.0) is correctly installed on your programming device. S You have configured a project for the S7-300 station. S The programming device is connected to the CPU. S You have a CP 341 module complete with the appropriate configuration package and connecting cable. S You have prepared your connection partner for serial data transfer. If you are using a CP 341 with RS232/V.24 interface, your programming device running the Hyper Terminal program can function as the connection partner. You will find Hyper Terminal in Windows under StartPrograms Accessories Hyper Terminal. The procedure for starting the program is described below.
Test: Apply line voltage to the power supply module. When the initialization phase completes, the SF LED on the CP 341 is on.
-2
In your project, double-click FC22 to open it and in the first line of Network 1, change the module address LADDR from 272 to 256. Save the blocks by selecting File Save. No other changes have to be made to the FCs, so select File Exit. In SIMATIC Manager, select SIMATIC 300 Station CPU3xx S7 Program Blocks. Load all the S7 blocks to your CPU (CPU in STOP mode) with PLC Load. Switch the CPU to RUN. The CP 341 starts to send data cyclically via the serial interface (the TxD LED flashes). Data you send from your communication partner are received by the CP 341 in DB 43. The destination is entered in the DB_NO and DBB_NO parameters of FB7 (P_RCV_RK) in FC22.
-3
Test: Double-click VAT1 in the Blocks directory in your project to observe data transfer: Go online by selecting PLC Set up connection to configured CPU. Go to observe mode by selecting Variable Monitor.
The DB42.DBW0 operand (send counter) indicates the number of transfers. The counterpart counter for incoming data is DB41.DBW18 (receive counter). If you use your programming device as connection partner, you can receive data and send data to the CP 341 using the Hyper Terminal program. Double-click the file called Getting.ht (in \Siemens\STEP7\s7fptp\Terminal\....) to start Hyper Terminal with the appropriate settings. The data sent by the CP 341 are displayed. Press a key on your keyboard to send the corresponding character to the CP 341.
Diagnosis
Operator mistakes, incorrect wiring of the serial interface or parameterization conflicts can cause errors. Possible errors and the diagnosis messages are described in Section 8 of the operating manual.
Siemens AG Bereich Automatisierungs- und Antriebstechnik Geschaeftsgebiet Industrie-Automatisierungssysteme Postfach 4848, D-90327 Nuernberg
E Siemens AG 1999 Technical data subject to change C79000-Z7076-C341 Printed in the Fed. Rep. of Germany
Siemens Aktiengesellschaft
-4