Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas

ASIMATICLadder Logic (LAD) for S7-300and S7-400 Programming Referen, Notas de estudo de Cultura

dfgghh - dfgghh

Tipologia: Notas de estudo

2010

Compartilhado em 02/06/2010

luciano-eletrotecnica-8
luciano-eletrotecnica-8 🇧🇷

4.4

(14)

4 documentos

1 / 214

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
Preface, Contents
Bit Logic Instructions 1
Comparison Instructions 2
Conversion Instructions 3
Counter Instructions 4
Data Block Instructions 5
Logic Control Instructions 6
Integer Math Instructions 7
Floating Point Math Instructions 8
Move Instructions 9
Program Control Instructions 10
Shift and Rotate Instructions 11
Status Bit Instructions 12
Timer Instructions 13
Word Logic Instructions 14
Appendix
Overview of All LAD Instructions A
SIMATIC
Ladder Logic (LAD) for S7-300
and S7-400 Programming
Reference Manual
This manual is part of the documentation
package with the order number:
6ES7810-4CA06-8BR0
Programming Examples B
Index
Edition 11/2002
A5E00171231-01
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe ASIMATICLadder Logic (LAD) for S7-300and S7-400 Programming Referen e outras Notas de estudo em PDF para Cultura, somente na Docsity!

Preface, Contents

Bit Logic Instructions^1

Comparison Instructions^2

Conversion Instructions^3

Counter Instructions^4

Data Block Instructions^5

Logic Control Instructions^6

Integer Math Instructions^7

Floating Point Math Instructions^8

Move Instructions^9

Program Control Instructions^10

Shift and Rotate Instructions^11

Status Bit Instructions^12

Timer Instructions^13

Word Logic Instructions^14

Appendix

Overview of All LAD Instructions A

SIMATIC

Ladder Logic (LAD) for S7-

and S7-400 Programming

Reference Manual

This manual is part of the documentation package with the order number: 6ES7810-4CA06-8BR

Programming Examples B

Index

Edition 11/

A5E00171231-

Copyright © Siemens AG 2002 All rights reserved The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved.

Siemens AG Bereich Automation and Drives Geschaeftsgebiet Industrial Automation Systems Postfach 4848, D- 90327 Nuernberg

Disclaimer of Liability We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed.

©Siemens AG 2002 Technical data subject to change.

Siemens Aktiengesellschaft A5E00171231-

Safety Guidelines

This manual contains notices intended to ensure personal safety, as well as to protect the products and connected equipment against damage. These notices are highlighted by the symbols shown below and graded according to severity by the following texts:

!

Danger indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.

!

Warning indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken.

!

Caution indicates that minor personal injury can result if proper precautions are not taken.

Caution indicates that property damage can result if proper precautions are not taken.

Notice draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation.

Qualified Personnel

Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are defined as persons who are authorized to commission, to ground and to tag circuits, equipment, and systems in accordance with established safety practices and standards.

Correct Usage

Note the following:

!

Warning This device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens.

This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended.

Trademarks

SIMATIC®, SIMATIC HMI® and SIMATIC NET® are registered trademarks of SIEMENS AG. Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.

Preface

Ladder Logic (LAD) for S7-300 and S7-400 Programming iv A5E00171231-

Requirements

To use this Ladder Logic manual effectively, you should already be familiar with the theory behind S7 programs which is documented in the online help for STEP 7. The language packages also use the STEP 7 standard software, so you should be familiar with handling this software and have read the accompanying documentation. This manual is part of the documentation package "STEP 7 Reference". The following table displays an overview of the STEP 7 documentation:

Documentation Purpose Order Number STEP 7 Basic Information with

  • ·Working with STEP 7 V5.2, Getting Started Manual
  • Programming with STEP 7 V5.
  • Configuring Hardware and Communication Connections, STEP 7 V5.
  • From S5 to S7, Converter Manual

Basic information for technical personnel describing the methods of implementing control tasks with STEP 7 and the S7-300/ programmable controllers.

6ES7810-4CA06-8BA

STEP 7 Reference with

  • Ladder Logic (LAD) / Function Block Diagram (FDB) / Statement List (STL) for S7-300/400 manuals
  • Standard and System Function for S7-300/

