You are on page 1of 6
Doe pe Tech Notes Doct ‘ruaoo022768 Legacy Doc it sea abi Oto snz018 Extending User Defined Attribute Arrays to DASABCIP Arrays PROBLEM Title Extending User Detined Atnbute Arrays to DASABCIP Arrays SOLUTION ‘Summary ‘This Tach Note outlines how to populate a User Defined Objects (UDO's) User Defined Atrioute (UDA) Array with array values from a ‘Control ogix’ Compact ogix processor using DASABCIP. Situation Application Versions + Application Server 3.1 SP3 p01 + DASABCIP 4.1 SP2 Note: This Tech Note only addresses reading of array values, not poking of new values, Overview AUDA array isnot direct extendable to 10 sources, however, customers would often lke tobe able to directly map arrays from their Logix processors to a UDA array. DASABCIP has block read capabilites that can be ulized to accomplish ths requirement. When this block read is ‘executed via an OPCClient DlObject, the array values are returned with a comma delimiter and then can be parsed with a simple script to move the values info corresponding UDA Atay elements, Important Limitations and Information + The OPCCiient DiObject is required to accomplish this functionality since the values are returned with @ comma delimiter. you ty to use the DDESuiteinkClent DlObject, the values are returned in Hex, making the process more dificult since a hex io decimal conversion will be required + Logix arays are base-0, but UDA ray are base-, so you will need to remember that there is an offset that will occur + DASABCIP Block Read syntax is required +-[cfirst_element_X>],L ‘+ DASABCIP only supporis Biock Reads and Writes of one. dimensional arrays from the supported Control ogix, FlexLogix, and CompactLoax controls. +The fallowing features are NOT supported by the DAServer: © Block Reads Whites of stings © Block Reads of structures (either predefined or user-defined) © Block Reads of greater than 406 bytes «There are five ferent datatypes that are supported, each of which requires a different allowance on the qualifier due tothe black ‘ze limitation (Table 1 below). ‘There are tree optimization modes supported, each witha different maximum qualifier allowance as shown in the folowing table: Optimize for Reads, Optimize or Startup, anc No Optimization ‘Note The nurnber in he "Ln" quaifer Should nat need an offset, because it's the total umber counting from 1 (ane) [Data Type | Qualifier Allowance (number of ems) [Optimize for Read] Optimize for Startup] 015 SEA sid 8s ee AVEVA Wo Gpurmeauion [Boolean [3640 3837 SNT [486 lar int [2a [230 DWT [724 a REAL_[121 19 int [60 59 Table 1: Block Read Qualifier Limits ‘Sample Configuration Controller Tag Configuration Fortis example, we've created a 10 element DINT array called TestArray ina Sot oatx processor (Figure 1 below) q H A H Hy Hy Hy A A H Hy Figure T- Controller Array Example DASABCIP Configuration MT 'No special configuration is required here, Just set up a typical connection to @ Logix processor as desciibedin the DASABCIP help (Figure 2 below), (© 2015 AVEVA Group ple and its subsidies Al rihts reserved, AVEVA ‘emus of Use Privacy Policy Ee F 8 cet Group © Bl toca AchestrADASABTCP.1 sachet Faery A Ache OASGESRP.A Ache OASMESetal2 Anche DASPane Anchest DASBBCIP-$ [OrinisetorResd —_____] 8 (@ ArchestrA.DASMBTCP.1 oe BD tstestor Gene IF Opiinize User Defined Data Types 2) beta coup Docs TopDatobre Boteso FF Auto Load Tags > Sy techeest Opened Lg Flee IF Auto Synctrorize Taps Use Perssted Tage Figure2: Sample DASABOP Configuration ‘PCClient Diobject Configuration Configure the OPCCieent DiObject to communicate via OPC to DASABCIP (Figure 3 below). @ opcetient [Sea scan Goup| lock Rend | Beck wrt | Objet nfermation| serps | UDKS | Extensor | optics | Server node: #9 Server name: 9 pun server out-o-groc & Fuse scan group name as access path & Figuie 3 OPOGlen General Conigurarion ‘Ascan group must be created with an attibute tha utiizes the proper syrtax ta block read the Logix array (Figure 4 below. + you use an alias in the Attribute Column, it will make the scripting simpler + The item syrtaxis a concatenation of the object names in te DASABCIP configuration hierarchy, separated by periods, then [efirst_element_X=] Lnumber_ol items #* + Ifyou are having trouble wi he fem reference syntax, you can press the blue + symbol on the attribute ist, then the elips's [in the item reference field to browse the DASABCI hierarchy. + Inthe figure below you can see that we're reading an aray named “TestAvray’, beginning at element 0, and reading 10 elements total (estArrayf0].L10), using an alias name of TestArrayAlias” CHS ENAGup esl Ads ene AVEVA {@ opcctient General [SEG] leckRead | Hock ite | Object Infomation | Sats | UDA | Extersins | apis | Avaliable scan groups: Sentero Sci Associated attbutes For S61: ‘Attribute [item Reference ‘TestarrayAlas (CIP.ENG, 6 AGK TestAray[O]LIO Figue a OPGlen Scan Group Comguration User Defined Object Configuration ‘You need to define vo UDAs, one to hold the raw IO data from the Logix array (string), and another thats the UDA array to be populated, which is an integer array in this example (Figures 5 & 6 below). @ wor Fel tikes | Object formation | Sats |UOA# stern | Grp | (EGE) UoAname: —cLsrayRan Figure 5. UDA Sinng fo Hold Raw Array 10 Dale 015 SEA sid 8s ee AVEVA @ upor Field ties | Object Infomatn| Scts | UDAS. Esters | antics | Uoaneme: — clxanay oR aes cman a va FF thisisan array umber of elements: [ID Thao | vale i ; Figuie@: UDAATay “The sting UDA that holds the raw 10 data needs to be extended fo the input witha special syntax as below in order to capture the elements inthe proper comma delimited format Figure 7 below), Felt nates | Obj Ifematin | Ses | Won | Etensns [ants] ‘Aurbutename: — cLarmRaw edb mira: 7 . a ol Amare D Alarmiode FR output ion differs From input source B marstodecing vesinaton Be @ Bl centigrersen F trotenerson tear souce: RCaRSeLAieTesrayA) 3 i: en Figuee 7 UDA Sting Extension ‘Sample Script ‘An OnDataChange Script can manitor the raw data for changes, then parse the raw data and populate the UDA ary using the Microsoft. NET ‘System String Spit metnod as needed (Figure 6 below) CHS ENAGup esl Ads ene AVEVA Tor a Fd antes | bt frmaton [6was | sse| ashes | CHIE) © seotmme: taney ataseso soos: Sm ees NEL) as String? ‘system stein tempating = me cLEAreay RO: stringseparator(1}=",7: ine cLineray() = venpotring.5p1se StetngSeparator, System. strinsSp14topt tons. one) Figure 8. Using NET System Sting Spitto Parse he Raw Data and Populate the UDA Array Here are the example atvibutes as seen from Object Viewer (Figure 9 below). 14)16j2011 9:48:21.808 aM 14ft6y2011 3:48:21,803 am 0 jepe011 9462 luoor.cuxarayi2} 1 14ftej2011 3:482.803 am ok {uoor.cLearrays} 2 11/16/2011 3:46:21.005 am Ok 3 11/16j2011 3:48:21.808 aM Ok {woot cLxarayi5} 4 11ftej2011 3:48:21.803 am ok {woot cLxarray{6} 5 14ft6f2011 9:48:21.908 aM Ok {woot cuxarayi7] 6 11ftep2011 9:48:21.908 am ok {uoor.cuxarayfa} 7 11ft6j2011 3:48:21,803 am ok 8 Ok ° ok Figure. Object Viewer wih Example Alibures CHS ENAGup esl Ads ene AVEVA

You might also like