Creating Alarms

Embed Size (px)

Citation preview

  • 8/10/2019 Creating Alarms

    1/15

    CHAPTER23 Alarm&EventProgramming

    Objectives

    Aftercompletingthischapter,youshouldhavetheknowledgeto:

    Understand

    alarm

    programming.

    Applythevarioustechniquestocapturealarmandeventinformation.

    ManyPLCapplicationsrequiresomeformofalarmingwhenabnormalconditionsoreventsoccur.PLCsare

    wellsuitedforthistaskandinfact,manyPLCmanufacturersprovidespecialinstructionsdesignedjustfor

    thispurpose. Someofthesespecialinstructionswillbecoveredlaterinthischapter.

    Alertingoperatingormaintenancepersonnelofabnormalconditionsorproblemssavestimeandincreases

    machineorprocessuptime.Whendetailedalarmingisprovided,manyproblemscanberesolvedby

    operatorsthemselvesratherthancallingatechniciantofindtheproblemsavingtimeandincreasing

    productivity.

    WhenaPLCsystemisconnectedtooneofthemanyHMIinterfacesavailableonthemarkettoday,theHMI

    canprovideallofthealarmingfunctionsnecessarywithminimaladditionalPLCprogramming.MostHMI

    softwarepackagesprovidesomeformofalarmingandeventrecording. TheseHMIsystemscontinually

    monitorthePLCsinternaldatafilesortagsandbasedonhowtheHMIisprogrammedwillalarmaccordingly.

    WhenHMIinterfaceswithbuiltinalarmingfeaturesarenotpartoftheoverallsystemorwheneventsmust

    becapturedfasterthananHMIsystemcanmonitor,thealarmingandeventrecordingmustbeprogrammed

    inthePLC.Thischapterisdedicatedtoshowingthereadersomeofthetechniquesandinstructionsusedto

    programalarmandeventinformationinPLCs.

    BASIC

    ALARM

    LOGIC

    Alarmsandeventscanbetriggeredfromdigitalinformationsuchasamotorfailingtostartorrun. Theycan

    betriggeredfromprocessanalogvaluessuchasahightemperatureorlowpressure. Whethermonitoringa

    digitaloranalogvaluetheendresultisthesame,abitortagistypicallysettoa1orONindicatingthata

    problemhasbeendetected. Figure231illustratesanexampleofthisbasiclogic.

  • 8/10/2019 Creating Alarms

    2/15

    R

    a

    a

    a

    w

    m

    A

    s

    t

    fr

    o

    A

    r

    p

    B

    b

    ung1inFigu

    alarmifthe

    alogtempe

    internalbit

    ithanactual

    onitored

    by

    terstudying

    itchisturne

    ereforethe

    actionofas

    therPLClogi

    similarprobl

    ached101

    ocess,theo

    othproblem

    lowinFigur

    e231moni

    motorisno

    atureinput(

    ortagthat,

    outputthati

    an

    HMI

    inter

    Rung1inFi

    dON,thest

    otoralarm

    condmayn

    thatusesth

    emcanbes

    oronlyaspli

    eratormay

    describeda

    e232.

    Figu

    orsthemot

    runningwh

    N7:1)andal

    henON,ind

    lluminatesa

    ace

    system.

    ure231,yo

    tusinputfro

    willbeONfo

    tseemlike

    isalarminfo

    eninthesec

    tsecondcau

    notknowwh

    ovecanbe

    re231Basic

    ron/offswit

    ntheswitch

    rmsifthete

    icatesanabn

    light,sounds

    shouldsee

    mthemotor

    rafractiono

    uchbutitc

    mationorfa

    ondrungwit

    singthehigh

    athappened

    orrectedwit

    AlarmLogic

    chandcorre

    isintheON

    mperaturee

    ormalcondi

    ahorn,orle

    basicprobl

    starterdoes

    fasecondas

    ntriggerfal

    lselyturning

    htheoverte

    temperature

    .

    hsomesimp

    Example

    spondingmo

    position. Th

    ceeds100

    ion.Thisint

    ftasaninter

    mwiththis

    notchange

    themotorc

    ealarmstha

    onanalarm

    mperaturea

    alarmtotur

    lechangesto

    torstarterst

    secondrun

    .Inbothrun

    rnalbitorta

    nalmemory

    alarmlogic.

    tateimmedi

    ontactorcha

    tcancausep

    output.

    larm.Ifthet

    nONshuttin

    thealarmlo

    atusinputto

    monitorsa

    gstheoutpu

    gcanberepl

    ddressthat

    henthemo

    telyand

    gesstate.T

    roblemswit

    mperature

    gdownthe

    gicasshown

    set

    tis

    aced

    is

    tor

    is

  • 8/10/2019 Creating Alarms

    3/15

    In

    al

    Te

    t

    a

    a

    C

    C

    ci

    m

    t

    t

    thefirstrun

    armisactiva

    esecond

    ru

    ampleweh

    ealarmset

    tion. SeeCh

    normalmot

    APTURIN

    apturingand

    rcuitaswas

    eaningthea

    ealarmrete

    ischapter.

    ganOnDela

    tedwhichis

    nguses

    asea

    veusedthe

    ointbefore

    apter22for

    orcondition

    ALARM

    retainingala

    howninFig

    larmstatus

    ntiveassho

    Figur

    yTimer(TO

    noughtime

    lingcircuit

    to

    startpushbu

    thealarmca

    anexample

    .

    VENTS

    rminformati

    re232,Run

    illbelostift

    ninFigure2

    e232Enhan

    )hasbeena

    forthemoto

    seal

    in

    the

    a

    ttonasther

    bereset. T

    famotorfa

    oncanbedo

    g2andsome

    heprocessor

    33.Otherm

    cedBasicAl

    dedthatall

    rcontactort

    larmuntil

    th

    esetmethod

    estartbutt

    ltandmonit

    neinmultipl

    meanstore

    losespower

    ethods,such

    rmLogic

    wsforasm

    changesta

    ealarm

    is

    re

    .Ofcourse,t

    ncanberep

    oringlogict

    eways.Asim

    stthealarm.

    . Latchingin

    asmovingd

    lldelaybefo

    eandpreve

    etby

    the

    op

    hetemperat

    lacedwithal

    atcanbeus

    plemethodi

    Thismethod

    structionsca

    ata,willbed

    rethemotor

    tafalsealar

    rator.In

    our

    remustbe

    mostanyde

    dtoalarm

    stousease

    isnonreten

    beusedto

    iscussedlate

    m.

    elow

    ired

    ling

    tive,

    make

    in

  • 8/10/2019 Creating Alarms

    4/15

    Y

    T

    p

    S

    r

    m

    t

    c

    a

    c

    in

    c

    ti

    al

    uwillnotice

    isisdoneto

    shedwhile

    NALOGR

    meapplicat

    pidrateofc

    ove,andbit

    theevaluati

    angingthet

    alogvalue(

    angeisstor

    structionan

    rrentanalo

    merisdone.

    armonade

    inFigure23

    ensurethat

    healarm

    is

    s

    TEOFC

    ionsrequire

    angeandal

    instructions

    onperiod(3

    imerpreset

    8:1)thatwa

    dinF8:2an

    requiresac

    valuewhen

    Thislogicmo

    reasingrate

    Fi

    3thattheal

    thealarmre

    tillactive.

    ANGEAL

    hatanalogv

    rmifsucha

    ocreateara

    seconds).T

    alue.Rung4

    sstoredatth

    canbechan

    orrespondin

    thePLCisfir

    nitorsforap

    ofchangeor

    gure233La

    rmreset(u

    ainssetfor

    RMLOGI

    luessuchas

    conditionexi

    teofchange

    isevaluatio

    comparesth

    eendofthe

    gedtoanyd

    unlatchinst

    tstartedso

    ositive(incre

    bothifdesir

    tchingAlarm

    latch)rungi

    theentirePL

    C

    temperatur

    sts.Thelogic

    alarm.Rung

    periodcan

    ecurrentan

    lastevaluati

    esiredvalue.

    ructiontore

    hatafalseal

    asing)rateo

    d.

    Logic

    locatedabo

    Cprograms

    ,pressure,l

    inFigure23

    2inFigure2

    besettoany

    logvaluest

    nperiod.Th

    Thealarmo

    setthealarm

    larmisnotg

    fchange,wh

    vethealarm

    anifthestar

    vel,etc.be

    4usesatim

    4isafreer

    desiredvalu

    redinF8:0

    emaximum

    utputislatch

    .Rung1isu

    neratedthe

    ichcanbeea

    set(latch)ru

    tbuttonis

    onitoredfo

    r,compare,

    unningtimer

    ebysimply

    iththeprevi

    llowablerat

    edusingthe

    edtostoret

    firsttimethe

    silychanged

    ng.

    a

    set

    ous

    eof

    latch

    he

    to

  • 8/10/2019 Creating Alarms

    5/15

    Figur

    e234Rate fChangeAl rmLogic

  • 8/10/2019 Creating Alarms

    6/15

    E

    b

    e

    a

    yw

    d

    h

    T

    t

    d

    e

    T

    a

    b

    NNUNCIA

    rlyalarming

    ardsuseda

    gravedont

    nunciators

    t

    acknowledasacknowle

    pendingon

    doccurred(

    ePLCladde

    mperaturea

    scribedabo

    ampleonh

    eovertemp

    internalme

    ard.

    TORLOGI

    methodsus

    lightbehind

    ewindow.

    oulduseth

    ged

    by

    the

    oged,theala

    thestateoft

    flashing),wh

    logictomi

    larmaswas

    e. TheFlas

    wtoprogra

    eraturealar

    moryaddres

    C

    danannunc

    anopaquew

    hentheala

    eemodesto

    perator,

    the

    rmwindow

    healarm.Op

    icharestilla

    ictheearly

    howninFig

    hercontact

    thisflasher

    Figur

    couldbea

    smonitored

    iatorboardt

    indow.Theo

    mwasactiv

    indicatean

    larm

    windoouldstopfla

    eratorscoul

    tive(illumin

    nnunciators

    re232and

    isasecon

    .

    235Basic

    hardwiredo

    byanHMIth

    notifyoper

    paquewindo

    thewindow

    larmconditi

    would

    flashshingandeit

    monitorth

    ated),andw

    isshownFig

    ddedthene

    On/Offinte

    nnunciator

    tputtoalig

    athasbeen

    atorsofprob

    wwouldha

    wouldbeill

    n. Iftheala

    indicating

    therremainil

    annunciato

    ichwereno

    re235.Her

    cessarylogic

    rnalmemory

    ypeLogic

    tonanann

    rogrammed

    lems.These

    ethename

    minated. T

    rmhadbeen

    e

    problem.

    luminatedo

    boardandt

    tactive(non

    ewehaveus

    sothatthe

    address.See

    nciatorsboa

    tomimican

    annunciator

    fthealarm

    esealarm

    triggeredbu

    nce

    the

    alarturnoff

    ellwhichalar

    illuminated).

    edthesame

    larmfunctio

    Chapter22

    rdoritcould

    annunciator

    tnot

    m

    ms

    over

    nsas

    oran

    be

  • 8/10/2019 Creating Alarms

    7/15

    If

    B

    b

    w

    y

    a

    C

    In

    w

    h

    w

    T

    T

    s

    youonlyha

    utifyouhav

    comecumb

    aytohandle

    urecallfro

    thebitlevel

    hapter6wou

    theexampl

    ordsofdata.

    ndredsofal

    ord,file,and

    efirststepi

    Word

    Word

    unack

    Word

    Word

    stillac

    esecondst

    owninFigur

    eahandful

    morethan

    ersomerequ

    alargenum

    Chapter6

    tomakelogi

    ldbe

    strongl

    thatfollows

    Laterinthis

    armsatone

    bitwiseope

    stocreatefo

    1(N7:0)Raw

    2(N7:1)Curr

    owledged.

    3(N7:2)Ack

    4(N7:3)Una

    tive.

    pistoprogr

    e236.

    falarmstop

    handfulor

    iringaddition

    erofalarms

    DigitalLogic

    caldecisions

    yrecommen

    wewillprog

    chapterwe

    time. Wewil

    atorscanbe

    ur(4)intege

    Alarmsthi

    entAlarms

    owledgedAl

    cknowledged

    ameachofy

    Figure2

    rogram,the

    venafewh

    alprogramm

    istousebit

    atesthatd

    .Ifyouaren

    edbefore

    p

    ramthealar

    illshowho

    lusetheAlle

    used.

    memorywo

    wordconta

    containsall

    armsconta

    Alarmsco

    urrawalar

    36AlarmSt

    themethod

    ndredalarm

    ingtime,me

    iselogicalo

    igitallogicn

    tfamiliarwi

    oceeding.

    logicfor16

    youcantak

    nBradleyPL

    rds(16bit)a

    instheactua

    urrentalarm

    insthestatu

    tainsthest

    bitsusingo

    tusLogicUsi

    showninFi

    stodealwit

    moryusage,

    gwithword

    tationssuch

    thdigitallogi

    alarms(one

    ethisbasica

    C5forthise

    ndlabelasf

    lalarmbitss

    sthatareei

    sofallackno

    tusofallun

    neofthe16

    ngN7:0Bits

    ure235will

    ,thenthism

    andscantim

    andfilemov

    asAND,OR,

    cnotationst

    16bitword)

    pproachand

    xample,but

    llows:

    etinyourus

    heracknowl

    wledgedalar

    cknowledge

    bitsavailable

    workjustfin

    ethodmay

    e.Amuchbe

    einstruction

    XOR,etc.op

    henareview

    bymanipula

    dealwith

    nyPLCwith

    rprogram.

    dgedor

    ms.

    alarmsthat

    inwordN7:

    e.

    tter

    s. If

    erate

    of

    ting

    are

    0as

  • 8/10/2019 Creating Alarms

    8/15

    T

    w

    u

    u

    T

    2

    s

    ethirdstep

    eareusingt

    inglogicalo

    acknowled

    betterund

    8a(unackn

    ownforeas

    istoprogra

    oCompute

    eratorsint

    edalarmwo

    Figure

    rstandwhat

    owledged)a

    ofundersta

    thelogicto

    (CPT)instruc

    eexpression

    rds.

    37Logic

    to

    eachexpres

    dFigure23

    nding.

    Figure

    findallunac

    tionstoperf

    sofeachco

    FindUnackn

    ionisdoingi

    bforackno

    38aUnack

    nowledged

    rmthistask

    puteinstru

    owledgedan

    nthetwoCP

    ledgedalar

    owledgedAl

    ndacknowl

    .Youwillnot

    tiontoupda

    dAcknowled

    Tinstruction

    s.Onlythe

    armMatrix

    dgedalarms

    iceinFigure

    tetheackno

    gedAlarms

    srefertothe

    firstfivebits

    .InFigure23

    237thatwe

    ledgedand

    matrixinFi

    ofeachword

    7

    are

    ure

    are

  • 8/10/2019 Creating Alarms

    9/15

    In

    in

    stepfourw

    totheackno

    programth

    wledgedalar

    Figure

    elogictocle

    mwordwhe

    Figu

    238bAckn

    rtheunackn

    ntheackno

    re239Alar

    wledgedAla

    owledgedal

    ledgedpush

    Acknowled

    rmMatrix

    rmsandmo

    buttonispr

    geLogic

    vethecurre

    ssed.SeeFi

    talarms(N7

    ure239.

    :1)

  • 8/10/2019 Creating Alarms

    10/15

    S

    R

    in

    epfiveuses

    efertothem

    structionof

    anotherCPT

    atrixinFigur

    igure2310.

    instructiont

    Figur

    e2311tobe

    updatethe

    231016Bi

    tterunderst

    currentalar

    tAlarmLogic

    ndthelogic

    word(N7:1

    Example

    loperation

    ).SeeFigure

    eingperfor

    2310.

    edinthela

    tCPT

  • 8/10/2019 Creating Alarms

    11/15

    R

    al

    st

    b

    lo

    o

    T

    t

    p

    m

    cpl

    u

    N

    c

    c

    ungs3,4and

    armsuchas

    ate.Thisinfo

    ards,or

    sou

    gicisthatit

    nescan.

    ULTIPLE

    increaseth

    peinstructio

    ograminFig

    onitorthest

    angingthe

    l

    antoincrea

    acknowled

    7:0through

    ntainthest

    ntainsallac

    5inFigure2

    hetherthe

    rmationcan

    ndingahorn

    peratesina

    LARM&

    numberof

    nsthatoper

    ure2312re

    atusof80(1

    ngthor

    wor

    ethenumbe

    edandackn

    7:4contain

    tusofallcur

    knowledged

    Fig

    310monito

    alarmhasbe

    beusedinm

    ifthere

    are

    singlescana

    EVENTCA

    alarms(abov

    teonmultip

    lacestheCP

    x5)alarms.

    dsto

    operate

    rinthefutur

    wledged)as

    therawalar

    rentalarms,

    alarmsandN

    ure2311Cu

    all16alarm

    enacknowle

    anydifferent

    nyunackno

    ndwilltrapt

    PTURING

    esixteen)is

    lewordsato

    T,MOV,and

    oucanincre

    on.

    It

    is

    reco

    ethatyoucr

    showninFig

    sthatarep

    bothacknow

    12:0through

    rrentAlarms

    sandprovid

    ged,unackn

    wayssucha

    ledgedalar

    hestatusof

    OGIC

    simplemat

    netimesuch

    CLRinstructi

    aseordecre

    mmendedt

    eateasepar

    ure2312.

    ogrammedi

    ledgedandu

    N12:4theu

    Matrix

    theuserwi

    owledged,o

    sturningon

    s.The

    real

    nyalarmev

    erofreplaci

    astheAllen

    onswithFAL

    asethenum

    atif

    you

    hav

    tefileforea

    ntotheuser

    nacknowled

    nacknowled

    hstatusinfo

    rcurrentlyin

    arninglight

    enefitto

    thi

    nifthealar

    gtheCPTin

    BradleyFAL

    ,COP,andFL

    erofalarms

    ealarge

    nu

    chalarmsta

    PLClogic.N1

    ed.N11:0th

    edalarms.

    rmationone

    anactiveala

    sorannunci

    type

    of

    alar

    wasonlyo

    structionswi

    instruction.

    Linstruction

    bysimply

    berof

    alar

    us(raw,curr

    0:0through

    roughN11:4

    ach

    rm

    tor

    for

    thfile

    he

    sthat

    sor

    ent,

    10:4

  • 8/10/2019 Creating Alarms

    12/15

    Figure2312AlarmLogicExampleForUpTo80Alarms

  • 8/10/2019 Creating Alarms

    13/15

    TheresetoutputinstructionthatfollowseachFALinstructionensuresthattheFALisresetbeforethenext

    programscansothatnoalarmsarelost.

    Theexamplesshownsofarinthischapterareonlysomeofthemanywaysthatalarminginformationcanbe

    handledinthePLC.MostHMIsystemstodayhaveveryextensivealarmingandeventrecordingcapabilities

    thatmakeprogrammingalarmlogicinthePLCalmostobsolete.Thequestionsyoumustaskyourselfis,does

    theHMIupdatefastenoughtocaptureyouralarmswithoutaddingadditionalPLClogic.

    ALLENBRADLEYLOGIX5000ALMD&ALMAINSTRUCTIONS

    TheAllenBradleyLogixfamilyofPLCprocessorshastwoalarm/eventinstructionsdesignedspecificallyfor

    monitoringdigitalandanalogdataforabnormalconditionsasprogrammedbytheuser. TheseLogixbased

    alarminstructionsareavailableforuseinrelayladder,structuredtext,andfunctionblockdiagramprograms.

    Theadvantagetousingthesetwoinstructionsisthatwhenanalarmisdetected,thecontrollerwillpublish

    theeventtoFactoryTalkViewAlarmsandEventsserversthatpropagatealarmstoFactoryTalkViewSE

    clients(HMIs)thatsubscribetoreceivenotifications.

    TheDigital

    Alarm

    (ALMD)

    instruction

    detects

    digital

    alarms

    based

    on

    Boolean

    (true/false)

    conditions.

    The

    instructionisanoutputinstructionthatobtainsitsalarmconditionfromtherungcondition.Someofthe

    featuresoftheALMDinstructionsincludealarmacknowledge,latch,minimumdurationtimer,alarm

    counter,timestamp,severity,etc.. Figure2313Rung1showsandexampleoftheALMDinstruction.

    TheAnalogAlarm(ALMA)instructiondetectsanalogalarmsbasedonthelevelorrateofchangeofananalog

    value.Theinstructionisanoutputinstructionandistypicallyplacedonanunconditionalrung.Someofthe

    featuresoftheALMAinstructionsincludealarmacknowledge,highandhigh/highlimits,lowandlow/low

    limits,deadband,rateofchange,minimumdurationtimer,alarmcounter,timestamp,severity,etc.. Figure

    2313Rung2showsanexampleoftheALMAinstruction.

    Becauseof

    the

    many

    features

    of

    both

    of

    these

    instructions

    it

    is

    not

    practical

    to

    include

    acomplete

    descriptionhere.Pleaserefertothemanufacturersinstructionmanualforacompletedescription.

  • 8/10/2019 Creating Alarms

    14/15

    C

    al

    c

    p

    p

    al

    u

    al

    ta

    hapterSu

    anyPLCapp

    armingis

    pr

    henprogra

    ptured,ann

    ogrammedi

    ogramislar

    armsatone

    commonto

    arms.

    ostHMIsyst

    eneed

    for

    P

    ddatafiles

    mmary

    licationsreq

    vided,mach

    mingalarm

    nciated,ack

    nconjunctio

    ewithman

    timewhich

    findPLCpro

    emstodayh

    LCprogram

    hatcontain

    igure2313

    iresomefor

    ineor

    proces

    logic,thepro

    nowledged,

    withthelo

    alarmsitma

    illsavetime,

    ramsthath

    veextensive

    edalarm

    log

    hemachine

    llenBradle

    mofalarmin

    sdown

    time

    grammersh

    ndreset.In

    icthatcontr

    ybeeasiert

    increasePL

    vebeencre

    alarmingan

    ic.These

    HM

    rprocessin

    ALMDand

    gwhenabno

    canbe

    mini

    uldtakeint

    mallPLCpro

    lsthemachi

    creatededi

    scantime,a

    tedwithde

    deventcapt

    Isystems

    ca

    ormationsu

    LMAInstruc

    rmalconditi

    izedwhich

    i

    considerati

    gramapplic

    ineorproces

    catedalarml

    nddecrease

    icatedprogr

    ringfeature

    be

    program

    chaspressur

    tions

    nsoccur.W

    nturn

    increa

    nhowalarm

    tionstheala

    s.Ontheoth

    logictoproc

    memoryusa

    amfilesforj

    sthatcanre

    medto

    moni

    e,level,runn

    enadequat

    sesproducti

    swillbe

    rmlogiccan

    erhand,ifth

    ssandupda

    e.Itisnot

    sthandling

    uceorelimi

    torthe

    PLC

    t

    ing,fault,et

    ity.

    be

    ePLC

    eall

    ate

    ag

    .

  • 8/10/2019 Creating Alarms

    15/15

    R

    eviewQu

    1. What

    2. Howd

    3.

    Write

    100F

    4.

    In

    Figu5. Inthe

    stions

    pairofPLCin

    oesthelogic

    thealarmlo

    .

    re

    23

    12

    whPLClogicbel

    structionsca

    alXORinstru

    icthatwillal

    t

    would

    you

    w,whenwil

    nbeusedto

    ctionwork?

    armifaproc

    change

    to

    inltheflowala

    captureand

    esstempera

    rease

    the

    nrmbeactive

    retainalarm

    ureshouldri

    mber

    of

    alar?

    ?

    seabove25

    ms

    to

    128?

    Forfallbelow