Ladder programming Counter Instruction S7 300

Slides:



Advertisements
Similar presentations
Programming with Ladder Logic
Advertisements

Unit 7 Discrete Controllers
ARITHMETIC LOGIC SHIFT UNIT
Copyright © 2005 Rockwell Automation, Inc. All rights reserved. 1 Micro Logix 1100 RSLogix 500 LAB#2 Timing, Counting & Comparing.
PLC Timer Instructions
Copyright © 2002 Delmar Thomson Learning Chapter 11 Processor Data Organization.
PROGRAMMING. Each PLC manufacturer offers a different set of instructions within its PLC family. Many of these instruction sets are not applicable to.
Switchgears Control Using SCADA System Based on PLC
5/20/2015IENG 475: Computer-Controlled Manufacturing Systems 1 IENG Lecture 14 Ladder Logic Programming of PLCs.
FUNCTION OF OUTPUT CONTROLLER AND APPLICATION
Sequential Logic Design
The Control Unit: Sequencing the Processor Control Unit: –provides control signals that activate the various microoperations in the datapath the select.
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Sequential Logic Design
Railway Foundation Electronic, Electrical and Processor Engineering.
Chapter 19 Fundamental PLC Programming
Programming with Function Blocks
Lecture 6: PLC: Timers and Counters
Logic Functions OR Operation
Timers.
Advanced Instructions Most PLCs now support more advanced functions such as Floating point math, Boolean operations, Shifting, Sequencing, Program control.
Programmable Logic Controllers
Programmable Logic Controllers
PLC introduction1 Discrete Event Control Concept Representation DEC controller design DEC controller implementation.
PLC: Programmable Logical Controller
Rabie A. Ramadan Lecture 3
Counter The CTU CTD instruction counts upward & Down wards over a range Each time the rung goes from false- to-true. We can make an Up-Down counter by.
I/P Addressing Each input or output is assigned a number on its module, which is referenced to within the program which is refereed to as “address”.
Processor Data Organization
Logical controllers' programming 4- Treatment of Data 4.1- Comparison of Data Programming.
Chapter 8.
COMPUTER SCIENCE QUESTIONS… BY JACK. WHAT IS THE CPU? The cpu is the central processing unit.
PLC Counter Instructions
Senior Project Presentation: Designers: Shreya Prasad & Heather Smith Advisor: Dr. Vinod Prasad May 6th, 2003 Internal Hardware Design of a Microcontroller.
Counters. Counter Applications Counters count events such as the number of: Parts passing a certain point on a conveyor system Good parts/bad parts manufactured.
Timers and Counters by Dr. Amin Danial Asham. References  Programmable Controllers-Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
PLC PROGRAMMING.
LADDER PROGRAMMING LANGUAGE by Dr. Amin Danial Asham.
PROGRAMMABLE LOGIC CONTROLLER (PLC) AND AUTOMATION
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Actuators and Control, Part 4 Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
1 Introduction to PLCs: Programming Counters ELMT Basic Programmable Logic Controllers Chapter 0x_W Source: www Based on Ch 8 of Frank D. Petruzella.
LG PLC COURSE Beginner Prepared by : -Hossam Mohammed -Ramdan said
Basic Computer Organization and Design
9 CHAPTER PLC Counter Instructions. 9 CHAPTER PLC Counter Instructions.
Chapter 10 © 2011, The McGraw-Hill Companies, Inc.
Microcomputer Programming
Overview Instruction Codes Computer Registers Computer Instructions
Computer Architecture
GE Counters and Order of Operation
Programming Timers.
Industrial Electronics
MicroEconomix 1500 RSLogix 500 LAB#2
GE Timers and Isolation of the PLC System
Introduction to Ladder Diagram
Lesson 19: PLC Programming Techniques
Iteration: Beyond the Basic PERFORM
Introduction to Sequential Circuits
Distributed Energy Engineering
Programmable Logic Controllers (PLCs)
Information Representation: Machine Instructions
ECE 352 Digital System Fundamentals
PLC Counters Three types: Count Up Count Down Count Up/Down Used for:
Computer Operation 6/22/2019.
Presentation transcript:

