ace oplc presentation kurs

Upload: aleksandra-veljkovic

Post on 07-Apr-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 ACE OPLC Presentation Kurs

    1/44

    ACE

  • 8/6/2019 ACE OPLC Presentation Kurs

    2/44

  • 8/6/2019 ACE OPLC Presentation Kurs

    3/44

    ta je PLC ?

    PLC je mikroprocesorski ureaj kojim se mogurealizovati upravljake, logike i sekvencijalne strukture,

    koji zamenjuje relejna kola, vremenske relea, brojae i

    analogne kontrolere.

    PLC neprekidno proverava svoje ulaze i menja stanja

    izlaze po apliciranom algoritmu.

    Razvoj PLC, zapoet 1960-ih godina, pratio je zahteve

    industrije sve do dananjice.

  • 8/6/2019 ACE OPLC Presentation Kurs

    4/44

    VentilRadni fluid

    Senzor

    0.00 Kg

    Signal senzora

    Vaga

    Analogni ulazni

    signal

    Bocana traciOtvoriventil

    Izlazni signal

    1.50 Kg1.00 Kg0.50 Kg0.50 Kg1.00 Kg1.50 Kg0.00 Kg

    Boca

    puna

    PLCPLC

    ta je PLC ?

    Programibilni Logiki

    Kontroler

    Mozak svake maine

  • 8/6/2019 ACE OPLC Presentation Kurs

    5/44

    VentilRadni fluid

    Senzor

    Vaga

    Zatvori

    ventil

    Izlazni signal

    0.00 Kg1.50 KgPLCPLC

    ta je PLC ?

    Programibilni Logiki

    Kontroler

    Mozak svake maine

  • 8/6/2019 ACE OPLC Presentation Kurs

    6/44

    VentilRadni fluid

    Senzor

    0.00 Kg

    Signal senzora

    Vaga

    Analogni ulazni

    signal

    Boca natraciOtvoriventil

    Izalazni signal

    1.50 Kg1.00 Kg0.50 Kg0.50 Kg1.00 Kg1.50 Kg0.00 Kg

    Boca

    puna

    PLCPLC

    ta je PLC ?

    Programibilni Logiki

    Kontroler

    Mozak svake maine

  • 8/6/2019 ACE OPLC Presentation Kurs

    7/44

    ta je PLC ?

    IN CPU Memory OutHuman Machine Interface

  • 8/6/2019 ACE OPLC Presentation Kurs

    8/44

    Is a lamp an input or an output?

    What about a temperature sensoris it an input or an

    output?

    Is a switch an input or an output?

  • 8/6/2019 ACE OPLC Presentation Kurs

    9/44

    Kako radi ?

    PLC sadri 3 softverske komponente

    Korisnika aplikacija

    Operativni sistem

    Bootstrap

  • 8/6/2019 ACE OPLC Presentation Kurs

    10/44

    Kako radi ?

    Bootstrap program je osnovna rutina koja omoguava

    uitavanje operativnog sistema.

    Bootstrap program je softver koji je trajno instalisan na

    PLC Flesh memoriji.N

    jega upisuje proizvoa i korisnik gane moe menjati .

    Prilikom izvravanja Bootstrap rutine, prepoznaje se

    samo prvi serijski port PLC-a na baud rate od 9600.

  • 8/6/2019 ACE OPLC Presentation Kurs

    11/44

    Kako radi ?

    Korisnika aplikacija

    Operativni sistem

    Bootstrap

  • 8/6/2019 ACE OPLC Presentation Kurs

    12/44

    Kako radi ?

    Operativni sistem PLCa je program koji koordinira

    harverske resurse PLCa sa elementima korisnike

    aplikacije.

    Operativni sistem moe biti inoviran (update).

    Operativni sistem korespondira sa aplikacijom preko

    skupa sistemskih operanada (SB, SI, SL i SDW).

  • 8/6/2019 ACE OPLC Presentation Kurs

    13/44

    Kako radi ?

    Korisnika aplikacija

    Operativni sistem

    Bootstrap

  • 8/6/2019 ACE OPLC Presentation Kurs

    14/44

    Kako radi ?

    A PLC works in application scans.

    On every scan, the PLC checks the entire application,

    and according to the Inputs and the logic, updates theOutputs.

    The time it takes a PLC to scan the entire application is

    called the PLC Scan time.

  • 8/6/2019 ACE OPLC Presentation Kurs

    15/44

    Call Sub x Call Sub y

    Call Sub a

    Ret

    The PLC reads inputs from base and expansions

    Writes to physical outputs and updates CANbus

    Runs the HMI (including routines)

    Handles Communication

    Runs Ladder program

    Ret

    Ret Ret

  • 8/6/2019 ACE OPLC Presentation Kurs

    16/44

    What do you think ?

    Can a change in the Scan time affect the performance

    of the machine?

    When a PC is on-line with a PLC, it can see the values

    stored in the PLCs memory. At what stage in the Scan

    do you think the values are determined?

    In working with subroutines, do you think the Scan time

    of the PLC is constant?

  • 8/6/2019 ACE OPLC Presentation Kurs

    17/44

    Kako radi ?

    When we talk of the time it takes the PLC to execute apending operation, we have to take 3 parts into

    consideration:

    The time it takes it to run the logic

    The time it takes the Output to actuallyaffect the machine

    The time it takes the PLC to know the

    Input exists

    The response time

    of the system

  • 8/6/2019 ACE OPLC Presentation Kurs

    18/44

    Kako radi ?

    In order to allow some operations tohappen faster and decrease the response

    time, the user can include Interrupts in the

    Scan.

    An Interrupt is a routine that will run at

    every given time and allow the user to update

    the status of specific Inputs and Outputs.

    Working with Interrupts reduces the timedelays in the system and can improve results

    when needed.

  • 8/6/2019 ACE OPLC Presentation Kurs

    19/44

    What do you think ?

    Does an Outputs hardware type influence the response

    time?

    How can we make one part of the application run faster

    than the others?

    Can a change in the status of an Input be shorter than

    the Scan time and still be recognized?

  • 8/6/2019 ACE OPLC Presentation Kurs

    20/44

    Ladder logic

    The Unitronics Ladder logic tools

    were build following the IEC 1131.6

    In order to understand this standard

    we need to know two things:

    The Ladder editor is build out ofNets. Every Net should contain one

    Rung.

    The status of the elements in a

    Net is determined according to the

    status of them in the beginning ofthe Net.

  • 8/6/2019 ACE OPLC Presentation Kurs

    21/44

    Ladder logic

  • 8/6/2019 ACE OPLC Presentation Kurs

    22/44

    Ladder logic

    Lets try to change the elements in the electric

    circuit using Ladder Logic elements:

  • 8/6/2019 ACE OPLC Presentation Kurs

    23/44

    Ladder logic

    Lets try to change the elements in the electric

    circuit using Ladder Logic elements:

  • 8/6/2019 ACE OPLC Presentation Kurs

    24/44

    Ladder logic

    Introduction: Basic LadderE

    lements

    Contact

    A Contact is a representation of an Input

    signal that we want to use as a energizing

    condition for the rest of the Ladder net.

    When the element linked to the Contact is

    ON, we say that the Contact is closed. The

    closed Contact allows the current to pass

    through it.

    The Contact can be linked toInputs,internal relays (MB), Timers, Counters, SBs

    and Outputs.

  • 8/6/2019 ACE OPLC Presentation Kurs

    25/44

    Ladder logic

    Contacts can also come in other forms.

    One of the most common forms is the

    Inverse Contact.

    Inverse Contacts energize the net when

    the element linked to it is OFF (logic 0).

    Inverse Contacts are also called

    Normally Closed Contacts.

    Introduction: Basic LadderElements

    Contact

  • 8/6/2019 ACE OPLC Presentation Kurs

    26/44

    Ladder logic

    Two more types of frequently used

    Contacts are Positive and Negative

    Transitions.

    A Positive (or negative) Transition

    Contact is used to make sure something will

    happen for only one scan.

    A Positive Transition Contact is activated

    when the element rises from OFF to ON,while a Negative Transition Contact is

    activated when the element turns from ON

    to OFF.

    Introduction: Basic LadderElements

    Contact

  • 8/6/2019 ACE OPLC Presentation Kurs

    27/44

    Ladder logic

    CoilCoil

    A Coil is a result of the rung. If all the

    elements prior to the Coil are ON (logic 1)

    the Coil will be energized. Once there wont

    be a path of true conditions, the status of

    the Coil will also change to logic 0 (low).

    A Coil can be linked to Outputs, internal

    coils and SBs.

    Due to the way a PLC scans, a directCoil should be called only once in the

    program.

    Introduction: Basic LadderElements

  • 8/6/2019 ACE OPLC Presentation Kurs

    28/44

    What do you think ?

    Make the same Output turn ON only when you press

    two keys at the same time.

    Lets do a simple application that turns an output ON

    when you press one of the keys on the PLC.

    Now, make the Output turn ON when you are not

    pressing any key.

  • 8/6/2019 ACE OPLC Presentation Kurs

    29/44

    Ladder logic

    You may need to latch the status of a

    Coil, to make it stay in its current status

    even if the conditions prior to it change. Wecan use the Set command for this purpose.

    Once a Set command is given, the Coil

    will stay ON till the next Reset command is

    given.

    Set\Reset commands

    Introduction: Basic LadderElements

  • 8/6/2019 ACE OPLC Presentation Kurs

    30/44

    What do you think ?

    Pressing a key will turn the Output ON. The Output

    should stay ON till you press a second (different) key.

    Try to turn the Output ON and OFF using just one key

    (pressing once will turn it ON and pressing it again will

    turn the Output OFF).

    Advanced

  • 8/6/2019 ACE OPLC Presentation Kurs

    31/44

    Ladder logic

    Timers

    A Timer is a Coil that you energize, and

    after a specified amount of time (Timers

    preset) the Timers Contact turns ON(usually).

    There are several types of timers:

    On delay Timer

    Timer accumulatedTimer extended

    Introduction: Basic LadderElements

  • 8/6/2019 ACE OPLC Presentation Kurs

    32/44

    Ladder logic

    On Delay TimerAccumulated TimerTimer extended

  • 8/6/2019 ACE OPLC Presentation Kurs

    33/44

    What do you think ?

    Pressing a key will turn an Output ON and OFF in cycles

    of 5 seconds. Pressing the key again will stop it.

    Pressing a key once will make the Output turn ON for 10

    seconds.

  • 8/6/2019 ACE OPLC Presentation Kurs

    34/44

    Ladder logic

    DataTypes

    There are some more data types in the

    PLC beside the bits, the Inputs and the

    Outputs.

    Those data types are called, in general,Registers.

    Some of the registers are Integers, some

    are Long Integers, and some are Double

    Words.

  • 8/6/2019 ACE OPLC Presentation Kurs

    35/44

    Ladder logic

    What is a Register

    MI MLDW

    -32768 to 32767-2147483648 to 2147483647

    0 to 4294967296

    0

    1

    23

    4

    5

  • 8/6/2019 ACE OPLC Presentation Kurs

    36/44

    Ladder logic

    A register is a sum of bits. An Integer

    contains 16 bits, a Long Integer contains 32

    bits, and the same goes for a DW which

    contains 32 bits and is unsigned.

    What is a Register

    15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

    V l

    Sign

  • 8/6/2019 ACE OPLC Presentation Kurs

    37/44

    Ladder logic

    The value stored in a register is always binary

    but it can be viewed in different ways.

    The most common view of a register value is

    decimal, but sometimes Hexadecimal is also very

    useful.

    1 111 110 0 11 1100 00

    1x2^0+1x2^1+1x2^2+1x2^3+1x2^4+1x2^5+1x2^6+1x2^7+1x2^8+1x2^9+1x2^10+0x2^11+0

    x2^12+0x2^13+0x2^14+0x2^15=1023=3FF

    What is a Register

  • 8/6/2019 ACE OPLC Presentation Kurs

    38/44

    Ladder logic

    What is a register

    The value stored in a register can also be a

    representation ofASCII characters. In this case,

    every character is placed in a byte which is actually

    8 bits of data. This is also true when we talk of a

    string, which is a sum of registers holding a set ofcharacters.

    Characters in a register are read right to left (low

    to high).

    Mi 1 Mi 2Mi 0

    31 34 33 36 3532 123456

  • 8/6/2019 ACE OPLC Presentation Kurs

    39/44

    What do you think ?

    In what format is the number FF (Binary, Decimal or

    Hexadecimal)?

    How many bytes are in a MI?

    What is the biggest number one can store in a MI?

    How many bits are in a MI?

  • 8/6/2019 ACE OPLC Presentation Kurs

    40/44

    Ladder logic

    Analog Values

    The best example for using registers is

    when we want to measure analog values in

    the PLC.

    Analog values are stored in registers and

    evaluated according to their resolution.

    If we have an analog input that gives10

    bit resolution, it means that the value in the

    register linked to this input will be in the

    range of 0-2^10 or 0-1023 digits.

  • 8/6/2019 ACE OPLC Presentation Kurs

    41/44

    Ladder logic

    In order to add the analog reading to the

    control system, we have functions that can

    compare values, do math calculations and

    move data (store).

    Those functions and more can be linked

    to any type of register.

    Analog Values

  • 8/6/2019 ACE OPLC Presentation Kurs

    42/44

    What do you think ?

    Add to this application that the Output will turn ON only if

    the value is in range for more than 10 sec.

    Lets write a small application that compares the analog

    input to Min and Max values (constant set points) and

    turns an Output ON when the reading is between them.

  • 8/6/2019 ACE OPLC Presentation Kurs

    43/44

    ACE

  • 8/6/2019 ACE OPLC Presentation Kurs

    44/44