Abclx Driver Help
Abclx Driver Help
Citect Pty. Limited 3 Fitzsimons Lane PO Box 174 Pymble NSW 2073 Australia Telephone: 61 2 9496 7300 Fax: 61 2 9496 7399
DISCLAIMER Citect Corporation makes no representations or warranties with respect to this manual and, to the maximum extent permitted by law, expressly limits its liability for breach of any warranty that may be implied to the replacement of this manual with another. Further, Citect Corporation reserves the right to revise this publication at any time without incurring an obligation to notify any person of the revision. COPYRIGHT Copyright 2004 Citect Corporation. All rights reserved. TRADEMARKS Citect Pty. Limited has made every effort to supply trademark information about company names, products and services mentioned in this manual. Trademarks shown below were derived from various sources. Citect, CitectHMI, and CitectSCADA are registered trademarks of Citect Corporation. IBM, IBM PC and IBM PC AT are registered trademarks of International Business Machines Corporation. MS-DOS, Windows, Windows 95, Windows NT, Windows 98, Windows 2000, Windows for Workgroups, LAN Manager, Microsoft Windows XP, Excel and MSMAIL are trademarks of Microsoft Corporation. DigiBoard, PC/Xi and Com/Xi are trademarks of DigiBoard. Novell, Netware and Netware Lite are registered trademarks of Novell Inc. dBASE is a trademark of Borland Inc. GENERAL NOTICE Some product names used in this manual are used for identification purposes only and may be trademarks of their respective companies. July 2004 edition for CitectSCADA Version 6.0 Manual Revision Version 6.0. Printed in Australia.
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Installing the ABCLX driver pack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Preparing the ControlLogix system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Setting up communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Creating a test project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Setting up an Exclusive Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Configuring your project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Adding devices to your CitectSCADA project . . . . . . . . . . . . . . . . . . . . . . . . . 6 Adding tags to your CitectSCADA project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Individual tag addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Array tag addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Addressing program tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Configuring Quality and Timestamp tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Advanced configuration and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Customizing a project using Citect.ini parameters . . . . . . . . . . . . . . . . . . . . 20 Using a route path to locate a remote CPU. . . . . . . . . . . . . . . . . . . . . . . . . . 25 Configuring Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Performance tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Session Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Status tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Mode detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Identifying bad tags using FailOnBadData . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Scan rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Hardware Alarms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 The SysLog.DAT file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Driver Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Citect Kernel diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Maintaining the project database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Tag-based driver considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
iv
Contents
ABCLX driver
Introduction
CitecthasdevelopedtheABCLXdrivertoenableEthernetbased communicationbetweenCitectSCADAandControlLogixsystemcontrollers. ThisHelpfileprovidestheinformationrequiredtosetupandconfigure communicationwithaControlLogixsystem.Thisinvolvesafourstepprocess. 1 2 3 4 InstallingtheABCLXdriverpack PreparingtheControlLogixsystem Settingupcommunications Configuringyourproject
ThereisalsoadditionalinformationonAdvancedconfigurationand maintenanceissuesandaTroubleshootingsectiontohelpresolve communicationorconfigurationerrors. About ABCLX CitectSCADAconnectstotheControlLogixsystemPLCsusingEthernet/IPwith theABCLXdriver.ItcanbeinstalledinparallelwithafunctionalControlLogix system,allowingengineeringandtestingtobeconductedwithoutanyimpact onoperation. Noadditionalhardware(otherthananEthernetmodule)isrequiredforthe ControlLogixsystem.ThisallowsyoutoreplaceControlViewoperatorstations onastepbystepbasis. Note:Priortoversion3,theABCLXdriver(thenknownastheABLogixdriver) wasinstalledasaTCP/IPboarddriver.Sinceversion3,thedriverhasbeen installedasanABCLXtypeboarddriver. Ifyouareupgradinganexistingprojectwhichusedaversion2.xABLogix driver,youwillneedtoaltertheboardtypeinyourexistingprojecttoABCLX type.Additionally,theformatusedfortheportdefinitionintheSpecialOptions fieldoftheCitectSCADAPortsFormhaschanged.SeeABCLXrecommended settings. Warning!TheABCLXisatagbaseddriver,whichmeansyouneedtobeaware ofthewayOIDs(objectidentifiers)areimplementedtoavoidpotential mismatchesoccurring.Thisisaparticularconcernwithnetworkdistributed systemswhenattemptingactivitiessuchaseditingvariabledatabasesor restoringaprojectonadifferentcomputer.Itishighlyrecommendedthatyou
ABCLX driver Software requirements YouwillneedtohaveaccesstoRockwellsRSLogix5000EnterpriseSeries controllerconfigurationsoftware(obtainablefromyourControlLogixsystem supplier)anditsassociatedtools.Thissoftwareprovidesaccesstocontroller configuration,projectcode,tagdefinitionsanddatavalues.Useitto: 1 2 3 ConfigureeachEthernetModuleIPaddress Createtagsforeachcontroller Downloadtheprojectstothecontrollers.
Setting up communications
BeforeconfiguringyourCitectSCADAproject,itisrecommendedthatyoufirst establishandconfirmcommunicationbetweenCitectSCADAandthedevicesin yourControlLogixsystem.Thisallowsyoutotestthecommunicationpathin isolation,andensuresthatCitectSCADAcanbringyourdevicesonline. ThebestwaytoachievethisisbyCreatingatestproject.Ifyouwantto communicatewiththeaLogix5000PLCusinganexclusiveserialconnection, seeSettingupanExclusiveConnection. Note:TheABCLXwillnotperformonaveryslownetwork,oranetworkthat hasaninconsistentconnectiontoanI/Odeviceinthefield(forexample,a wirelessordialupconnection).Thisisduetothefactthedriverdownloadsall thetagsfromthePLCandsubscribesthembeforeitcomesonline.Attemptingto dothisoveraslownetworkcantakealongtimeandwillcausethedriverto timeoutonstartup.
ABCLX driver projectcoulddonothingmorethanuseanintegervariabletodisplayanumber onagraphicspage. Onceyouhaveusedyourtestprojecttoconfirmcommunications,itcanbeset asideforfurthertestingatalaterdate. Note:YoushouldbuildyourtestprojectontheCitectSCADAI/Oserverthat willconnecttotheControlLogixsystem. Tocreateacommunicationstestproject: 1 2 InCitectExplorer,createanewprojectandgiveitanappropriatename. Addthedeviceyouwouldliketocommunicatewithtotheproject. Typically,theinformationrequiredaboutadevicecanbegatheredby runningtheExpressCommunicationsWizard,whichimplementsasetof recommendedsettingsforthetypeofdeviceyouselect. TolaunchtheWizard,gototheCitectProjectEditorandselectExpress WizardfromtheCommunicationsmenu. 3 ProgressthroughtheWizard,acceptingalldefaultsforanI/Oserverandan I/Odevice.ThiswillcreateanI/OservernamedIOServer,andanI/O DevicenamedIODev. Note:Ifyourequireadditionalinformationaboutaparticularstep,usethe Helpbutton. 4 WhenyoureachtheI/ODeviceSelectionpage,locatethedeviceyouwould liketocommunicatewith;forexample,AllenBradley|Controllogix5550| Ethernet(TCP/IP). ContinuethroughtheWizard,untilyourreachthelastpage.ClickFinishto implementtheWizardssettings. RuntheComputerSetupWizard,acceptingthedefaultstomakethe computerastandaloneCitectSCADAsystemconfiguredtorunyourtest project. GototheCitectProjectEditorandopenthePortsformfromthe Comunicationsmenu.IntheSpecialOptionsfield,typeintheIPaddressof theEthernetmoduleontheControlLogixPLC,appendedwithaforward slash/andtheslotnumber(zerobased)ofthebackplancecontainingthe controllerCPUmodule.Theformatshouldbe:
x.x.x.x/n
5 6
forexample:
192.168.0.1/1
IftheCPUisonslotzeroofthebackplane,youdonotneedtoinclude/0.
See Also
SettingupanExclusiveConnection CitectSCADAisabletocommunicatewiththeserialportonaLogix5000series processorviathe1761NET_ENImodule.Thisisreferredtoasanexclusive connection. Aswithanymethodofcommunicationtoadevice,youshouldcreateatest projectforanexclusiveconnectionsothatanycommunicationerrorscanbe easilyidentified. Tosetupaserialcommunicationstestproject: 1 Configurethe1761NET_ENImodule.RefertoMicroLogixEthernetInter face(Cat.No.1761NETENI)UserManualfordetailsonhowtoconfigure themodule. InCitectExplorer,createanewprojectandgiveitanappropriatename. Addthedeviceyouwouldliketocommunicatewithtotheproject. Typically,theinformationrequiredaboutadevicecanbegatheredby runningtheExpressCommunicationsWizard,whichimplementsasetof recommendedsettingsforthetypeofdeviceyouselect. TolaunchtheWizard,gototheCitectProjectEditorandselectExpress WizardfromtheCommunicationsmenu. 4 ProgressthroughtheWizard,acceptingalldefaultsforanI/Oserverandan I/Odevice.ThiswillcreateanI/OservernamedIOServer,andanI/O DevicenamedIODev. Note:Ifyourequireadditionalinformationaboutaparticularstep,usethe Helpbutton. 5 WhenyoureachtheI/ODeviceSelectionpage,locatethedeviceyouwould liketocommunicatewith;forexample,AllenBradley|Controllogix5550| Ethernet(TCP/IP). ContinuethroughtheWizard,untilyourreachthelastpage.ClickFinishto implementtheWizardssettings. OpenthePortsFormfromtheCommunicationsmenuinCitectEditor.Type intheIPaddressof1761NET_ENImoduleinSpecialOptfield. SetupExclusiveConnection=1andRoutePathinCitect.ini:
[ABCLX] ExclusiveConnection=1 IOServerName.IOPortName.RoutePath=/P:3/A:1
2 3
6 7 8
ABCLX driver Therearetwomethodsavailableforaddingadevice: AddingadeviceusingtheExpressCommunicationsWizard Manuallyconfiguringadeviceconnection Inmostcases,completingtheExpressCommunicationsWizardissufficientto setupyourcommunications,asthesettingsitimplementsforeachdevicehave beenpreconfiguredforpreferredoperation.If,however,yourdevice connectionneedsarecomplex,youcanreconfigurecommunicationsby manuallyconfiguringtheCitectSCADAcommunicationforms. Adding a device using the Express Communications Wizard 1 2 TolaunchtheWizard,gototheCitectProjectEditorandselectExpress WizardfromtheCommunicationsmenu. ProgressthroughtheWizard,fillingintheappropriateinformationfortheI/ OserverandI/Odevice. Note:Ifyourequireadditionalinformationaboutaparticularstep,usethe Helpbutton. 3 WhenyoureachtheI/ODeviceSelectionpage,locatethedeviceyouwould liketocommunicatewith;forexample,AllenBradley|Controllogix5550| Ethernet(TCP/IP). ContinuethroughtheWizard,untilyourreachthelastpage.ClickFinishto implementtheWizardssettings.
Manually configuring a device connection Inmostcases,theExpressCommunicationWizardwillbesufficienttosetup communicationwithadevice.However,iftheconfigurationofadeviceentails unusualcircumstances,youcanmanuallyinputinformationintotherequired formsinProjectEditor. Note:YoushouldconsidertheABCLXrecommendedsettingswhenmanually configuringaconnectiontoaControlLogixdevice. TomanuallyconfigureCitectSCADAcommunications: 1 2 DefineanI/OserverusingtheI/OServerform.ThissetsthenameoftheCit ectSCADAserverthattheI/Odevicewillcommunicatewith. CompletetheBoardsform.Thisformdefineswhichboard(onyour CitectSCADAcomputer)touseforcommunication,suchasthemother board,networkcard,serialboardoraPLCcommunicationcard. CompletethePortsform.Oftenboardshavemultiplecommunicationports, andyoumustspecifytheporttouse.Somemodernequipmentcanhavea numberoflogical(virtual)portsassignedtotheonephysicalport.
ABCLX recommended settings Thefollowingtablesshowtherecommendedsettingsforcommunicationwitha ControlLogixdevice.ThesearethesettingsimplementedbytheExpress CommunicationsWizardontheBoardsform,PortsformandDevicesform. Boards form TheBoardsformlistsallboardsusedintheCitectSCADAproject. Eachboardrecorddefinesaseparateboardwithintheproject.
Field Board Name Value A unique name (up to 16 alphanumeric character) per server for the computer board being used to connect with the device. This is used by CitectSCADA in the Ports form. The type of board. Select ABCLX from the drop-down list (see Note below). This field must be "0" (zero). Leave this field blank. Leave this field blank. Leave this field blank. Any useful comment. This is viewed in the Boards records database in Citect Project Editor.
Port Number
ABCLX driver
Field Data Bits Stop Bits Parity Special Options Value Leave this field blank. Leave this field blank. Leave this field blank. The IP address of the Ethernet module on the ControlLogix system PLC, appended with a forward slash and the slot number (zero based) of the backplane containing the controller CPU module, in the format: x.x.x.x[/n]. For example: "192.168.0.1/0" (See Note below.) Any useful comment. This is viewed in the Boards records database in Citect Project Editor.
Comment
Number
Address
10
ForCitectSCADAtocompilecorrectly,youmustincludeappropriatevaluesfor thefollowingfields:.
Field Variable Tag Name Value A unique name per project for the variable tag (up to 79 alphanumeric characters in Version 6, 32 characters for earlier versions). This can be used by CitectSCADA graphic pages and in Cicode where defined. The type of variable. Select from the drop-down menu. It must be one of the predefined types used in CitectSCADA. The name of an I/O Device defined in the I/O Devices form which is used to identify the ControlLogix PLC controller (CPU module). The name of a predefined ControlLogix system PLC tag, either individually addressed, array addressed or addressed as part of a program.
Data types
11
Forexample,iftheControlLogixtagyouareaddressingusesafloatdatatype, youshouldselectrealintheDataTypefieldoftheVariableTagsform. Note:CitectSCADAreadsastringdatatypefromtheControlLogixPLCasa nullterminatedstring.Therefore,ifyouneedtoreada12characterstring,you willhavetoconfigurethestringlengthonthePLCtoatleast13charactersto allowforthenullcharacter. Data Coercion TheABCLXdriveralsosupportsanumberofdataconversionsfromaCitect datatypetoanativePLCdatatype.However,asitispossibletocoercefroma largedatatypetoasmalleroneinbothdirections,caremustbetakentoensure thattherangeofthesmallertypeisalwaysrespected,otherwisethedriverwill returnBAD_DATA_TYPEbacktoCitect.Itisrecommendedyouonlyrelyon theseconversionswherecircumstancesdemandit.
12
SingleDigital
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type SingleBoolean BOOLEAN SingleBoolean SingleBoolean DIGITAL
13
Single7thbitfromfourthiteminalongarray
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type LongArray DINT[256] SingleBit_3_7 LongArray{3}/7 DIGITAL
Using bit access notation vs aliasing booleans YoucangaindramaticperformancebenefitsbyusingABCLXbitaccesssyntax insteadofaliasingbitsinthePLC.Formoreinformationonwhy,seearticle Q4064theCitectSCADAKnowledgeBase.TheKnowledgeBasecanbeinstalled fromtheCitectSCADACD,ordownloadedfromtheCitectwebsite (www.citect.com). See Also Arraytagaddressing Addressingprogramtags ArrayscanexistintheControlLogixsystemPLCand/ortheCitectSCADAtag database. WithintheControlLogixsystemPLC,theyaredefinedusingtheRSLogix5000 EnterpriseSeriesconfigurationsoftware.SeePreparingtheControlLogix system. CitectSCADAaccessesthetagarrayswithintheControlLogixsystemPLCsvia theAddressfieldoftheVariableTagsformforeachtagortagarray.Equally,the waytodefineCitectSCADAtagarraysisalsotousetheAddressfieldofthe CitectSCADAVariableTagsformforeachtagarrayrequiredinCitectSCADA. Note:CitectSCADAtagarraysaresimple,notcomplex,arrays.Thismeansthey canonlycontainelementsofthesamedatatype;forexample,adigitaltagarray inCitectSCADAwillonlyincludedigitaltypevariables. Tagarrayscanbeextremelyflexibleandquitecomplicated.Itispossibleto declareatagarrayinCitectSCADAwhichmapstoatagarrayinaControlLogix systemPLC,orwhichmapstoacontiguoussequenceoftags(ofthesamedata type)whichmayormaynotbedefinedasatagarrayintheControlLogix systemPLC.
14
Where:
<TagName> = {}= <IndexNumber> = the ControlLogix tag name as defined on the ControlLogix system PLC; the required braces to define the array element index; the zero-based index number of the array element.
Note:WithversionsofCitectSCADApriortoversion6,curlybrackets{}were requiredwhenaddressingarrays.Thisisnolongerthecase,asVersion6 supportstheuseofbothcurlybracketsandsquarebrackets[]. Individual tag address type mapping YoushouldmatchthedatatypeoftheCitectSCADAvariabletagwiththedata typeofthemappedControlLogixsystemPLCtagasperthefollowingtable:
ControlLogix Data Description BOOL SINT INT DINT REAL String structure (see Note below) or STRING (supplied by RSLinx) Citect Address Format <TagName>{<IndexNumber>} <TagName>{<IndexNumber>} <TagName>{<IndexNumber>} <TagName>{<IndexNumber>} <TagName>{<IndexNumber>} <TagName>{<IndexNumber>} Access rights R/W R/W R/W R/W R/W R/W CitectSCADA Data Type DIGITAL BYTE INTEGER LONG REAL STRING
15
Mapping to more than an individual element of an array CitectSCADAcanonlyhandlesimple(sametype)arraysofupto256bytesin length,sowhendeclaringvariablearraystoaccessControlLogixsystemPLC arrays(ordatastructureslargerthan256bytes),youwillneedtosplittheminto smallerstructuresoflessthan256bytes.Forexample,youllneedtodeclare multiplevariablearrayseachaccessingaseparate256byteportionofthelarger structure. Tomaptoaportionofanarraygreaterthanasingletag,youidentifythe startingpositionforthearray,andthesizeofthearraytomapusingthesyntax:
<TagName>/<ArrayOffset>!A[<ArraySize>]
Where:
<TagName> = /<ArrayOffset> = the ControlLogix tag name as defined on the PLC the zero based offset of the item index used within the PLC (not on bit widths or other sizes) representing the starting point for the tag array value (optional) the zero based array size to return using the item count within the PLC, (not on bit widths or any other sizes)
!A<ArraySize> =
Note:ThearrayoffsetvalueisazerobaseditemcountusedwithinthePLCto definethestartofthearraystructurewhichisbeingmappedtothe CitectSCADAvariabletagarraybeingdeclared.Thearraysizevalueisa continuationofthesamecountandisusedtodefinethesizeofthearray structurebeingmappedtotheCitectSCADAvariabletagarraybeingdeclared. Theyareusedtogethertodeterminethestartandendpointsofthevariabletag arraydataintheControlLogixsystemPLCwhichwillbemappedtoforthe CitectSCADAvariabletagarraybeingdeclaredintheCitectSCADAVariable Tagsform. CitectSCADAignoresallcharactersfollowinganexclamationmark!inthetag addressfield,sothattagbaseddriversliketheABCLXdrivercanusesquare bracketsinthetagaddressfordevicearrayaddressing.Therefore,youmust precedeanarrayaddressschemawithanexclamationmarkwhendefiningan arrayinaCitectSCADAvariabletagaddress.
16
ABCLX driver Mapping data types for array tag addressing YoushouldmatchthedatatypeoftheCitectSCADAvariabletagarraywiththe mappedControlLogixPLCtagarrayasperthefollowingtable:
ControlLogix Data Description Array of BOOL Array of SINT Array of INT Array of DINT Array of REAL Citect Address Format <TagName>/<ArrayOffset>!A[<ArraySize>] <TagName>/<ArrayOffset>!A[<ArraySize>] <TagName>/<ArrayOffset>!A[<ArraySize>] <TagName>/<ArrayOffset>!A[<ArraySize>] <TagName>/<ArrayOffset>!A[<ArraySize>] Access rights R/W R/W R/W R/W R/W Citect Data Type DIGITAL array BYTE array INTEGER array LONG array REAL array
Examples
Configurationofanarrayof128integers
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type IntegerArray INT[128] IntegerArray_128 IntegerArray!A[128] INT
Configurationofanarrayof64floatsoffsetby32items
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type LargeFloatArray FLOAT[256] LargeFloatArray_32_64 LargeFloatArray/32!A[64] FLOAT
Configurationofanarrayofdigitalswithinastructure
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type SingleStructure.BooleanArray BOOLEAN[2048] SingleStructureBooleanArray SingleStructure.BooleanArray!A[2048] DIGITAL
Configurationofanarrayof256bytes,offsetby256itemswithinanarrayof structuresatelement32
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type StructureArray.LargeByteArray SINT[1024] StructureArray_32_LargeByteArray_256_256 StructureArray{32}.LargeByteArray/256!A[256] BYTE
See Also
Addressingprogramtags
ABCLX driver
17
Examples
SingleBytewithinastructureinprogramMyProgram.
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type MyProgram.SingleStructure.SingleByte SINT MyProgram_SingleStructure_SingleByte PROGRAM:MyProgram.SingleStructure.SingleByte BYTE
SingleDigitalinprogramMyProgram
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type MyProgram.SingleBoolean BOOLEAN MyProgram_SingleBoolean PROGRAM:MyProgram.SingleBoolean DIGITAL
SingleintegerwithinanarrayofintegersinprogramMyProgram
PLC Tag Address PLC Tag Type Citect Tag Name Citect Tag Address Citect Tag Type MyProgram.IntegerArray[5] INT MyProgram_IntegerArray_5 PROGRAM:MyProgram.IntegerArray{5} INTEGER
TheCitectSCADAABCLXdrivercanuseadditionalvariabletagsforqualityand timestampvalues.Qualityortimestamptagsareduplicatesofavariabletag, withanappended!Qor!Tor!Mintheaddressfieldtodefinetheir purpose.TheirdatatypeneedstobeLongtoenablethemtostoreaqualityor timestampvalue. Hint:ThequickestwaytocreateaQualityorTimestamptaginCitectSCADAis tolocatetherelevantvariabletagusingtheVariableTagsform,edititas requiredtocreateaqualityortimestamptag,andsaveit.Thiscreatesacopyof theoriginalvariabletagwiththerequiredchangessaved. TocreateaQualitytag: 1 2 OpentheVariableTagsforminProjectEditor(gototheTagsmenuand selectVariableTags). Createanewvariabletag,orlocateanddisplaythetagthatyouwantto associatethequalitytagwith.
18
ABCLX driver 3 IntheVariableTagNamefield,enteranappropriateanduniquenamefor thequalitytag.Commonpracticesuggestsusinganamesuchas <Tagname>_Quality. IntheDataTypefield,selectLongfromthedropdownmenu(ifnotalready selected). IntheI/ODeviceNamefield,selecttheappropriateI/ODeviceforthetag (ifnotalreadydisplayed). IntheAddressfield,enterthenameofthetagyouwanttoassociatewiththe qualityvalue(ifnotalreadydisplayed),andappend!Qdirectlytotheend oftheaddress(withoutthequotesandwithoutanyspaces). ClickAdd.
4 5 6
Qualitytagsettingsforanarrayof256bytes,offsetby256itemswithinanarray ofstructuresatelement32:
Citect Tag Name Citect Tag Address Citect Tag Type StructureArray_32_.LargeByteArray_256_256_Quality StructureArray{32}.LargeByteArray/256!A[256]Q LONG
ABCLX driver TocreateaTimestamptag: 1 2 3 OpentheVariableTagsforminProjectEditor(gototheTagsmenuand selectVariableTags). Createanewvariabletag,orlocateanddisplaythetagthatyouwantto associatethetimestamptagwith. IntheVariableTagNamefield,enteranappropriateanduniquenamefor thetimestamptag.Commonpracticesuggestsusinganamesuchas <Tagname>_sTimestamp(forseconds)or<Tagname>_msTimestamp(for milliseconds). IntheDataTypefield,selectLongfromthedropdownmenu(ifnotalready selected). IntheI/ODeviceNamefield,selecttheappropriateI/Odeviceforthetag(if notalreadydisplayed). IntheAddressfield,enterthenameofthetagyouwanttoassociatewitha timestampvalue(ifnotalreadydisplayed),andappend!Tor!M(as appropriate). Note:Ifthereisalreadyanexclamationmarkwithotherdeclarations includedinthetagaddress,youdonotneedtoincludethemfor timestamping.Forexample,atimestamptagmonitoringTagName!A[64] canbeaddressedasTagName!T. 7 ClickAdd. Note:Timestampsstorethenumberofsecondssince01/01/1970whenusingthe !Telement,orthenumberofmillisecondssincemidnightusingthe!M element.Ifyouwanttostoreacompletetimeinmillisecondaccuracy,youmust createtwoseparatetimestamptags,oneforsecondsandoneformilliseconds, eachaddressedappropriately. Examples TimestamptagsettingsforasinglelonginrootofPLC:
Citect Tag Name Citect Tag Address Citect Tag Type SingleLong_msTimestamp SingleLong!M LONG
19
4 5 6
Timestampsettingforanarrayof256Bytesoffsetby256itemswithinanarray ofstructuresatelement32:
Citect Tag Name Citect Tag Address Citect Tag Type StructureArray_32_.LargeByteArray_256_256_sTimestamp StructureArray{32}.LargeByteArray/256!T LONG
Note:Atimestampvalueisbasedonthetimeavaluechangeisdetectedbythe ABCLXdriverinUTCtime,sothetimestampisonlyasaccurateasthepolling
20
Citect.INIparametersareusedtotunetheperformanceoftheCitectSCADA ABCLXdriverandperformruntimemaintenancediagnostics. YoucancustomizethewayCitectSCADAcommunicateswiththeControlLogix system,andevenindividualPLCs,bycreatingoreditingthe[ABCLX]sectionof theCitect.INIfileforyourproject. TherearesomecommonCitectSCADAdriversettings,andcustom CitectSCADAABCLXdriversettings. WhenCitectSCADAstartsatruntime,itreadsconfigurationvaluesfromthe Citect.INIfilestoredlocally.Therefore,anyControlLogixconfigurationsettings mustbeincludedintheCitect.INIfilelocatedonthecomputeractingastheI/O servertotheControlLogixsystem. Note:Bydefault,CitectSCADAlooksfortheINIfileintheCitectSCADAproject \Bindirectory.Ifitcantfinditthere,itwillsearchthedefaultWindows directory. Warning!Thedefaultvaluesfortheseparametershavebeendetermined(during driverdevelopmentandtesting)tobethebestvaluefortheCitectSCADA ABCLXdriver.Alloftheseparametersdefaulttoavaluetestedtoworkinmost cases.Youshouldcarefullyconsideradjustingthesedefaultvaluesexceptonthe directadviceofCitectCustomerSupport.
ABCLX driver Global and device-specific parameters Parametersgroupedbeneaththe[ABCLX]generalcategoryareglobaland impactallControlLogixsystemPLCs.Youcan,however,overrideaglobal parameterwithadevicespecificparameter. DevicespecificparametersdefinethesettingsforaparticularControlLogix systemPLC.ThesyntaxfordefiningadevicespecificABCLXdriverparameter is:
[<IOServerName>.<IOPortName>]
21
Where:
<IOServerName> = <IOPortName> = the name of the I/O server the name of the I/O port (as defined on the I/O Ports form) which is connected to the ControlLogix system Ethernet/IP network
WiththecurrentreleaseoftheABCLXdriver,therearedevicespecific parametersyoucanusetooverrideglobalparameters;theyare: ExclusiveConnection FailOnBadData ForwardOpenPoolSize InactiveScanAdjust LogTagInfo LogTagInfoPath MissedPollTolerance StatusTag ScanRate Formoredetails,seeDriverspecificCitect.INIparameters Examples Implementationofglobalparameters:
[ABCLX] Watchtime=5 ScanRate=1000
Implementationofadevicespecificparameter:
[CLServer.CLServerPort] ScanRate=500
22
Description A value (bytes) used by the CitectSCADA I/O server to determine if two or more packets can be blocked into one data request before being sent to the ABCLX driver. The period (in milliseconds) to wait between receiving a response and sending the next command to the I/O server. The maximum number of pending commands that the CitectSCADA ABCLX driver holds ready for immediate execution. The polling service time (in milliseconds) at which cached data is updated. Recommended to be at least twice that of the value used in the Citect.INI [ALARM] ScanTime parameter . The number of times to retry a command after a timeout. Specifies how many milliseconds to wait for a response before considering a write or polling request to be invalid and displaying an error message in CitectSCADA. The frequency (in seconds) that the CitectSCADA ABCLX driver uses to check the communications link to the ControlLogix system and attempts to bring offline units back online. Also determines the frequency of STATUS_UNIT commands to the driver. See Configuring Redundancy.
Delay
0 to 1000
MaxPending
1 to 256
256
Polltime
20 to 200
50
Retry
0 to 5
Timeout
100 to 30000
5000
Watchtime
5 to 30
30
ABCLX driver
Allowable Values WARNN ERROR TRACE ALL TAG SOCK EIP DCB BUFF THRD ALL
23
Default Value Description Trace level used for log file See Logging for examples.
DebugCategory
Debug category. TAG: Tag configuration trace. SOCK: Socket trace. EIP: EIP session trace. DCB: Front end driver trace. BUFF: Dump a counted buffer to hex. THRD: Thread trace. See Logging for examples. Used by the ABCLX driver to determine whether the device communicates with the serial port on a Logix 5000 series processor via the 1761-NET_ENI module. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. Used by the ABCLX driver to determine whether or not to force the display of good data within a block read which contains bad tags during commissioning. When this parameter is set to1, a block read which contains a bad tag would result in the whole block returning #COM. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. Used by the ABCLX driver to determine the number of Forward Open services can be used on the device. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters.
ExclusiveConnection
0 or 1
FailOnBadData
0 or 1
ForwardOpenPoolSize
1 - 32
24
ABCLX driver
Allowable Values 0 to 15
Default Value Description 10 Used by the ABCLX driver to determine the factor to adjust the scan rate of devices which are not currently active. NOTE: The PLC will drop the connection if it is not polled within a 30 second period. Therefore, you should make sure InactiveScanAdjust*ScanRate is less than 30 seconds. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. Timeout for the retrieval of the tag database and initialization functions. The maximum size (in kilobytes) of the ABCLX.LOG file before rolling over into the ABCLX.BAK file and starting a new ABCLX.LOG file. This is a system wide parameter and should be placed (if required) under the driver's general section. Driver will generate three files: TAGLIST.TXT: Shows all tags downloaded from PLC. SUBSCRIBE.TXT: Shows all Citect tags subscribed. OPT_BLOCKS.TXT: Shows all optimized blocks the driver generated. File name will have [IOServerName]_[PortName]_ as prefix. For example: IOServer__p1_TagList.txt IOServer__p1_subscribe.txt IOServer__p1_opt_blocks.txt This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters.
InitTimeOut
180000
LogSize
2000
LogTagInfo
0 or 1
ABCLX driver
Allowable Values Any valid path.
25
Default Value Description C:\ File path for the three files generated by LogTagInfo. If the directory does not exist, files will not be generated. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. Number of polls that can be missed before the unit is taken offline. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. The time period (in milliseconds) between each poll of the root group. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters. Used by the ABCLX driver to determine whether to bring ControlLogix system PLC devices online or offline depending upon the result of the comparison equation operation as defined in the parameter. This can be system wide if placed in the driver's general section, or device specific if placed under a specific device's section. See Global and device-specific parameters
MissedPollTolerance
1-5
ScanRate
500
StatusTag
(comparison equation)
26
n=
Example
StartingfromtheinitialEthernetmodule,eachpointinthecommunicationpath isdefinedwithaPortvalueandAddressinthefollowingformat:
/P:m/A:n,
ABCLX driver
27
The syntax for the first example (solid line) would be: IOServerName.PortName.RoutePath=/P:1/A:3,/P:2/A:23,/P:1/A:9,/P:2/ A:123.234.0.124,/P:1/A:6
Thesyntaxforthesecondexamplewouldbe:
IOServerName.PortName.RoutePath=/P:1/A:3,/P:2/A:23,/P:1/A:7,/P:2/ A:17,/P:1/A:6
Configuring Redundancy
RedundancyishandledinCitectSCADAbytheCitectSCADAclients.They determinewhichI/OservertorequestI/Odevicedatafrom.Thisisdoneby allowingthescanratetobespecifiedperI/Odevice,andthenconfiguring multipleI/OdevicestothesamePLC. TheinactiveunitunderredundancywillreceiveaSTATUS_UNITcommand fromCitecteveryconfiguredWatchTime.ThereplysentbacktoCitectwillbe basedonthecurrentstateofthestatustagcondition.Iftheconditionfailsthe standbyunitwillbesettoUNIT_OFFLINEuntilthestatustagconditionpasses. Thestatusgrouppollingrateremainsunchangedontheinactiveunit.See Stop_Unithandling.
28
ABCLX driver AstatustagcanbedefinedintheCitect.inifiletodeterminewhetherornotto setaunitofflineoronlinedependingontheconditionofthestatustag.Ifthe conditionistruetheunitisallowedtocomeonline,otherwisetheunitissetto offline. Thestatustagispolledatthesamerateconfiguredforthegroupsofthe correspondingunit.ThedriversupportsSTATUS_UNITcommandsonthe inactiveserver,soeventhoughaparticularunitisnotcurrentlyservicingCitect requests,thestateofthestatusconditionwillbecheckedperiodicallyallowing theunittobetakeneitherofflineoronline. Boththeprimaryandstandbydeviceswillbeofflineifbothhavethesamestatus conditionandtheconditionisfailing.Allpointsinthesystemforthatunit wouldthereforebe#COM. Thestatustagcanbedefinedeitherinthemain[ABCLX]sectiontoapplytoall devicesorastatuscanbedefinedspecificallyforaparticulardevicewithinthe [<IOServerName>.<IOPortName>]section. TheinactiveunitunderredundancywillreceiveaSTATUS_UNITcommand fromCitectSCADAeveryconfiguredWatchTime.Thereplysentbackto CitectSCADAwillbebasedonthecurrentstateofthestatustagcondition.Ifthe conditionfails,thestandbyunitwillbesettoUNIT_OFFLINEuntilthestatus tagconditionpasses.Thestatusgrouppollingrateremainsunchangedonthe inactiveunit. Stop_Unit handling IfthedriverreceivesaSTOP_UNITcommandfromtheI/OServerfora particulardevice,thenthedriverplacestheunitofflineandadjuststhepolling ratebasedontheinactivescanadjust.WhentheINIT_UNITcommandis receivedagain,thedriverwillstartpollingagainandplacetheunitbackonline. Iftheunitiscurrentlyoffline,theSTOP_UNITcommandwillnotbesentdown tothedriversothedriverwillnotknowtostoppollingthePLC.
Performance tuning
TherearetwowaysyoucanfinetunetheperformanceoftheABCLXdriveron yourCitectSCADAsystem: OptimizingdrivertoPLCcommunications OptimizingCitectSCADAsclienttoservercommunications Optimizing driver to PLC communications TheABCLXdriverconnectstotheControlLogixsystemdevicesusingthe Ethernet/IPnetwork.ToknowtheconnectionstateofallconfiguredPLCs,the driversupportstheuseofStatustagsforthesystemandforeachdevice.
ABCLX driver Tominimizenetworktraffic,theABCLXdriveralsosupportstheuseofdifferent scanratesfordifferentdevices,andactiveandinactivedevices.SeeStatustags andScanrates. Note:TheABCLXdrivermaintainsaninternaltagcacheandservices CitectSCADADCBrequestsfromtheinternalcache. YoucanalsoadjusttheSystemOverheadTimeSliceinthePLCtothehighest valuepossiblewithoutinterferingwiththerunningofoperationsonthePLC. TheSystemOverheadTimeSliceinthePLCisadjustedfromtheControllogix programmingsoftwarebyrightclickingonthecontrollerandnavigatingtothe ControllerPropertiesthenclickontheAdvancedtab. Itisalsogoodengineeringpracticetoarrangeyourvariable.dbfbyIODevice thenDataType.ThisallowsCitecttocreaterequestsbyblockingthesamedata typeswithinanIODevicetogether. ForfurtherinformationonoptimizingPLCcommunications,seethe CitectSCADAKnowledgeBasearticleQ4035.(TheKnowledgeBasecanbe installedfromtheCitectSCADACD,ordownloadedfromwww.citect.com.) Optimizing CitectSCADAs client to server communications Duetothisdriverbeingafrontend/backenddriver,therearenotransport delaysbetweenCitectSCADAandthedriverinvolvedinprocessingaread requestfromthedrivercache.Thismeansthatunderheavyloads,thedriver coulduseupmosttheCPUprocessingrequests.ThedrivercantunetheCPU usageandthroughputtohelpmanagetheresourcesoftheI/Oserver.The standarddriverparametersMaxPendingandDelaycanbeusedasfollows:
[ABCLX] MaxPending=x Delay=y
29
where:
x= y= the maximum number of simultaneous requests the driver will receive from CitectSCADA. the average delay applied to the requests to control CPU usage.
SeeCustomizingaprojectusingCitect.iniparameters. Examples
[ABCLX] MaxPending=256 Delay=50
Theaboveexamplewouldmeanthatthedriveriscapableofservicing256 requestsevery50milliseconds.
[ABCLX] MaxPending=1
30
ABCLX driver
Delay=0
Thisexamplewouldmeanthedriverwouldreplytoeveryrequestasquicklyas possible,whichcouldcauseCPUissues.
Session Control
Youcanusesessioncontroltoreleaseanycurrentreferencestotagsonthe ControlLogixPLCs.Thisisrequiredifyouwanttomodifyordeleteanyofyour PLCtags,astheLogix5000softwarecannotaccessatagifCitectSCADAis currentlysubscribedtoit.Youcanalsousesessioncontroltoloadarefreshedtag listfromaPLC. SessioncontrolisachievedbyusingtheSessionDisable:xtag.Thistagneedsto beconfiguredonavirtualdeviceonavirtualchannel.Thevirtualchannelis specifiedbyentering0.0.0.0astheIPaddressintheSpecialOptionsfieldofthe Portsform.Thereshouldbeasinglevirtualportandvirtualdeviceconfigured foreachI/Oserver,andthevirtualdevicesshouldnotbeconfiguredfor redundancy;i.e.,thenetworknumbersforthevirtualunitsshouldnotbethe same.Otherwiseitisnotpossibletocommunicatewithaspecificvirtualunit fromaCitectSCADAclient.
Device Data Description Session Disable and Enable Citect Address Format SessionDisable: x Access rights R/W Citect Data Type INTEGER
Where:
x= the address entered for the specified device in the I/O Devices form. It needs to be unique across all systems.
31
Createavirtualdevice.
32
ThiswillallowyoutocontrolthesessiononIODevdevicebywritting0or1to thevirtualtagCI_Session_Control. See Also Statustags AstatustagcanbedefinedintheCitect.INIfiletodeterminewhetherornotto setalloranyControlLogixsystemPLCdevicesofflineoronlinedependingon theconditionofthestatustag.Iftheconditionistrue,thedeviceisallowedto comeonline;otherwisethedeviceissettoofflinebytheABCLXdriver. Therecanbeonegeneralstatustag(definedinthegeneral[ABCLX]sectionof theprojectCitect.INIfile)whichdeterminestheonlinestatusofallI/Odevices usingtheABCLXdriver.TherecanalsobeanindividualstatustagsetforeachI/ Odevice(usingthesyntax[IOServerName.IOPortName])thatwilloverridethe generalsectionstatustag.SeeCustomizingaprojectusingCitect.ini parameters. Bydefault,nostatustagiscreatedforthedriveroradeviceuntildefinedinthe projectCitect.INIfile. Thestatustagispolledatthesamerateconfiguredforthegroupsofthe correspondingdevice.TheABCLXdriversupportsSTATUS_UNITcommands ontheinactiveserver,soeventhoughaparticulardeviceisnotcurrently servicingCitectSCADArequests,thestateofthestatusconditionwillbechecked periodicallyallowingthedevicetobetakenofflineoronline.SeeStop_Unit handling. Note:Ifboththeprimaryandstandbydeviceshavethesamestatuscondition andtheconditionisfailing,bothwillbetakenoffline.Allpointsinthesystem forthatunitwilldisplay#COM. Thesyntaxforastatustagis:
StatusTag=<TagName><Operator><Operand>
Status tags
33
Thecomparisonoperatorcanbeoneofthefollowing:
Operator > >= < <= & = !& != Description <TagName> is greater than <Operand> <TagName> is greater than or equal to <Operand> <TagName> is less than <Operand> <TagName> is less than or equal to <Operand> <TagName> has common asserted bit(s) with <Operand> <TagName> is equal to <Operand> <TagName> has no common asserted bit(s) with <Operand> <TagName> is not equal to <Operand>
Examples
BringallABCLXdriverdevicesonlineonlywhentheintegertagnamed TankLevelisgreaterthan100:
[ABCLX] StatusTag=TankLevel>100
BringtheparticulardevicenamedPort123ontheI/OservernamedCLServer onlineonlywhenthecurrentvaluesharescommonassertedbitswith5.
[CLServer.Port123] StatusTag=TagName&5
34
ABCLX driver
StatusTag=TagName!&5
Mode detection
ThesevaluescanbeusedtosetupastatustagtodeterminewhatmodethePLC iscurrentlyin,asshownbelow.
Status Tag @Mode<0x2000 @Mode>0x3000 @Mode!&0x1000 @Mode!&0x10 @Mode&0x10 Configuration Description Key position in RUN Key position in REMOTE Key position in PROGRAM PLC in RUN mode PLC in PROGRAM mode
Hencetheunitcanbetakenofflineorbackonlinedependingonthekeyposition andthecurrentmodeofthePLCtodisplay#COMforthepointsonthisunit.
AbadtagisdefinedasanytagthatdoesnotexistwithintheControlLogix system,whichisaproblemthatcanoccurwhendevelopinglargesystems. Duringthecommissioningphaseaproject,youneedtoclearlyidentifyany blocksofdatathatincludebadtags.TheFailOnBadDataparameterhelps achievethisbyallowingyoutorunyourprojectintwodifferentmodes: WhenFailOnBadDataisoff,theABCLXdriverwillnotreturn#COMfora blockofdataifatleastonevalidvalueisinthereadblock. IfFailOnBadDataison,ifanyvaluesinablockedreadfail,thewholeblock isfailedas#COM.Thishighlightsthepresenceofbadtagsandidentifies wherecorrectiveactionisrequired.Thisdefaultbehavioristhepreferred modeofoperationwhenyouarerunningaproject. Avalueof1(default)indicatesthatcommissioningmodeisON,0indicates commissioningmodeisOFF.SeeDriverspecificCitect.INIparameters Note:Whenyouvecompletedcommissioning,youshouldresetthe CommissioningparametertozeroordeleteitfromtheprojectCitect.INIfile.
35
Ignorebadtagreadsduringnormaloperation:
[ABCLX] FailOnBadData=0
Scan rates
TheCitectSCADAABCLXdrivercandefineI/Odeviceswithdifferentscan rates.Thisprovidesyouwiththeabilitytobettertuneyoursystem,byordering thetagdatabaseintologicalgroupsanddefiningdifferentscanratesforeach group.Forexampletagsthatarebeingreadfrequentlycanbeplacedinagroup thatisscannedfrequently,andtagsthatarereadinfrequentlycanbeplacedina groupthatisscannedinfrequently. Bydefault,alltagsarescannedatthedefaultscanratedefinedbytheScanRate parameterintheprojectCitect.INIfile.SeeCitect.INIspecificparametersfor details. Note:IfyouhaveconfiguredI/Oserverredundancyinyourproject,itmaybe consideredaninefficientuseofnetworkbandwidthtobecontinuallypolling devicesnoncriticaltothecurrentlyinactiveserver.Tohelpreduceunnecessary networktraffic,theABCLXdriversupportstheuseoftheInactiveScanAdjust parameter,whichappliesadelayfactortothescanrateofcurrentlyinactiveI/O Servers.SeeDriverspecificCitect.INIparametersfordetails. Examples Settheprojectscanrateto1second(1000milliseconds):
[ABCLX] ScanRate=1000
Settheprojectscanrateto1second(1000milliseconds),andtheinactiveserver scanadjustratetoafactorof5:
[ABCLX] ScanRate=1000 InactiveScanAdjust=5
Setafaster(halfsecond)scanrateforaspecificportnamedPort1ontheI/O servernamedCLServer:
[CLServer.Port1] ScanRate=500
Setaslower(5second)scanrateforaspecificportnamedPort123ontheI/O portnamedCLServer:
[CLServer.Port123] ScanRate=5000
36
ABCLX driver
Troubleshooting
Mostlargeprojectswillsufferbugsintheruntimesystem.However,most problemshavesimplesolutionsandrequireonlyperseverancetosolvethem. ThefollowingtopicsprovideinformationabouttheCitectSCADAtools providedtohelpresolveproblemswithcommunicationandconfiguration. HardwareAlarms TheSysLog.DATfile DriverErrors Logging CitectKerneldiagnostics Maintainingtheprojectdatabase Tagbaseddriverconsiderations ForanswerstocommonproblemsthatrelatemorespecificallytotheABCLX driveranditsoperation,seeFrequentlyAskedQuestions.
Hardware Alarms
WhenasystemerroroccursthatisamalfunctioninCitectSCADAoperation, CitectSCADAgeneratesahardwarealarm.Hardwarealarmsareusually displayedonadedicatedHardwareAlarmpage,whichisavailableasa standardtemplate. Thehardwarealarmpageisyourprimaryindicatorofwhatishappeningin yourCitectSCADAsystem.Ifacommunicationfaultoccurs,ifCicodecant execute,ifagraphicspageisnotupdatingcorrectly,orifaserverfails,thispage willalertyoutoit.Hardwarealarmsconsistofauniquedescriptionanderror code. Thehardwarealarmsdonothavedetailedinformation,butpointyouinthe directionofaproblem.Forexample,ifyouhaveaConflictingAnimationalarm, CitectSCADAwillnottellyouthecause.Youmustobservewhichpagecauses thehardwarealarm,andlocatetheanimationsyourself. Note:Yoursystemshouldhavenorecurringhardwarealarms.If,after reviewingalldocumentation,youcannotrectifyanalarm,contactCitect TechnicalSupport.
37
Driver Errors
CitectSCADAABCLXdrivererrorscanoccurwhenaControlLogixDevicefails torespond,orisdisconnectedoroffline,orreturnsanerroritself.Errorcodes arelistedbelow. TheABCLXdriverprovidestheabilitytologcombinationsoftracelevelsacross differentcategories.Formoreinformation,seeLogging. Common Protocol Errors CitectSCADAhastwokindsofprotocoldrivererrorsgenericandspecific. Genericerrorsarehardwareerrors031,andarecommontoallprotocols.There areanumberofgenericerrorsthatarealsocommontoallprotocols.Insome casesonlythegenericerrorisavailable,thoughoftenboththegenericerrorand aspecificerroraregiven. Protocoldriversalsohavetheirownspecificerrors,whichcanbeuniqueand thereforecannotberecognizedbythehardwarealarmsystem.Thedrivers converttheirspecificerrorsintogenericerrorsthatcanbeidentifiedbytheI/O Server.Forexample,whenadriverhasafault,thereisoftenbothaprotocol specificerrorandacorrespondinggenericerror. Whenahardwareerroroccurs,CitectSCADAgeneratesanalarm,anddisplays thealarmonthehardwarealarmpage(inthealarmdescriptionofthehardware alarm).Toseetheerrornumber,makesureyouhaveAlarmCategory255 definedwithadisplayformatthatincludes{ErrDesc,15}{ErrPage,10}. Thefollowingerrors,listedin(hexadecimal)sequence,arecommontoall protocols.CitectSCADAdisplaystheerrornumberanddescriptionforcommon protocolspecificerrors.Uncommonerrorsarenotcontainedinthe CitectSCADAerrordatabase,inwhichcaseCitectSCADAwillonlydisplaythe errornumber.
Error Value (in Hex) 0x20000007 0x20000006 0x20000009 0x2000000B 0x2000000C 0x20000010 0x20000011 0x20000015 0x20000016 Error Definition Failed to read tag Failed to write to tag Failed to initialise channel and download PLC tag database Failed to initialise unit and start polling tags The configured status condition is currently false Failed to access the Citect Variable.DBF file Failed to access the Citect Units.DBF file Unit initialisation is still in progress The PLC session or TCP/IP connection has failed
38
ABCLX driver Note:Ifoneoftheseerrorsoccursbyitselfandispersistent,youshouldcontact CitectSupport. Youmayrequireadditionalinformationtoenableyoutorectifyanerror.This informationshouldbedetailedinthedocumentationthataccompaniedtheI/O Device(ornetwork).If,afterreviewingalldocumentation,youcannotrectifyan error,contactCitectTechnicalSupport. ABCLX Protocol Errors Thefollowingerrors,listedin(hexadecimal)order,arespecifictothe CitectSCADAABCLXprotocol:
Error Value (in Hex) 0x13 0x17 0x18 0x19 0x1E 0x800 0x100 to 0x899 Error Definition Driver cannot cancel Driver unit offline Bad data type Bad unit type Address range error Windows error ABCLX API calls Error Description Ignore, non critical internal issue ControlLogix unit no longer responding Invalid format or ABCLX.dbf Check, ABCLX.dbf, re-compile Invalid format or ABCLX.dbf Associated with an operating system call Refer to Citect Support
Logging
Logsareausefultoolwhenitcomestodebuggingadriver. SettingtheparameterLogTagInfoto1allowsyoutogeneratethreefiles:
TAGLIST.TXT SUBSCRIBE.TXT OPT_BLOCKS.TXT Shows all tags downloaded from PLC. Shows all Citect tags subscribed. Shows all optimized blocks the driver generated.
ABCLX driver TheABCLXdriveralsoprovidestheabilitytologcombinationsoftracelevels acrossdifferentcategories.Thisisachievedbysettingthefollowingini parameters: DebugLevel Allowsyoutodefinethetracelevel.Theoptionsincludewarnings,errors traces,oralloftheabove. DebugCategory Allowsyoutoenableloggingforaparticularcategoryoftrace.Theoptions include:
TAG SOCK EIP DCB BUFF THRD ALL Tag configuration trace Socket trace EIP session trace Front end driver trace Dump a counted buffer to hex Thread trace all of the above
39
40
ThisfileisdeliveredtotheWindowssystemdirectory(e.g.C:\Windowson WindowsXP).Itslocationisnotconfigurable. SeetheCitectSCADAKnowledgeBasearticleQ3994forfurtherexamplesof ABCLXlogging. See Also DriverspecificCitect.INIparameters TheCitectKernelwindowdiagnosticsframework(commonlyreferredtoasthe Kernel),istheprimarygatewayintotheinternalworkingsofCitectSCADAat runtime,andisprovidedfordiagnosticsanddebuggingpurposesonly. TheKernelcandisplayseveraldifferentdiagnosticwindowseachdisplayingan activeviewintotheworkingsoftheCitectSCADAruntimesystem.Each windowisdisplayedwhenselectedfromtheCitectKernelViewmenu. FormoredetailsofusingtheCitectKernel,seetheCitectSCADAUserGuide. Warning!UsetheKernelwindowwithcare,becauseonceyouareintheKernel, youcanexecuteanyCicodefunctionwithnoprivilegerestrictions.You(or anyoneusingtheKernel)hastotalcontrolofCitectSCADA(andsubsequently yourplantandequipment). Setting up the Kernel YouneedtoconfigureyourCitectSCADAprojecttoprovideruntimeaccessto theKerneldiagnosticswindow.Youcandooneorbothofthefollowing: enabletheKernelonCitectSCADAstartup;or addtheKernelmenuitemtotheruntimeCitectSCADAControlmenu.
41
[DEBUG] Kernel=1
ClickNextuntilyoureachtheSecuritySetupControlMenupage:
42
ABCLX driver
ChecktheKernelonmenuoptionandclickNextuntilfinished.
Atruntime,youcandisplaytheKernelwindowbyselectingKernelfromthe Controlmenu(topleftcorner)ofCitectSCADA.IfyoudonothaveaTitleBar displayedinyourruntimeproject,youcanaccesstheControlmenubypressing Alt+Spacebar(iftheAltSpaceenabledoptionistickedontheSecuritySetup Keyboardpage). Note:Youshouldunchecktheseoptionsbeforehandover,topreventaccidental orunauthorizeduseoftheKernelinthedeliveredsystem. The Diagnostic Windows ThekeydiagnosticwindowsincludedwiththeKernelfortestingI/Odevice communicationsaretheMainwindow,theI/ODeviceswindow,andtheDriver Statisticswindow: TheCitectKernelMainwindowdisplaysthediagnosticmessagesalineat atimeindicatingthecurrentCitectSCADAstartupoperationandstatus. Whenrunning,theMaindiagnosticswindowcontinuestoreportchangesin thestatusoftheI/Odevices. TheCitectKernelUnitwindowdisplaysthecurrentstatusofalldevices definedintheI/ODevicedatabase. TheCitectKernelDriverwindowdisplaysinformationabouteachdriver intheCitectSCADAsystem.Thiswindowisonlydisplayedifthecomputer isconfiguredasanI/OserverwithphysicalI/Odevicesattached.
43
44
ABCLX driver Commonproblemsthatmaycausestartuperrorsinclude: IncorrectcomputersetupusuallysolvedbytheComputerSetupWizard Networkingfaultsorbadhardwarecableswronglywiredorunplugged, orequipmentnotpoweredup,orfaultyequipment Communicationfaultsmostoftenaconfigurationmistakelikewrong protocolsettings,wrongport,etc. Note:TheKernelMaindiagnosticwindowcontainslegacybehaviorfromthe earlydaysofWindows.Ithasnoscrollbar,soasnewmessagesareaddedaline atatimetotheendofthedisplayedlistofmessages,andthewindowisfilled, theoldestofmessages(atthetopofthewindowlist)willscrolloutofviewand beirretrievable.However,youcanviewthisinformationusingThe SysLog.DATfile. Citect Kernel Unit window TheUnitdiagnosticswindow,launchedviathePageUnitKernelcommand, displaysthecurrentstatusofalldevicesdefinedintheI/ODevicedatabase.In thiswindow,usethePageUporPageDownkeystobrowsethroughthe availabledevices.
ABCLX driver Citect Kernel Driver window TheCitectKernelDriverwindow,launchedviathePageDriverKernel command,displaysinformationabouteachdriverintheCitectSCADAsystem. Thestatisticsitpresentsincludereadrequests,physicalreads,digitalreadsper second,registerreads,cachereads,errorcount,timeouts,andsoon.Seethe CitectSCADAUserGuideformoreinformationonthegeneralstatisticsit presents.
45
46
ABCLX driver
Field Session State Description Current state of the driver EIP session to the PLC: 0 The session has not been initialized yet 1 The session is connecting to the PLC and downloading the PLC tag database 2 The session has connected to the PLC and downloaded the PLC tag database 3 The session is subscribing the tags to the PLC 4 The session is currently polling the subscribed tags 5 The session has failed and will be restarted
Current state of the socket to the PLC (same thread states as Session Thread State above) Backend Pending Resp Number of requests currently awaiting response from the PLC Cache Delayed Reply Group Poll Counter Missed Group Polls Avg Group Poll Time Forward Opens Optimized Blocks Tags Subscribed Good Tags Bad Tags QTM Tags Session Disabled Tag Config Warnings Init Timeout Number of cache read requests currently being delayed by driver Number of polls sent out by the driver Number of polls that were skipped by the driver Average time in milliseconds for a complete scan of the tags Number of Forward Open sessions to the PLC Number of optimized blocks created by the driver. Should match number of Forward Opens. Number of non Quality and non Timestamp Citect tags for this unit Number of tags that were successfully resolved in the PLC Number of tags that were not successfully resolved in the PLC Number of Quality and Timestamp tags subscribed to Indicates whether session is currently disabled. Value of 1 indicates session is disabled. Number of tags that still are considered good but have some issue that needs to be looked at Number of connection attempts that have been timed out
ABCLX driver Improperlymaintaineddatabaseshaveproventobeasourceofcommunication problemsatruntime.Themajorityofallcommunicationsproblemscomefrom havingduplicatedororphanedrecordsinthecommunicationsdatabase. SometimestherewillbeorphanedrecordsfromapreviousI/OServerleft behindinthedatabasefiles.AsalltheformsareindexedontheI/OServername, youcanusethescrollbartoquicklynavigatetotheendofthecurrentrangeof recordsforaparticularI/OServerandexaminethelastfewandnextfewrecords tovalidatethattheyshouldbethere.Ifyoufindanyextra(unwanted)records, deletethem. Youshouldalsomakesurethattherearenoduplicatedrecords.Usetherecord searchfacilitytosearchforduplicateentriesofdevicesthatarecausing unexplainedcommunicationerrors.Ifyoufindanyextra(unwanted)records, deletethem. Onceyouhavedeletedorphanedandduplicatedrecords,packtheproject. Packingthedatabaseremovesdeletedrecords,andreindexesthedatabase.To packtheprojectdatabases,fromtheFilemenuinCitectProjectEditor,select Pack. ThereisinformationaboutthewayCitectSCADAhandlesOIDsthatyoushould beawareofbeforeattemptingthetasksmentionedhere.Formoreinformation onOIDs,seetheCitectSCADAKnowledgeBasearticleQ3657.(TheKnowledge BasecanbeinstalledfromtheCitectSCADACD,ordownloadedfrom www.citect.com.)
47
TheCitectSCADAABCLXdriverusesOIDs(objectidentifiers)touniquely identifytagaddresses.TheseOIDsaregeneratedbyCitectSCADAduring compilation. YouneedtobeawareofthewayOIDsareimplementedforatagbaseddriver, asthiswillavoidpotentialtagmismatchesoccurring.Thisisaparticular concernwithnetworkdistributedsystems.Forexample,alltheCitectSCADA serversandclientsmusthavetheexactlythesamevariabledatabaseonthem, otherwiseaclientcouldmakearequestforatagwithanOIDthateitherdoes notexistontheI/OServer,orreferstoadifferenttag.Forthisreason,caremust betakenwheneditingavariablesdatabase. Thefollowinginformationisintendedtodrawattentiontoactivitiesthatrequire carefulattentionbecauseofthepotentialimpacttheymayhaveontheOIDsin yoursystem. FormoreinformationonOIDs,seetheCitectSCADAKnowledgeBasearticle Q3657.(TheKnowledgeBasecanbeinstalledfromtheCitectSCADACD,or downloadedfromwww.citect.com.)
48
ABCLX driver Project IDs OIDsaregeneratedusingaProjectID,andtheposition(i.e.recordnumber)in theassociatedvariable.dbffile.Therefore,itisimperativewhenusingdisplay clients,standbyservers,andsoon,thataprojectrestoredtoaPChasa consistentProjectIDacrossallthemachinesincludedinasystem. ThisshouldbecheckedwheneveryourestoreaprojecttoaPC,becauseifthe ProjectIDisalreadyusedbyanotherprojectonthatparticularcomputer,Citect willgenerateanewProjectIDnumber. AprojectsIDnumbercanbedeterminedbyselectingaprojectinCitectExplorer andviewingitsproperties.TheProjectIDisshownontheGeneraltab.Itis alsostoredintheprojectbackupfile(.ctz). Using Include Projects YoushouldensurethateachincludeprojecthasthesameProjectIDoneach computerusingthesameincludeproject.Againitisimperativethatthisis checkedafterrestoringaprojecttoacomputer. Variable Databases Ifyouhavedifferentvariable.dbffilesacrossyourplant,itispossibletohave OIDmismatches. Toavoidthis,ensurethatonceyouhavemadechangestoyourvariable.dbfon yourPrimaryServer,thatyouresettheOID(incitect.inifileset[OID]Reset=1) anddoapackandfullcompile(i.e.ensurethatincrementalcompileisturned off). Oncethisisdone,thevariable.dbffileshouldbecopiedtotheStandbyServer andanyDisplayClientsusingtheproject.ThisensuresthatanOIDonyour PrimaryServeristhesameastheOIDusedonyourDisplayClientand/or StandbyServer. Hint:Ifyouareusingincludeprojects,youshouldpackallyourvariable.dbf beforeresettingtheOIDsanddoingafullcompileofyourproject.Thereisa downloadabletoolavailablecalledPackAllthatwillpackallthevariable.dbfs thatareusedinyourproject(eveniftheyareincludeprojects).Thistoolis locatedunderDatabaseToolsintheToolboxsectionofwww.citect.com. See Also FrequentlyAskedQuestions Thissectionaddressesproblemsthatmaybeencounteredwhensettingupand operatingtheABCLXdriver.Theyhavebeengroupedintocategoriestohelp youeasilydeterminethelikelysolutiontothetypeofproblemyoure encountering. TheanswerstothesequestionstypicallypointtoanarticleintheCitectSCADA KnowledgeBase,whichcanbeinstalledfromtheCitectSCADACD.Themost
ABCLX driver currentversionoftheKnowledgeBasecanalsobedownloadedfromtheCitect website(www.citect.com). Startup issues WhydoIgetaChannelOfflineCannotTalkerrormessagewhenthe ABCLXdriveriscomingonline? WhydoesittakesolongfortheABCLXdrivertocomeonline? EverytimeIstartCitectSCADA,Iseeanuisancehardwarealarmformy ABCLXdevicethatbecomesinactiveafterabout30seconds.HowdoIstop thishappening? CTAPI issues UsingCTAPItoreadtagsfromanABCLXdevicecausesblanktagsto appear. Why do I get a Channel Offline Cannot Talk error message when the ABCLX driver is coming online? TherecanbeanumberofreasonswhyABCLXdrivercannot bringitsdevicesonlineatstartup.YoushouldinitiallyconfirmthattheBoards, PortsandI/ODevicesformsarefilledoutcorrectly.Youshouldalsoconfirmthat youhaveenoughidletimeinyourPLCprogramtoallowcommunication requeststotakeplace. SeetheKnowledgeBasearticleQ4009forfurtherinformationonhowto diagnosethisproblem.Italsoincludesinformationaboutparametersettings andadjustmentsthatmayimpactthisprocess. Why does it take so long for the ABCLX driver to come online? WhentheABCLX driverattemptstobringdevicesonline,itinitiatesaprocessofdownloadingand subscribingtherequiredtagsfromtheassociateddevices.Ifaprojecthasalarge numberoftags,thisprocessmayoverlapwithdriverpolling,causing unnecessarydelays.InsufficientidletimeinthePLCprocessormayalsocause Citectdriverrequeststobeprolongedunnecessarily. TheKnowledgeBasearticleQ4001providesadescriptionofhowCitectSCADA bringstheABCLXdriveronline. Every time I start CitectSCADA, I see a nuisance hardware alarm for my ABCLX device that becomes inactive after about 30 seconds. How do I stop this happening? Hardware alarmsaregeneratedbyCitectSCADAwheneverInitUnitfails.Inthecaseof ABCLXdriver,thiscanoccurbecausetherequiredtagshavenotdownloaded andcompletedsubscription. Asaresult,thereisnocurrentworkaroundorsolutionforsuppressingthis hardwarealarm.However,itshouldbenotedthatthespeedatwhichadriver comesonlinecanbeimpactedbynetworkbandwidth,PLCCPUutilization,and thenumberoftagsandthenumberofbadtags.
49
50
ABCLX driver PleaserefertoKnowledgeBasearticlesQ4001andQ4009formoreinformation onhowtodiagnoseandfinetunethestartupprocess. Using CTAPI to read tags from an ABCLX device causes blank tags to appear. Using CTAPItoreadtagsfromadeviceusingtheABCLXdrivercausesthefirsttagto displayitsvaluecorrectly,buttheresttoappearblank.Thisiscausedbya blockingissueinCTAPI. TheworkaroundistochangetheProtdir.dbfentryforABCLXfroma Max_Lengthof2048to2032,andBit_Blockfrom2048to2032onallCitect computersonthesystem.Thiswillensurethatalltherequestedtagsareread correctly.Pleasenote,however,thatthiswillreducethemaximumrequest lengthfrom256bytesto254bytes,whichreducesthemaximumsizeofarrays andstrings. Itisimperativethatthischangebemadetotheprotdir.dbffileinthe\Citect\Bin andthe\Citect\User\Includedirectories. SeetheKnowledgeBasearticleQ4068formoredetails.
Index
A
ABCLX About,1 ABCLXDriverPack,2 Advancedconfiguration,20 FailOnBadDatamode,34 modedetection,34 performancetuning,28 redundancy,27 scanrates,35 sessioncontrol,30 statustags,32
D
DataCoercion,11 Datatypes,10 datacoercion,11 DriverErrors,37 DriverPack installation,2
E
exclusiveconnection,5
C
Citect.iniparameters,20 CitectSCADAproject addingdevices,6 addingtags,9 advancedconfiguration,20 arraytagaddressing,13 configuring,6 customizing,20 datatypes,10 indivdualtagaddressing,12 programtagaddressing,17 qualityandtimestamptags,17 redundancy,27 CommunicatingwiththePLC settingup,3 Configuringredundancy,27 Configuringyourproject,6 addingdevices,6 addingtags,9 advancedconfigurations,20 arraytagaddressing,13 customizing,20 datatypes,10 indivdualtagaddressing,12 programtagaddressing,17 qualityandtimestamptags,17 redundancy,27
H
HardwareAlarms,36
I
IdentifyingbadtagsusingFailOnBadData,34 Installation,2 Introdcution,1
K
Kerneldiagnostics,40
L
Logging,38
M
Maintenance,20 projectdatabase,46 Modedetection,34
P
Performancetuning,28 PLC communicationsetup,3 PreparingtheControlLogixsystem,2 programtags
52
Index addressing,17 Project addingdevices,6 addingtags,9 advancedconfiguration,20 arraytagaddressing,13 configuring,6 customizing,20 datatypes,10 individualtagaddressing,12 qualityandtimestamptags,17 project programtagaddressing,17 Projectdatabase maintenance,46 SettingUpCommunications ExclusiveConnection,5 Settingupcommunications creatingatestproject,3 serialconnectionvia1761NET_ENImodule,5 Statustags,32 SysLog.DATfile,36
T
Tagaddressing arrays,13 indivdual,12 programtags,17 Tagbaseddriverconsiderations,47 Testproject,3 Timestamptags,17 Troubleshooting,36 drivererrors,37 hardwarealarms,36 Kerneldiagnostics,40 logging,38 SysLog.DATfile,36
Q
Qualitytags,17
R
Redundancy,27 RoutePath,25
S
Scanrates,35 SessionControl,30
U
UsingaroutepathtolocatearemoteCPU,25