Provides reference information and describes the programming languages LAD, FBD and STL, and standard and system function extending the scope of the STEP 7 basic information.

6ES7810-4CA06-8BR

Online Helps Purpose Order Number Help on STEP 7 Basic information on programming and configuring hardware with STEP 7 in the form of an online help.

Part of the STEP 7 Standard software.

Reference helps on AWL/KOP/FUP Reference help on SFBs/SFCs Reference help on Organization Blocks

Context-sensitive reference information.

Part of the STEP 7 Standard software.

Preface

Ladder Logic (LAD) for S7-300 and S7-400 Programming A5E00171231-01 v

Online Help

The manual is complemented by an online help which is integrated in the software. This online help is intended to provide you with detailed support when using the software. The help system is integrated in the software via a number of interfaces:

  • The context-sensitive help offers information on the current context, for example, an open dialog box or an active window. You can open the context- sensitive help via the menu command Help > Context-Sensitive Help , by pressing F1 or by using the question mark symbol in the toolbar.
  • You can call the general Help on STEP 7 using the menu command Help > Contents or the "Help on STEP 7" button in the context-sensitive help window.
  • You can call the glossary for all STEP 7 applications via the "Glossary" button. This manual is an extract from the "Help on Ladder Logic". As the manual and the online help share an identical structure, it is easy to switch between the manual and the online help.

Further Support

If you have any technical questions, please get in touch with your Siemens representative or agent responsible. http://www.siemens.com/automation/partner

Training Centers

Siemens offers a number of training courses to familiarize you with the SIMATIC S7 automation system. Please contact your regional training center or our central training center in D 90327 Nuremberg, Germany for details: Telephone: +49 (911) 895-3200. Internet: http://www.sitrain.com

Preface

Ladder Logic (LAD) for S7-300 and S7-400 Programming A5E00171231-01 vii

Service & Support on the Internet

In addition to our documentation, we offer our Know-how online on the internet at: http://www.siemens.com/automation/service&support where you will find the following:

  • The newsletter, which constantly provides you with up-to-date information on your products.
  • The right documents via our Search function in Service & Support.
  • A forum, where users and experts from all over the world exchange their experiences.
  • Your local representative for Automation & Drives via our representatives database.
  • Information on field service, repairs, spare parts and more under "Services".

Preface

Ladder Logic (LAD) for S7-300 and S7-400 Programming viii A5E00171231-

Contents

Contents

Ladder Logic (LAD) for S7-300 and S7-400 Programming

Ladder Logic (LAD) for S7-300 and S7-400 Programming A5E00171231-01 1-

1 Bit Logic Instructions

1.1 Overview of Bit Logic Instructions

Description

