Copyright©2007RockwellAutomation,Inc.Allrightsreserved.13–在FactoryTalkViewSE应用中创建及查看数据记录模型Copyright©2007RockwellAutomation,Inc.Allrightsreserved.2Objectives•Createadatalogmodel•ViewadatalogAftercompletingthislesson,youshouldbeableto:Copyright©2007RockwellAutomation,Inc.Allrightsreserved.3KeyTerms•DataLog•DataLogModel•FileSet•LogFileIdentifierString•ODBCDatabaseCopyright©2007RockwellAutomation,Inc.Allrightsreserved.4CreatingaDataLogModel•Specifyalogfileidentifierstring•Specifyastorageformat•CreateadescriptionforthedatalogmodelUsetheDataLogModelseditortoconfiguretheSetuptabto:Copyright©2007RockwellAutomation,Inc.Allrightsreserved.5CreatingaDataLogModelSetupgeneraldatalogmodelproperties.Specifypathsthedatawillbeloggedto.Specifywhenlogfileswillbecreatedanddeleted.Specifyhowandwhenloggingshouldoccur.Selectthetagsyouwanttologdatafor.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.6SelectingtheODBCDatabaseFormatStorageFormatCreateTablesIFODBCdatabaseisthestorageformat,configuretheODBCdatasource,andtablesthatwillbeused,orcreatenewtables.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.7SelectingtheODBCDatabaseFormatIfFactoryTalkViewcannotcreatethetablesautomatically,youwillhavetoopenthedatabaseusingitseditingtool,andcreatethetablesmanually.Toselectanexistingtablefromthespecifieddatabase,usetheBrowsebutton.Viewthedetailstoseetheorder,type,length,andprecisionofthefieldsinthetable.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.8SelectingtheODBCDatabaseFormatDeleteoldrecordsfromtheODBCdatabaseusingstandardrelationaldatabasetoolsorSQLqueries:PurgeODBCDatabaseYoucanalsosetupFactoryTalkViewtodelete(purge)recordsintheODBCdatabaseafteraspecifiedtime.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.9SelectingtheFileSetFormat•Periodically•Atspecifiedtimes•Whenaparticulareventoccurs•Never.Thismeansthatalldatawillbeloggedtoonefileset.Ifthedatalogmodelusesfilesets,youcansetupdataloggingtocreatenewfilesets:LogfilesaresavedinthefolderyouspecifyinthePathstab.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.10SelectingtheFileSetFormatYoucanalsosetupthefilemanagementtodeletefilesetsafteraspecifiedperiodoronceaspecifiednumberoffilesetshasbeencreated:StartNewFilesFrequencySettingsDeleteOldestFilesFrequencySettingsCopyright©2007RockwellAutomation,Inc.Allrightsreserved.11SelectingTagstoLogIntheTagsinModeltabyouidentifywhichtagsthemodelwilllogdatafor:AddorRemoveTagsinModelBrowseforTagsThetotalnumberofcharactersandspacesallowedforthepathandnameofataginadatalogmodelis255.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.12ViewingaDataLog•Whenyoucreatealogfileset,thesetisgivenanameautomatically.–Thenameisbasedonthedatethefilewascreated,andthetypeofdataitcontains.–Themaximumlengthofalogfileset'sname,includingitspath,is200characters.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.13NamingLogFileSets•YYYYistheyear•MMisthemonth•DDistheday•NNNNisthesequentialfileidentifierThisnumberindicatesthesequencefileswerecreatedin.Youcanhaveupto9999filesperday.Atmidnight,thesequencestartsagainat0000.•LogFileIdentifierStringisatextstringyoucanspecifytohelpidentifythelogfile.Themaximumstringlengthis20characters.Filesetsusethefollowingfilenameformat:YYYYMMDDNNNNLogFileIdentifierString(type).datwhere:Copyright©2007RockwellAutomation,Inc.Allrightsreserved.14NamingLogFileSets•(type)isthefiletype.Thetypeisenclosedinparentheses.Therearethreefiletypes:–Tagname–Float(foranaloganddigitaltagvalues)–StringFilesetsusethefollowingfilenameformat:YYYYMMDDNNNNLogFileIdentifierString(type).datwhere:Copyright©2007RockwellAutomation,Inc.Allrightsreserved.15NamingLogFileSetsAnexampleofthestringfiletypeisshownbelowinMicrosoftRExcelsoftware:DefaultNamingConventionDateandTimeLoggingStoppedDateandTimeLoggingStartedCopyright©2007RockwellAutomation,Inc.Allrightsreserved.16NamingODBCTablesTheODBCtablesarecreatedwiththedefaultnamesTagTable,FloatTable,andStringTable.IntheDataLogModelseditor,youcanmodifythesenamesbeforecreatingthetables,oryoucanspecifythenamesofdifferenttables.Copyright©2007RockwellAutomation,Inc.Allrightsreserved.17Here’sHow•Createadatalogmodel•ViewadatalogToperformthefollowingtasks:Asyourinstructordemonstratestheseprocedures,followalongintheassociatedjobaid(s).Copyright©2007RockwellAutomation,Inc.Allrightsreserved.