GPA 1 - Basics of Industrial Automation & Control (August 2024) PDF

Document Details

HappierMinotaur

Uploaded by HappierMinotaur

greenpegltd.com

2024

Tags

programmable logic controllers plc programming industrial automation automation

Summary

This document is a training material covering the fundamentals of industrial automation and programmable logic controllers (PLCs), specifically focusing on Rockwell and Siemens PLC systems. The document details course outlines, PLC hardware components, PLC operation, and basic programming instructions.

Full Transcript

GPA 1 - Basics Of Industrial Automation & Control AUGUST 2024 greenpegltd.com 1 Course Outline Part 1 - General Introduction to PLCs Part 2 – Introduction to Rockwell Automation PLC System Part 3 - Int...

GPA 1 - Basics Of Industrial Automation & Control AUGUST 2024 greenpegltd.com 1 Course Outline Part 1 - General Introduction to PLCs Part 2 – Introduction to Rockwell Automation PLC System Part 3 - Introduction to Siemens PLC Family greenpegltd.com Part 1-General Introduction to PLCs Introduction PLC Hardware PLC Design PLC Operation Introduction to PLC Programming greenpegltd.com Part 2 – Introduction to Rockwell Automation PLC System Introduction Hardware Architecture Input / Output Interfaces PLC modes & operation greenpegltd.com Part 3 – Introduction to Siemens PLC System Introduction Hardware Architecture Input / Output Interfaces Communication System between Siemens PLCs and the PG/PC (Programmer) PLC modes & operation greenpegltd.com Part 3(Cont.) PLC Programming with Siemens Simatic Step 7 Interface overview I/O Addressing Basic programming instructions Creating a Project with Siemens Simatic Step 7 greenpegltd.com PART 1 GENERAL INTRODUCTION TO PLCs greenpegltd.com What is a PLC ? greenpegltd.com A Programmable Logic Controller is an industrial or digital computer that can be programmed and used for automation of different industrial processes to direct and regulate simple to complex systems. It is used to monitor inputs, and depending upon their state make decisions based on its program or logic, to control (turn on/off) its outputs to automate a machine or a process. greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com A Typical PLC Application greenpegltd.com From where does the PLC obtain information on process states? PLC obtains information on the process from signal transmitters, which are wired to the inputs of the PLC. These signal transmitters can be sensors, for example, that detect whether a work piece is at a particular position. They can also be simple switches or momentary-contact switches that can be open or closed. In respect of switches, a distinction is made between NC switches which are closed unless operated, and NO switches which are open unless operated. greenpegltd.com What is the difference between NC switches and NO switches? A distinction is made between NC switches (break contact) and NO switches (make contact) when they are used as signal transmitters. The NO switch is closed when it has been operated and NC switch which opens when operated i.e. when the coil is energized. greenpegltd.com PLC Vs RLC Before the advent of PLC, automated systems were controlled by electromagnetic relays. These conventional system is sometimes called RLC, which means Relay Logic Controls. RLC PLC In RLC, relays were all hardwired PLC have many advantages over in the control panel, therefore, it is RLC, in terms reduced wiring and time consuming, huge control power consumption, ease of panel, imperfect wiring, relay has modification of control sequence, limited contacts, modification ease of troubleshooting due to self requires stopping the system, diagnostic function, cost effective control panel cannot be used for compared to RLC systems, flexible many task to mechanical relays & and highly reliabile compared to RLC timers. greenpegltd.com PLC Hardware The major components that make up the PLC hardware are : Power supply unit, PSU Central processor unit (CPU), Input / Output, Memory, Others Programming device Communication cable System busses greenpegltd.com The configurations of PLC depends on the vendor e.g. Allen Bradley, Siemens, Mitsubishi, Modicon, OMRON etc. But a typical configuration are listed below Siemens PLC brands from largest to smallest Rack - A rack is often large (up to 18” by 30” by 10”) and can hold multiple cards. Mini - These are smaller than full sized PLC racks, but can have the same IO capacity. Micro – These units are as small as a deck of cards and tend to have fixed quantities of I/O and limited abilities, but costs will be the lowest. greenpegltd.com PSU CPU PLC controllers most times CPU - Microprocessor based, may allow works with either 24 VDC or 220 arithmetic operations, logic operators, VAC. Some PLC controllers block memory moves, computer interface, have electrical supply as a local area network, functions, etc. CPU separate module, while small makes a great number of check-ups of the and medium series already PLC controller itself so eventual errors contain the supply module. would be discovered early. greenpegltd.com Memory Signal Busses This is the system (ROM) which gives The internal paths along which permanent storage for the operating the digital signals flow within the system and the fixed data used by the PLC are called busses. CPU while RAM is for data, that is, where information is stored on the status of input and output devices and the values of timers and counters and other internal devices. greenpegltd.com Programmer (PG) Example of a PG is Siemens This is a device used to enter the Simatic Field PG which has required program into the memory of already installed programming the processor of the PLC. The software: Simatic Manager. program is developed in the programming device and then transferred to the memory unit of the PLC. The programmer can also be a PC, personal computer. greenpegltd.com Input / Output Modules Inputs monitor field devices, such as switches and sensors while Outputs control other devices, such as motors, pumps, solenoid valves, and lights. Both inputs and outputs can be categorized into two basic types: logical or continuous. Consider the example of a light bulb. If it can only be turned on or off, it is logical control. If the light can be dimmed to different levels, it is continuous. Outputs to actuators allow a PLC to cause something to happen in a process. greenpegltd.com Inputs PLC receives inputs from sensors that translate physical phenomena into electrical signals. Some typical examples of sensors are: Proximity switches-uses light to detect an object logically Switches - mechanical mechanisms will open or close electrical contacts for a logical signal Thermocouple-measures continuous temperature of a liquid Limit switch e.t.c. Inputs for a PLC come in a few basic varieties, the simplest are AC and DC inputs. greenpegltd.com In smaller PLCs the inputs are normally built in. For larger PLCs the inputs are purchased as modules, or cards, with 8 or 16 inputs of the same type on each card. The list below shows typical ranges for input voltages, and is roughly in order of popularity. 12-24 Vdc, 100-120 Vac, 10-60 Vdc, 12-24 Vac/dc, 5 Vdc (TTL), 200-240 Vac, 48 Vdc, 24 Vac. PLC input cards rarely supply power, this means that an external power supply is needed to supply power for the inputs and sensors. greenpegltd.com A 24Vac input channeled to 24Vac Input Card by Input devices From the diagram, there are two inputs, one is a normally open push button, and the second is a temperature switch, or thermal relay Both of the switches are powered by the positive/hot output of the 24Vac power supply - this is like the positive terminal on a DC supply. When the switches are open there is no voltage passed to the input card. If either of the switches are closed power will be supplied to the input card. The ladder logic shown uses Allen Bradley notation for ControlLogix. The rack name is bob. Also, the input card (’I’) is in slot 3, so the address for the card is bob:3.I.Data.x, where ’x’ is the input bit number. Symbol name is Pushbutton & Tempsensor. greenpegltd.com Siemens SM 321; DI 32 x DC 24 V greenpegltd.com Outputs Output modules rarely supply any power, but instead act as switches. External power supplies are connected to the output card and the card will switch the power on or off for each output. Some typical output voltages are 120 Vac, 24 Vdc, 12-48 Vac, 12-48 Vdc, 5Vdc (TTL), 230 Vac. These cards typically have 8 to 16 outputs of the same type and can be purchased with different current ratings. greenpegltd.com A 24Vdc Output Card Switching A.C & D.C Loads From the diagram, Starting at the 24Vdc supply. When the output 07 is on, current can flow in 07 to the COM, thus completing the circuit, and allowing the light to turn on. The output 03 for the relay is connected in a similar way. When the output 03 is on, current will flow through the relay coil to close the contacts and supply 120Vac to the motor. greenpegltd.com Siemens SM 322; DO 32 x DC 24 V/ 0.5 A greenpegltd.com A Relay Output Card Switching Both AC & DC Voltages From the diagram 24Vdc supply is connected directly to both When an output is activated the output switches on and power is delivered to the output devices. A relay output card could have AC and DC outputs beside each other. greenpegltd.com PLC Operation The operation of a PLC can be described with the diagram below From the diagram, The function of the input module is to convert incoming signals into signals processible by the PLC, and to pass these to the central control unit. The output module converts the PLC signal into signals suitable for the actuators. The actual processing of the signals is done in the central control unit in accordance with the program stored in the memory. greenpegltd.com PLC Operation Cycle There are three major steps namely: From the diagram, 1. Check input status Step 1- Check Input Status 2. Execute program The PLC scans the input to know if 3. Update output status it is on or off. It records this data (i.e. the status of all the inputs not just one.) into its memory to be used during the next step. greenpegltd.com Step 2-Execute Program Step 3-Update Output Status Next the PLC executes your program Finally the PLC updates the status one instruction at a time. of the outputs. It updates the outputs Since it already knows which inputs based on which inputs were on are on/off from the previous step it will during the first step and the results be able to decide whether the first of executing your program during output should be turned on based on the second step. the state of the first input. It will store After the third step the PLC goes the execution results for use later back to step one and repeats the during the next step. steps continuously. One scan time is defined as the time it takes to execute the 3 steps listed above. greenpegltd.com PLC Operation Modes PLC has different modes of Run – In this mode, the CPU is operation depending on the executing the program. Read only manufacturer. The common ones access possible from PG/PC. are listed below Stop – In this mode, the CPU is stopped. Run MRES- If in this for about 3-5seconds Stop in two consecutive times, the CPU MRES will reset. Run-P Run-P- When the mode switch is the Run-P position, CPU executes program and read/ write access is possible from PG greenpegltd.com Signal Types There are two basic signals used for input and output of a Binary Signals PLC. They are Binary & Analog signals Binary signals have only two signal states: Signal status "1" = Voltage available = switch ON=+24V Signal status "0" = No voltage = switch OFF=0V Analog Signals Analog signal has ranges of states. These ranges can be converted to its equivalent binary digits by A/D converter. An example is Temperature -50... +150°C greenpegltd.com PLC Communications PLC has various ways of communication some of which are: 1. Extension modules-Expanding I/Os within PLC rack 2. Remote PLCs-Interfacing many PLCs together-DCS 3. Serial communication-Between PLC and PG 4. Serial standards-RS 232, also used for SCADA greenpegltd.com PLC Setup and Configuration Depending on the manufacturer, PLC set up varies in terms of components that make up the system. For most PLCs, these components are present 1. PSU – Slot 0 2. CPU – Slot 1 3. Signal Modules ? 4. Communication cable 5. Programming Device greenpegltd.com I/O Configuration This can be carried out by following the steps below 1. Determine the number of digital and analog I/Os needed for your project 2. Choose a PLC that meet your specification 3. Assign addresses of the I/O module to all your project inputs and outputs. 4. Draw out an interface layout stating the condition of operation as shown in the diagram greenpegltd.com PLC Design & Calculation This focuses on specifications and analysis of the control system as well as external interfaces. Considering devices data sheets for power specifications and operation condition as stated in the manufacturer manual, will ensure optimum operation of machines, effective sensing by sensors, good system response time as well as a reliable control system. greenpegltd.com PLC Design and Calculation Procedure Step 1: Control System and Specification Analysis Draw the basic control system diagram greenpegltd.com Specification Analysis Analyses all important parameters of the entire system e.g. power consumption, consider the example below with one input and 3 outputs greenpegltd.com Step 2: Power requirement calculation greenpegltd.com Input / Output Module Requirements From the previous table above, we can derive the type of I/O module the PLC should have Inputs - 1 Proximity sensor – 24Vdc Outputs - 3 Solenoid valve – 24Vdc Pump – 24Vdc Heater – 230Vac Digital Input=1, Digital Output=2, Analog Input=0, Analog Output=1 Therefore, the minimum spec for the PLC module to use is DI1/DO2,AI1/AO1, not ideal though. greenpegltd.com Step 4: Recommendation The power supplies needed for the control system are as stated below A DC power supply with 24V and capable of supplying 2.5A An AC power supply with 230V and capable of supplying 4.5A A 24Vdc micro PLC with I/O module of DI4/DO8, AI4/AO4 greenpegltd.com Safety Requirements Consideration Checking all cable connections are safe and to the required specification and meeting local standards. Checking that all incoming power supply matches the voltage for which the PLC is set. Checking that all protective devices are set to their appropriate trip settings. Checking that emergency stop button work. Checking that all input/output devices are connected to the correct input/output points and giving the correct signals. Spacing controllers – follow the recommended minimum spacing to allow the convection cooling greenpegltd.com Introduction to PLC Programming This is a method of loading machine code, a sequence of binary code numbers to represent the program instructions These instructions enables the PLC to recognize signals, execute a predefined code segment and finally issuing out instruction in form of signals to the output devices connected to its output ports. greenpegltd.com Programming Languages IEC 61131-3 – This is a standard which deals with programming languages. Here are the textual and graphics PLC programming language defined Ladder diagram (LD), graphical – Popularly known as LAD Function block diagram (FBD), graphical Structured text (ST), textual Instruction list (IL), textual – Popularly called STL Sequential function chart (SFC), has elements to organize programs for sequential and parallel control processing. The three most popularly used languages are ladder logic (LAD), statement list (STL) and function block diagram (FBD). greenpegltd.com Ladder (LAD) Programming Language Ladder logic uses graphic symbols similar to relay schematic circuit diagrams. Ladder diagram consists of two vertical lines representing the power rails. From the diagram For AND Power can only get to the output if input A & B are true i.e closed For OR Power can get to the output if any of the inputs A or B is true i.e. closed For NOT Power can only get to the output if input A remains false i.e. state 0 or closed. greenpegltd.com Statement List (STL) Programming Language Statement list is a programming language that uses mnemonic abbreviations of Boolean logic operation. For AND Here are some popularly used A Input A instructions A Input B = Output Load (LD) instruction For OR And (A) instruction O Input A Or (O) instruction O Input B Output (=) instruction = Output NOT Operation AN Input A = Output greenpegltd.com Function Block Diagram (FBD)Programming Language Function block is represented as a box with the function name written in. greenpegltd.com Programming Software The software used for programming a PLC depends on the manufacturer of the PLC. Below are some programming software for specific type of PLCs Simatic step 7 for Siemens PLCs RS Logix Software for Allen Bradley PLCs Versa Pro for GE Fanuc PLCs Syswin for OMRON PLCs greenpegltd.com Part 2 Introduction to Siemens PLC Family & Programming greenpegltd.com Introduction Siemens has various brands of PLC with systems based on application.Some of which are S7-1200, S7-400, S7-300 and S7- 200. While S7-300 & S7-400 are commonly used in industries today, though S7-200 is also used but fading out gradually. greenpegltd.com Siemens PLCs S7-1500 S7-400 S7-1200 S7-300 S7-200 greenpegltd.com Siemens PLCs greenpegltd.com Hardware Architecture The architecture of various Siemens PLCs comprises of the basic hardware of a PLC namely, power supply, CPU, I/O Modules, and memory. However, the differentiating factor is the applications of these PLCs with the help of new complex modules. greenpegltd.com S7 200 greenpegltd.com Features of S7 200 Modular small control system for the lowest performance range, Performance-graded range of CPUs, Extensive selection of modules, Expandable with up to 7 modules, Backplane bus integrated in the modules, Central PG connection with access to all modules, No slot restrictions, “Total Package” with power supply, CPU, I/O in one unit, "Micro PLC" with integrated functions. greenpegltd.com S7-200: Modules greenpegltd.com Expansion Digital input modules: Modules (EM) - 24V DC - 120/230V AC Digital output modules: - 24V DC Analog input modules: - Voltage - Current - Resistance - Thermocouple Analog output modules: - Voltage - Current Communications The CP 242-2 can be used to connect the S7-200 as Master to an AS-Interface. Accessories Bus connector greenpegltd.com S7 200 greenpegltd.com Mode Selector For manual mode selection: STOP =Stop mode; the program is not executed. TERM =Program execution, read/write access possible from PG. RUN = Program execution, read-only access possible from PG. Status Indicators SF = Group error; internal CPU error (LEDs) RUN =Run mode; green STOP =Stop mode; yellow DP =Distributed I/O ( only CPU 215) Memory Card Slot for memory card. A memory card saves the program contents in the event of a power outage without the need for a battery. PPI Connection The programming device / text display or another CPU is connected here. greenpegltd.com greenpegltd.com Signal Modules Digital input modules: 24V DC, 120/230V AC (SM) Digital output modules: 24V DC, Relay Analog input modules: Voltage, current, resistance, thermocouple Analog output modules: Voltage, current Interface Modules The IM360/IM361 and IM365 make multi-tier configurations possible. (IM) They loop the bus through from one tier to the next. Dummy Modules The DM 370 dummy module reserves a slot for a signal module whose parameters (DM) have not yet been assigned. It can also be used, for example, to reserve a slot for installation of an interface module at a later date. Function Modules Perform “special functions": (FM) - Counting - Positioning - Closed-loop control. Communication Provide the following networking facilities: Processors (CP) - Point-to-Point connections - PROFIBUS - Industrial Ethernet. Accessories Bus connectors and front connectors greenpegltd.com greenpegltd.com Mode Selector MRES = Modul Reset function STOP = Stop mode; the program is not executed. RUN = Program execution, read-only access possible from PG. RUN-P= Program execution, read/write access possible from PG. Status Indicators SF = Group error; internal CPU fault or fault in module with diagnostics (LEDs) capability. BATF = Battery fault; Battery empty or non-existent. DC5V = Internal 5 V DC voltage indicator. FRCE = FORCE; indicates that at least one input or output is forced. RUN = Flashes when the CPU is starting up, shows a steady light in Run mode. STOP = Shows a steady light in Stop mode. Flashes slowly for a memory reset request, Flashes quickly when a memory reset is being carried out, Flashes slowly when a memory reset is necessary because a memory card has been inserted. Memory Card A slot is provided for a memory card. The memory card saves the program contents in the event of a power outage without the need for a battery. Battery Compartment There is a receptacle for a lithium battery under the cover. The battery provides backup power to save the contents of the RAM in the event of a power outage. MPI Connection Connection for a programming device or other device with an MPI interface. DP Interface Interface for direct connection of distributed I/Os to the CPU. greenpegltd.com For S7-400 greenpegltd.com greenpegltd.com Mode Selector MRES = Modul RESet STOP = STOP mode, i.e. no program execution and output disabled ( "OD“ mode= Output Disabled). RUN = Program execution, read-only access possible from PG. RUN-P = Program execution, read/write access possible from PG. Start-up Type Switch CRST = When you start the CPU with the mode selector STOP / RUN, a “complete restart" is performed (Cold ReSTart). WRST = When you start the CPU with the mode selector STOP / RUN, a “restart" is performed (Warm ReSTart) The CPU requests the start-up type via the Status LED (selectable with the CRST/WRST switch greenpegltd.com greenpegltd.com For S7-400 EXT-BATT Additional external battery voltage supply (DC 5...15V to backup the RAM, e.g. when the power supply is being replaced). MPI Connection For the programming device or another device with MPI interface. DP InterfaceThe 413-2DP, 414-2DP, 416-2DP and 417-2DP CPUs have an integrated DP interface for direct connection of distributed I/Os to the CPU. Slot for In the S7-400 CPUs you can, depending on your requirements, insert RAM or Memory Cards Flash EPROM cards as external load memory: RAM cards with a capacity of: 64KByte, 256KByte, 1MByte, 2MByte. The contents are backed up via the CPU battery. Flash EPROM cards with a capacity of: 64KByte, 256KByte, 1MByte, 2MByte, 4MByte, 8MByte, 16MByte. The contents are backed up on the integrated EEPROMs. greenpegltd.com S7 400 Rack Universal rack supports all module types and may either serve as a controller rack or an Expansion rack. Controller rack allows CPU and all modules types to be installed. Expansion Rack having a P-bus only, only supports installation of signal modules. It provides the mechanical and electrical connections between the S7-400 modules. No CPUs on expansion rack greenpegltd.com Power supply (PSU) The power supply converts the line voltage (120/130 VAC or 24 VDC) to the 5 VDC and 24 VDC operating voltages required to power the backplane on the rack of the S7-400. At times, a Backup battery may be part of the power supply module. Central Processing Unit (CPU) The CPU executes the user program by communicating via the multipoint interface (MPI) with other CPUs or with a programming device (PG). greenpegltd.com SM Modules The S7-400 I/O modules are mounted on the rack while the backplane initiates communication between the I/O modules and CPU greenpegltd.com Memory The size of the work memory is determined by the CPU that can be selected from a finely graded range of CPUs. The integral load memory (RAM) is sufficient for small to medium sized programs. For larger programs, the load memory is enlarged by plugging in RAM or FEPROM memory cards (64 KB to 64 MB). greenpegltd.com Field devices I/O interface External devices are connected to the PLCs via the SM modules. However, this connection between the field devices and the PLC Signal module is fastening by a removable terminal block (RTB). greenpegltd.com Communication between S7-300 & PG Communication with Siemens PLC can be achieved by a serial MPI cable and PC Adapter USB. The MPI serial cable can be used for programming and HMI data acquisition while the PC Adapter USB can only be used for programming. For this set up, the PC adapter USB is used. greenpegltd.com Communication between S7-300 & PG In Siemens PLC’s other Communication modes depend on the available communication ports on the CPU or CP. greenpegltd.com Communication between S7- CPU & PG greenpegltd.com Communication between S7- CPU & PG greenpegltd.com NUMBERING SYSTEM greenpegltd.com SIEMENS MEMORY PARTITIONING greenpegltd.com SIEMENS SYSTEM MEMORY PARTITIONING / ADDRESSING greenpegltd.com Programming With Simatic Step 7 The main software used in programming Siemens PLC is Simatic Step 7. However, there are various versions Simatic Step 5 – Old version, rarely used today Simatic Step 7 MicroWin – S7-200 Simatic Step 7 5.1, 5.2, 5.3, 5.4, 5.5-S7-300/400 TIA V10.5 – S7-1200 TIA V13 - V16 - S7 300, 400, 1200 and 1500 greenpegltd.com Programming With Simatic Step 7 greenpegltd.com Establishing Communication ClickStartSIMATICSTEP7 Set the PG-PC Interface Select the module that is available as the MPI interface. (Select) greenpegltd.com Enter 'MPI Address', 'Timeout', 'Transmission Rate' and 'Highest Station Address'. MPI = 2 (Accept default values for others) and Click OK Then, plug the connector that comes from the MPI interface of the PC into the MPI interface of the CPU and switch on the voltage supply of the PLC greenpegltd.com To test your connection Click on the – Accessible Stations' button, window appears with a folder for the accessible MPI stations. The window also shows the MPI address of the connected CPU greenpegltd.com Interface Overview greenpegltd.com Creating Projects Launch Simatic step 7 Click File New  Enter project Name: e.g PROJ_1Click Ok Click InsertProgramS7 Program Click insert Station  Simatic 300 Station Click Save greenpegltd.com Hardware Configuration This is the arrangement of the racks, modules, distributed I/O (DP) racks, and interface sub modules in a station window as installed physically greenpegltd.com Configure the I/O and other rack modules Open your project Double click the Simatic station hardware icon Select a hardware component in the "Hardware Catalog" window. Copy the selected component to the station window using drag & drop. greenpegltd.com The following figure shows the basic operation: For example, If PLC is S7-400, choose the following, noting their order numbers Rack – UR2 Substrate 9 Trough PSU – PS407-4A CPU – 414-2 Digital Input – SM421 Digital Output – SM422 If PLC is S7-300 (CPU313C), choose Rail CPU-313C noting the order number (Note that this is a compact PLC as all I/O modules are embedded, therefore, the remaining slots will then be filled automatically due to the I/O’s are internal. greenpegltd.com The lower part of the station window shows a detailed view of the inserted/selected rack. The order numbers and addresses of the modules are shown here in table form. After selection, the table has the structure shown below for a central rack equipped with modules (detailed view): greenpegltd.com To change PLC properties To change the addresses of the DI24/DO16 , double click on DI24/DO16Select Address Tab, e.g. Inputs – 124-126 to 0 -2 (3 bytes-24bits i.e. 0.0---0.7, 1.0---1.7 & 2.0---2.7) Outputs – 124-125 to 0-1 (2bytes-16bits i.e0.0---0.7 & 1.0--1.7 ) For Input Uncheck System default box Enter Start =0cell & End=2 For Output Uncheck System default box Enter Start =0cell & End=1 Click Ok (You will notice from the HW Config window that row 2.2 with I address and Q address has changed to reflect this changes) greenpegltd.com To change the CPU properties, e.g. retentive memory settings, Double click the CPU Select Retentive memory Apply the settings MB0=0, T0=0, C0=0 (Though can be used by advanced user but this is to avoid the system from starting from the state it was when previously stopped)Click OK. greenpegltd.com Input / Output Addressing The two types of addressing techniques with step 7 are absolute addressing & symbolic addressing. Absolute addressing-Actual I/O hardware addresses From the diagram above Absolute address I 1.5 I = Input 1= Byte (it starts from 0 – 1 e.g. 1.0---1.7-8bits) greenpegltd.com Symbolic Addressing In the symbol table, you assign a symbolic name and the data type to all the absolute addresses which you will address later on in your program; for example, for input I 0.1 the symbolic name is Key 1. greenpegltd.com Working with program Editors Writing simple programs Simatic step 7 has different Use ladder editor to write the programs below program editor. The most commonly used one is LAD/STL/FBD editor Any program written for example in LAD can be converted to its equivalent STL representations greenpegltd.com For AND Operation For OR Operation Launch Simatic Manager Click finish on the wizard Double click OB1 Click this button to assign new network from the Click in the title area of OB1 and enter instruction toolbar "Sample program 1" Click the ??.? sign as shown above and enter the symbolic name I 0.0 Confirm with Enter. greenpegltd.com Basic Programming Instructions 1. Bit Logic Instruction ---| |--- Normally Open Contact (Address) Normally Open Contact is closed when the bit value stored at the specified is equal to "1 and remain open if the bit value is “0” When the contact is closed, ladder rail power flows across the contact and the result of logic operation (RLO) = "1". If the signal state at the specified is "0", the contact is open. When the contact is open, power does not flow across the contact and the result of logic operation (RLO) = "0" greenpegltd.com ---| / |--- Normally Closed Contact (Address) Normally Closed Contact is closed when the bit value stored at the specified is equal to "0". When the contact is closed, ladder rail power flows across the contact and the result of logic operation (RLO) = "1". Otherwise, if the signal state at the specified is "1", the contact is opened. When the contact is opened, power does not flow across the contact and the result of logic operation (RLO) = "0". greenpegltd.com ---( ) Output Coil Output Coil works like a coil in a relay logic diagram. If there is power flow to the coil (RLO = 1), the bit at location is set to "1". If there is no power flow to the coil (RLO = 0), the bit at location is set to "0". An output coil can only be placed at the right end of a ladder rung. A negated output can be created by using the ---|NOT|--- (invert power flow) element. greenpegltd.com --|NOT|-- Invert Power Flow Invert Power Flow negates the RLO bit ---( ) Output Coil Output Coil works like a coil in a relay logic diagram. If there is power flow to the coil (RLO = 1), the bit at location is set to "1". If there is no power flow to the coil (RLO = 0), the bit at location is set to "0" greenpegltd.com S-R Flipflop Instruction The S (Set) and R (Reset) instructions are executed only when the RLO is "1". RLO "0" has no effect on these instructions and the address specified in the instruction remains unchanged. greenpegltd.com Exercise 3.1-NC, NO & O Instruction Write & test a ladder program meant to Switch ON the pump if both sensors connected to inputs channel I0.0 & I0.1 are ON Switch ON the heater if either sensor connected to inputs channel I1.0 or I1.1 are ON Switch ON the pump if sensor I0.3 is off and sensor I0.4 is ON. greenpegltd.com Exercise 3.2-Counter Instruction Using S_CU-Write a simple program to turn ON a pump after a level sensor senses water 3 times. greenpegltd.com 3. Timer Instruction Timers have an area reserved for them in the memory of your CPU. This memory area reserves one 16-bit word for each timer address. S_PULSE Pulse S5 Timer S_PEXT Extended Pulse S5 Timer S_ODT On-Delay S5 Timer You can pre-load a time value using the most common method: S_ODTS Retentive On-Delay S5 Timer S_OFFDT Off-Delay S5 Timer ---( SP ) Pulse Timer Coil S5TIME#4S = 4 seconds S5T#2h_15m = 2 hours and 15 ---( SE ) Extended Pulse Timer Coil minutes ---( SD ) On-Delay Timer Coil S5T#1H_12M_18S = 1 hour, 12 ---( SS ) Retentive On-Delay Timer Coil minutes, and 18 seconds ---( SA ) Off-Delay Timer Coil greenpegltd.com Considering the Pulse timer S_PULSE (Pulse S5 Timer) starts the specified timer if there is a positive edge at the start (S) input. If the signal state of input I0.0 changes from "0" The timer runs as long as the signal state at to "1”, the timer T5 will be started and the timer input S is "1", the longest period, however, is will continue to run for two 2s as long as I0.0 is the time value specified by input TV. "1". The signal state at output Q is "1” as long as If the signal state of I0.0 changes from "1" to the timer is running. If there is a change from "0" before the timer has expired the timer will "1" to "0" at the S input before the time be stopped. interval has elapsed the timer will be stopped. In this case the signal state at If the signal state of input I0.1 changes from "0" output Q is "0". to "1" while the timer is running, the time is The timer is reset when the timer reset (R) reset. input changes from "0" to "1" while the timer The output Q4.0 is logic "1" as long as the is running timer is running and "0" if the time has elapsed or was reset. greenpegltd.com Exercise 3.3-Timer Instruction Using S_Pulse-Write a simple program to turn ON the heater for 10 seconds if the low level sensor detects water in the tank. Using S_PEXT -Write a program to turn ON the pump for 15s when low level sensor detects water. If before the 15s, the low level sensor detects no water, the pump should remain ON until the preset time elapsed. Using S_ODT- Write a program to turn ON the heater after 10 seconds at start up greenpegltd.com Downloading a program Ensure PLC is turned ON Select the Simatic station or the Blocks folder on the left of the offline window and then download the program to the CPU using the menu command PLC > Download. Confirm the prompt with OK. (The program blocks are displayed in the online window when you download them) greenpegltd.com OB 1 (Organization Block): The operating system calls an OB cyclically; it therefore is the interface between the user program and the operating system. In this OB, the processor of the PLC is informed by means of block commands which program blocks it is to process. FB (Function Block): The FB has a memory area assigned to it. When an FB is called, it can be assigned a data block (DB). The data in this instance DB can be accessed by means of calls from the FB. One FB can be assigned to different DBs. FC (Function): FCs do not have a memory area assigned to them. The local data of a function is lost after the function is processed. DB (Data Block): DBs are used to make memory available for data variables. There are two kinds of data blocks: Global DBs where all OBs, FBs and FCs can read the stored data, or can themselves write data to the DB, and instance DBs that are assigned to a certain FB. SFB, SFC & SDB are ready made functions stored in the CPU greenpegltd.com Diagnosing PLCs In case CPU goes into stop mode while processing program, carry out the following Establish online connection Put CPU in stop mode PLCOperation modesPLC ModesClick stop Select blocks Click PLCDiagnosing/settingHard ware diagnostic. All the accessible CPUs are listed in the "Diagnosing Hardware" dialog box. The CPU with the STOP operating mode is highlighted. greenpegltd.com Click module information  Select the Diagnostic Buffer Tab The latest event (number 1) is at the top of the list. The cause of the STOP state is displayed. Read the message and trace the fault in order to eliminate it. Note: If a programming error caused the CPU to go into STOP mode, select the event and click the "Open Block" button. The block is then opened in the familiar greenpegltd.com Thanks greenpegltd.com QUESTIONS ANSWERS greenpegltd.com

Use Quizgecko on...
Browser
Browser