Bit logic instructions work with two digits, 1 and 0. These two digits form the base of a number system called the binary system. The two digits 1 and 0 are called binary digits or bits. In the world of contacts and coils, a 1 indicates activated or energized, and a 0 indicates not activated or not energized. The bit logic instructions interpret signal states of 1 and 0 and combine them according to Boolean logic. These combinations produce a result of 1 or 0 that is called the “result of logic operation” (RLO). The logic operations that are triggered by the bit logic instructions perform a variety of functions. There are bit logic instructions to perform the following functions:

  • ---| |--- Normally Open Contact (Address)
  • ---| / |--- Normally Closed Contact (Address)
  • ---(SAVE) Save RLO into BR Memory
  • XOR Bit Exclusive OR
  • ---( ) Output Coil
  • ---( # )--- Midline Output
  • ---|NOT|--- Invert Power Flow

The following instructions react to an RLO of 1:

  • ---( S ) Set Coil
  • ---( R ) Reset Coil
  • SR Set-Reset Flip Flop
  • RS Reset-Set Flip Flop

Other instructions react to a positive or negative edge transition to perform the following functions:

  • ---(N)--- Negative RLO Edge Detection
  • ---(P)--- Positive RLO Edge Detection
  • NEG Address Negative Edge Detection
  • POS Address Positive Edge Detection
  • Immediate Read
  • Immediate Write

Bit Logic Instructions

Ladder Logic (LAD) for S7-300 and S7-400 Programming 1-2 A5E00171231-

1.2 ---| |--- Normally Open Contact (Address)

Symbol

---| |---

Parameter Data Type Memory Area Description

BOOL I, Q, M, L, D, T, C Checked bit

Description

---| |--- (Normally Open Contact) is closed when the bit value stored at the specified

is equal to "1". 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 "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". When used in series, ---| |--- is linked to the RLO bit by AND logic. When used in parallel, it is linked to the RLO by OR logic.

Status word

BR CC 1 CC 0 OV OS OR STA RLO /FC writes: - - - - - X X X 1

Example

I 0.0 I 0.

I 0.

Power flows if one of the following conditions exists: The signal state is "1" at inputs I0.0 and I0. Or the signal state is "1" at input I0.

Bit Logic Instructions

Ladder Logic (LAD) for S7-300 and S7-400 Programming 1-4 A5E00171231-

1.4 XOR Bit Exclusive OR

For the XOR function, a network of normally open and normally closed contacts must be created as shown below.

Symbols

Parameter Data Type Memory Area Description BOOL I, Q, M, L, D, T, C Scanned bit <address2 BOOL I, Q, M, L, D, T, C Scanned bit

Description

XOR (Bit Exclusive OR) creates an RLO of "1" if the signal state of the two specified bits is different.

Example

I 0.

I 0.0 I 0.

I 0.1 Q 4.

The output Q4.0 is "1" if (I0.0 = "0" AND I0.1 = "1") OR (I0.0 = "1" AND I0.1 = "0").

Bit Logic Instructions

Ladder Logic (LAD) for S7-300 and S7-400 Programming A5E00171231-01 1-

1.5 --|NOT|-- Invert Power Flow

Symbol

---|NOT|---

Description

---|NOT|--- (Invert Power Flow) negates the RLO bit.

Status word

BR CC 1 CC 0 OV OS OR STA RLO /FC writes: - - - - - - 1 X -

Example

I 0.

NOT I 0.1 I 0.

Q 4.

The signal state of output Q4.0 is "0" if one of the following conditions exists: The signal state is "1" at input I0. Or the signal state is "1" at inputs I0.1 and I0.2.

Bit Logic Instructions

Ladder Logic (LAD) for S7-300 and S7-400 Programming A5E00171231-01 1-

Example

I 0.0 I 0.

I 0.

Q 4.

I 0.3 Q 4.

The signal state of output Q4.0 is "1" if one of the following conditions exists: The signal state is "1" at inputs I0.0 AND I0. OR the signal state is "0" at input I0.2. The signal state of output Q4.1 is "1" if one of the following conditions exists: The signal state is "1" at inputs I0.0 AND I0. OR the signal state is "0" at input I0.2 AND "1" at input I0.

If the example rungs are within an activated MCR zone: When MCR is on, Q4.0 and Q4.1 are set according to power flow status as described above. When MCR is off (=0), Q4.0 and Q4.1 are reset to 0 regardless of power flow.

Bit Logic Instructions

Ladder Logic (LAD) for S7-300 and S7-400 Programming 1-8 A5E00171231-

1.7 ---( # )--- Midline Output

Symbol

---( # )---

Parameter Data Type Memory Area Description

BOOL I, Q, M, *L, D Assigned bit

  • An L area address can only be used if it is declared TEMP in the variable declaration table of a logic block (FC, FB, OB).

Description

---( # )--- (Midline Output) is an intermediate assigning element which saves the RLO bit (power flow status) to a specified

. The midline output element saves the logical result of the preceding branch elements. In series with other contacts, ---( # )--- is inserted like a contact. A ---( # )--- element may never be connected to the power rail or directly after a branch connection or at the end of a branch. A negated ---( # )--- can be created by using the ---|NOT|--- (invert power flow) element.

MCR (Master Control Relay) dependency

MCR dependency is activated only if a midline output coil is placed inside an active MCR zone. Within an activated MCR zone, if the MCR is on and there is power flow to a midline output coil; the addressed bit is set to the current status of power flow. If the MCR is off, a logic "0" is written to the specified address regardless of power flow status.

Status word

BR CC 1 CC 0 OV OS OR STA RLO /FC writes: - - - - - 0 X - 1