Writing Data.docx

上传人:安*** 文档编号:73306259 上传时间:2023-02-17 格式:DOCX 页数:4 大小:16KB
返回 下载 相关 举报
Writing Data.docx_第1页
第1页 / 共4页
Writing Data.docx_第2页
第2页 / 共4页
点击查看更多>>
资源描述

《Writing Data.docx》由会员分享,可在线阅读,更多相关《Writing Data.docx(4页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、WritingDataTheTDMSfileformatwasdesignedtostreamdataasquicklyaspossiblewhilestillbeingflexibleenoughtoaccommodatechangesinthenumberofchannelsandtheirsamplingratesduringtheacquisition.Datafilesthatstreamquickly,though,donotnecessarilyloadquickly.TheTDMSfileisanentirelybinaryfilethatconsistsofmultiples

2、ections,onelayeredontopoftheotherasyouwritetothefile.Thesesectionscontainbuffersofdatavaluesassignedtooneormorechannelsand/ormeta-datapropertiesattachedtooneormorelevels.ThefewersectionstheTDMSfilehas,ingeneral,thefasteritwillload.EachtimeaTDMSfileiswrittenorread,aTDMS_Indexfileiscreatedthatcontains

3、amapofthebinarysections.SubsequentreadsofthesameTDMSfileconsulttheTDMS_Indexfiletoreadallthepropertiesandtodeterminethecorrectbytepositionstoreadouteachstoredblockofeachchannel.Roughlyspeaking,iftheresultingTDMS_IndexfileissimilarinsizetoitsTDMSfile,thenthisTDMSfileis“fragmented,meaningithasmoresect

4、ionsthanitneedsandwillthereforeloadslowerthanitshould.Thereareseveralapproachesyoucanimplement,bothduringandaftertheacquisition,thatwillminimizethenumberofunnecessarysectionsandmaximizethereadingspeedoftheresultingTDMSfile.WritingTDMSFileswithMinimalFragmentationFirstoff,ifyouareacquiringdatawithNIs

5、dataacquisitionhardware,considerusingtheNI-DAQmxTDMSwritingcapability,sinceitautomaticallywritesun-fragmentedTDMSfiles.IfyouareusingNILabVIEWtoacquireyourdatachannels,youcanchoosetheVIsfromtheTDMSAdvancedpalettetowriteaminimallyfragmentedTDMSfile.IfyouareusingthestandardTDMSwritingfunctions,thefollo

6、wingtipswillhelpminimizetheTDMSfilefragmentation.WritealltheTDMSpropertieseitherbeforeorafterthedataacquisition(loop).Writepropertyvaluesfromsame-datatypepropertiesusinga2DarrayandoneTDMSwritefunction.Writeatleast1000datapointsatatimetoeachdatachannelintheTDMSfile.Ifyouhavetowrite1datapointatatime,s

7、etthechannelpropertyNI_MinimumBufferSizeequalto1000.DefragmentingTDMSFilesAftertheAcquisitionEvenifyourdataacquisitionconstraintsforceyoutocreatefragmentedTDMSdatafiles,youcanstilladdresstheissueaftertheacquisition.IfyouareusingNILabVIEW,youcanexecutetheTDMSDefragmentfunctiontorewritetheTDMSfilewith

8、minimalfragmentation.Alternatively,ifyouloadtheTDMSdatafileintoNIDIAdemandsimplyresaveit,theresultingTDMSdatafilewillbeminimallyfragmented.WritingLoad-Speed-EnhancingChannelPropertiesIfyourtargetapplicationtoreadTDMSfilesisNIDIAdem,youcandramaticallyimproveloadingspeedintoNIDIAdembycreatingthefollow

9、ingfourpropertiesattachedtoeverynumericordatetimedatachannelintheTDMSfile.IfanyoneofthesefourpropertiesismissingornotpopulatedwithavalidvaluewhenagivenTDMSdatachannelisbeingloaded,thenNIDIAdemwillautomaticallycalculateallfourpropertiesforthatchannelinordertospeedupgraphaxisauto-scaling.Iftheseproper

10、tiesarealreadycreatedandfilledwithvalidvaluesandattachedtoeachdatachannelintheTDMSfile,thenthatTDMSfilewillloadmuchfasterintoNIDIAdem,becausethatcalculationforeachchannelwillbeavoidedduringtheTDMSfileloadingprocess.Notethatthepropertynamesarecasesensitiveandmustbeinlowercase.NoneofthesefourchannelpropertiesaresetbydefaultinNILabVIEWyouneedtoaddthosepropertiesyourselftoeverywaveformchannelyoucreateintheTDMSfile.Table3.PropertiestoImproveLoadingSpeedinNIDIAdem

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 工作报告

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com