Post on 29-Dec-2014
Embed Size (px)
INDUSTRIAL AUTOMATION TRAINING
SIEMENS S7-300 PROGRAMMING IN STATEMENT LIST
CONTENTS:1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.
PAGE NO 3 7 9 12 13 14 16 23 27 29 38 45 48 49 51 54 56 58 71 73 75 86
STEP7 OVERVIEW COMPARISON OF CPU's AND MODULES AVAILABLE ADDRESSING OF MODULES LOAD MEMORY AND WORK MEMORY BLOCKS IN THE USER PROGRAM DATA TYPES STATEMENT LIST PROGRAMMING BIT LOGIC INSTRUCTIONS COMPARISON INSTRUCTIONS CONVERSION INSTRUCTIONS COUNTER INSTRUCTIONS DATA BLOCK AND LOGIC CONTROL INSTRUCTIONS LOAD AND TRANSFER INSTRUCTIONS FLOATING POINT MATH INSTRUCTIONS INTEGER MATH INSTRUCTIONS PROGRAM CONTROL INSTRUCTIONS SHIFT INSTRUCTIONS TIMER INSTRUCTIONS WORD LOGIC INSTRUCTIONS ACCUMULATOR INSTRUCTIONS PROGRAMMING EXAMPLES GLOSSARY
SIMATIC S7PLCS7-400 S7-300 S7-200 SIMATIC S7-300 COMPONENTS
RANGEHIGH END RANGE/MEDIUM RANGE MID AND LOW END PERFORMANCE RANGE MICRO PLC'S
S.No. 1. 2. Rail
FUNCTION Accomodates the S7-300 modules Converts the power system voltage (120/230VAC) into 24VDC for the S7-300 and load power supply for 24 VDC load circuits. Executes the user program, provides the 5V supply For the S7-300 backplane bus, communicates with other CPU's or with a programming device via the MPI(Multi Point Interface). Match different process signal levels to the internal signal level of S7-300 For time critical and memory intensive process signal processing tasks eg. Closed loop control Relieves the CPU of communication tasks eg-CP 342-5 DP for connection to SINEC L2-DP. Interconnects the individual tiers of an S7-300 Interconnects CPUs and PCs Connects a CPU to a programming device Interfaces the S7-300 over large distances to other S7300s or programming devices
Power Supply (PS)
4. 5. 6. 7. 8. 9. 10.
Signal Modules(SM)DI,DO,AI,AO Function Modules (FMs) Communication Processor (CP) Interface Module(IM) Sinec L2 cable with LAN connector Programmer Cable RS 485 Repeater
Overview of STEP 7What is STEP 7? STEP 7 is the standard software package used for configuring and programming SIMATIC programmable logic controllers. It is part of the SIMATIC industry software. Basic Tasks When you create an automation solution with STEP 7, there are a series of basic tasks. The following figure shows the tasks that need to be performed for most projects and assigns them to a basic procedure.
Alternative Procedures As shown in the figure above, you have two alternative procedures: You can configure the hardware first and then program the blocks. You can, however, program the blocks first without configuring the hardware. This is recommended for service and maintenance work, for example, to integrate programmed blocks into in an existing project. PAGE 4
Brief Description of the Individual Steps Installation and authorization The first time you use STEP 7, install it and transfer the authorization from diskette to the hard disk Plan your controller Before you work with STEP 7, plan your automation solution from dividing the process into individual tasks to creating a configuration diagram Design the program structure Turn the tasks described in the draft of your controller design into a program structure using the blocks available in STEP 7 Start STEP 7 You start STEP 7 from the Windows 95/98/NT user interface Create a project structure A project is like a folder in which all data are stored in a hierarchical structure and are available to you at any time. After you have created a project, all other tasks are executed in this project Configure a station When you configure the station you specify the programmable controller you want to use; for example, SIMATIC 300, SIMATIC 400 Configure hardware When you configure the hardware you specify in a configuration table which modules you want to use for your automation solution and which addresses are to be used to access the modules from the user program. The properties of the modules can also be assigned using Configure networks and communication connections The basis for communication is a pre-configured network. For this, you will need to create the subnets required for your automation networks, set the subnet properties, and set the network connection properties and any communication connections required for the networked stations Define symbols You can define local or shared symbols, which have more descriptive names, in a symbol table to use instead of absolute addresses in your user program Create the program Using one of the available programming languages create a program linked to a module or independent of a module and store it as blocks, source files, or charts S7 only: generate and evaluate reference data You can make use of these reference data to make debugging and modifying your user program easier Configure messages You create block-related messages, for example, with their texts and attributes. Using the transfer program you transfer the message configuration data created to the operator interface system database (for example, SIMATIC WinCC, SIMATIC ProTool) Configure operator control and monitoring variables You create operator control and monitoring variables once in STEP 7 and assign them the required attributes. Using the transfer program you transfer the operator control and monitoring variables created to the database of the operator interface system WinCC Download programs to the programmable controller S7 only: after all configuration, parameter assignment, and programming tasks are completed, you can download your entire user program or individual blocks from it to the programmable controller (programmable module for your hardware solution). Test programs S7 only: for testing you can either display the values of variables from your user program or a CPU, assign values to the variables, and create a variable table for the variables that you want to display or modify Monitor operation, diagnose hardware You determine the cause of a module fault by displaying online information about a module. You determine the causes for errors in user program processing with the help of the diagnostic buffer and the stack contents. You can also check whether a user program can run on a particular CPU Document the plant After you have created a project/plant, it makes sense to produce clear documentation of the project data to make further editing of the project and any service activities easier
COMPARISON OF CPU'SCPU's Mem Statement/Bytes Memory Cards Processing Time 1024 Statements DI & DO Max AI & AO Max Rack Configuration Expansion Modules Max Bit Memories Counters Timers MPI Interface 187.5 Kbit/s Max 32 Nodes Integrated functions+Interfaces CPU312IFM 2K/6KB 0.6 ms 256 64 1-Tier 8 1024 32 64 Yes 10DI/6DQ onboard. int. functions:Count ers/Freq. Measuremensts CPU313 4K/12KB 512KB FEPROM 0.6 ms 256 64 1-Tier 8 2048 32 64 Yes CPU314IFM 8K/24KB 0.3 ms 1024 256 4-Tier 31 2048 64 72 Yes 20DI/16DQ , 4AI,1AO onboard. int. functions:Co unters/Freq. Measuremen sts/Positionin g PID Control CPU314 16K/48KB 512KB FEPROM 0.3 ms 1024 256 4-Tier 31 2048 64 128 Yes -
CPU's Mem Statement/Bytes Memory Cards Processing Time 1024 Statements DI & DO Max AI & AO Max Rack Configuration Expansion Modules Max Bit Memories Counters Timers MPI Interface 187.5 Kbit/s Max 32 Nodes Integrated functions+Interfaces
CPU315 16K/48KB 512KB FEPROM 0.3 ms 1024 256 4-Tier 32 2048 64 128 Yes -
CPU315-2DP 16K/48KB 512KB FEPROM 0.3 ms 2048 256 4-Tier 32 2048 64 128 Yes PROFIBUSDP Master/Slave (64 DP stations,12M baud)
CPU316-2DP 42K/128KB 4MB FEPROM 0.3 ms 4096 256 4-Tier 32 2048 64 128 Yes PROFIBUSDP Master/Slave (64 DP stations,12M baud)
CPU318-2 256KB 4MB FEPROM 0.1 ms 16384 1024 4-Tier 32 8192 512 512 Upto 12Mbaud PROFIBUS-DP Master/Slave (125 DP stations,12Mb aud)
* 1 K statements correspond to approx. 3Kbytes of user memory.
THE DIFFERENT TYPES OF MODULES AVAILABLE ARE1. SIGNAL MODULES - FOR DIGITAL AND ANALOG SIGNALS DIGITAL INPUTS 16 X 24 VDC 8 X 120 / 230 VAC 16 X 120 V AC 32 X 24 V DC DIGITAL OUTPUTS 16 x 24 VDC ,0.5A 8 X 24 VDC ,2A 8 X 120 / 230 VAC, 2A 16 X 120 VAC, 1A 32 X 24 V DC, 0.5A DI/DO MODULES 8DI/8DO X 24VDC 0.5A
RELAY OUTPUTS 8 X Relay 30 VDC ,0.5A 8 X Relay 250 VAC ,3A 16 X Relay 30VDC,0.5A 16 X Relay 120VAC, 2.5A
ANALOG INPUTS PARAMETERIZABLE 8 Analog Inputs/ 2 Analog Inputs +/- 10V , +/- 50 mV, +/-1 V, +/-20 Ma, 4 to 20mA, Pt100, Thermocouple
ANALOG OUTPUTS PARAMETERIZABLE 4 Analog Outputs/ 2 Analog Outputs +/-10V, +/-50mV, +/-1 V, +/-20 mV, 4 to 20 mA
2. FUNCTION MODULES High Speed Counter Modules - Upto 100 KHz range Positioning Modules - For position control, Stepper Motor Control, Cam Controllers All function modules are enclosed and can be installed in any slot. 3. COMMUNICATION PROCESSORS - FOR DATA EXCHANGE WITH PRINTERS,COMPUTERS, SIMATIC SYSTEMS CP340 - Point to Point Communication for the serial link with RS232, 3964R and any ASCII protocol 4. INTERFACE MODULES - FOR MULTI TIER CONFIGURATION For Central Controller Expansion For Expansion Unit Connection 5. POWER SUPPLY MODULES - FOR 24 VDC LOAD CIRCUITS WITH DIFFERENT RATINGS.
MPI - MULTI POINT INTERFACE FOR COMMUNICATION MPI INTEGRATED IN CPU DATA EXCHANGE RATE : 187.5 Kbits / s SIMULTANEOUS COMMUNICATION WITH PG/PC/OP(OPERATOR PANEL) AND FURTHER PLCS REQUIRING NO ADDITIONAL HARDWARE UPTO 32 NODES CAN BE CONNECTED
ADDRESSING OF MODULES
Slot Addressing for Rack 0
Slot Number Digital Address Analog Address
4 0 256
5 4 272
6 8 288
7 12 304
8 16 320
9 20 336