Ladder programming Counter Instruction S7 300

Mechanical counters can serve the same function as programmed counters Every time the actuating lever is moved over, the counter adds one number; the actuating lever then returns automatically to its original position Resetting to zero is done with a pushbutton located on the side of the unit Mechanical counter

Electronic counters Electronic counters can count up, count down, or be combined to count up and down Although the majority of counters used in industry are up- counters, numerous applications require the implementation of down-counters or of combination up/ down-counters Electronic counters

Electronic counters All PLC manufacturers offer some form of counter instruction as part of their instruction set One common counter application is keeping track of the number of items moving past a given point Counter application

The following counter instructions are available: S_CUD Up-Down Counter S_CD Down Counter S_CU Up Counter ---( SC ) Set Counter Coil ---( CU ) Up Counter Coil ---( CD ) Down Counter Coil

Location of a Counter in Memory Counters have an area reserved for them in the memory of CPU This memory area reserves one 16-bit word for each counter address The ladder logic instruction set supports 256 counters The counter instructions are the only functions that have access to the counter memory area

Setting count value Bits 0 through 11 of the counter word contain the count value in binary code. The range of the count value is 0 to 999 A preset value should be entered in in the format: C#127

S_CUD Up-Down Counter A positive edge transition at input S of the Up-Down Counter instruction sets the counter with the value at the Preset Value (PV) input A signal state of 1 at input R resets the counter. Resetting the counter places the value of the count at 0 The counter is incremented by 1 if the signal state at input CU changes from 0 to 1 and the value of the counter is less than 999 The counter is decremented by 1 if the signal state at input CD changes from 0 to 1 and the value of the counter is more than 0 If there is a positive edge at both count inputs, both operations are executed and the count remains the same

S_CUD Up-Down Counter

S_CUD Up-Down Counter: Example

S_CU Up Counter A positive edge transition at input S of the Up Counter instruction sets the counter with the value at the Preset Value (PV) input With a positive edge, the counter is reset at input R. The resetting of the counter sets the count value to 0 With a positive edge, the value of the counter at input CU is increased by 1 when the count value is less than 999 A signal state check for 1 at output Q produces a result of 1 when the count is greater than 0; the check produces a result of 0 when the count is equal to 0

S_CU Up Counter

S_CU Up Counter: Example

S_CU Up Counter: Example This control application is designed to turn the red pilot light on and the green pilot light off after an accumulated count of 7 Simple up-counter program

S_CU Up Counter: Example Timing diagram

S_CU Up Counter: Example

S_CD Down Counter A positive edge transition at input S of the Down Counter instruction sets the counter with the value at the Preset Value (PV) input With a positive edge, the counter is reset at input R. The resetting of the counter sets the count value to 0 With a positive edge, the value of the counter at the input is reduced by 1 when the count value is greater than 0 A signal state check for 1 at output Q produces a result of 1 when the count is greater than 0; the check produces a result of 0 when the count is equal to 0

S_CD Down Counter

S_CD Down Counter

Counter instruction: ---( SC ) Set Counter Value Set Counter Value executes only if there is a positive edge in RLO. At that time, the preset value transferred into the specified counter

Counter instruction: ---( CU ) Up Counter Coil Up Counter Coil increments the value of the specified counter by one if there is a positive edge in the RLO and the value of the counter is less than "999“ If there is no positive edge in the RLO or the counter already has the value "999", the value of the counter will be unchanged

Counter instruction: ---( CD ) Down Counter Coil Down Counter Coil decrements the value of the specified counter by one, if there is a positive edge in the RLO state and the value of the counter is more than "0“ If there is no positive edge in the RLO or the counter has already the value "0", the value of the counter will be unchanged