XT2640OperatingManual 13July2016 Page129of187
23.7.7 EXPORTING ADATALOGFROMTHEINTERNALMEMORY
Iftheinternalmemorycontainsdatalogrecordsthenthesemaybeexportedtoanexternaldrive.
ThisisachievedbyinsertingtheUSBdriveintothefrontpanelportandpressingtheEXPORTbuttonnexttotheINTMEMORYarea
onthedataloggingscreen.Afterpressingthisyouarepromptedtoenterthedesiredfileformat(ASCIIorBINARY),followedbythe
desiredfilename(theextensionisautomaticallyprovided),followedbyarequesttooverwritethefile(onlyifitalreadyexistsonthe
USBdrive).Thefiletransferistheninitiated,andtheprogresscanbeviewedinthestatusareaonthelowerpartofthisscreen.The
resultantfilealwayscontainsaheaderrecord.
Note:
SinceatypicalUSBdrivehasasustainedwritespeedof500Kbytes/sec(orpossiblyless)andtheinternalmemorycan
containseveralGbytes,thisactivitycantakeaverylongtime(possiblyseveralhoursormore).
Oncestartedyoudonotneedtostayonthisscreen,youcancontinuetousetheXT2640normallyotherthanbeingunable
toimportorexportfilesandnotbeingabletoperformdatalogging.
IfexportingtoanASCIIformatfilethentheresultantfilewilltypicallybe3xlargerthantheamountofinternalmemory
used.Thismightbemorethanthe4GbytefilesizelimitforFAT32.Inthiscaseyoushouldexportthedatainbinaryformat
andexternallyconvertitintoASCIIusingthesuppliedapplication.
23.7.8 INTERNAL BUFFERUSAGE
TheXT2640hasalargeinternalFIFObuffer(32Mbytes)whichisusedfordatalogdata.Thisbufferservestwopurposes‐
1.
Ifyouaredataloggingtoafileonadrivethenitreducestheimpactondataloggingwhichinconsistenciesinthewritespeedof
thedrivemayhave,orifithasaninsufficientsustainedwritespeed.
2.
Itallowsyoutoinsertadrivetosavethedatalogdataatanytime;before,duringorafterperformingthedatalog.
TheprogressbarshowninthelowerportionoftheDataLoggingConfigurationandStatusscreenshowshowmuchofthisbufferis
presentlyusedandalsothemaximumamountwhichhasbeenused.
Note:
Datastoredintothismemoryalwayshasabinaryformat;theamountofthismemoryusedperdatalogrecordisgivenby
(4bytesxnumberofdatashownintheSELECTDATAbutton).
Dataloggingalwayssavesthecaptureddataintothisinternalbuffer.Atanytime,ifdatahasbeenstoredinthisinternal
bufferandthedriveisavailableandnotbusy,thendataiswrittenfromthisbuffertothedrivewiththeformatconfigured.
Thismemoryisvolatile,soturningofftheXT2640willloseanydatastoredinit.
Ifthisbufferisoverrunthendataloggingcontinues,butsomerecordswillbelost.Itwillalwaysbeentirerecordswhich
arelostifthisoccurs,notdatawithinrecords,sotheintegrityoftheresultingfileisunaffected.
Becausewritingdatatothedrivecanlagbehindtherateatwhichdataisbeingcollected,datawillcontinuetobesavedto
thedriveafterdatalogginghasbeenstoppedmanuallyortheconfiguredruntimehaselapsed.Sincethesustainedwrite
speedofaUSBFlashDrivemaybe<500Kbytes/secandthebuffermaycontainupto32Mbytesandthedatawrittentothe
drivecanbeseveraltimeslargerthanthedatainthememory,thiscouldcontinueforseveralminutesormoreafter
stoppingdatalogging.
23.7.9 OPTIMIZINGANDTESTING FILEWRITESPEED
GenerallytheXT2640isnotthelimitationtothemaximumachievabledataloggingratetoanexternalUSBdrive.Thedriveaverage
sustainedwritespeedandtheUSBspeeditselfaretypicallythemainlimitations.
Ifthetotaldatalogwillbelessthan8Mdatathenspeedisnotofconcernastheinternalbufferislargeenoughtoaccommodatethis.
TheinternalmemoryintheXT2640hasamuchfasteraveragesustainedwritespeedthanexternalUSBdrives,butstillneedstobe
consideredwhenloggingatveryhighratesandwithlargedatacounts.Thetypicalmaximumsustainedspeedfortheinternal
memoryisover5Mbytes/sec(1.25Mdata/sec),soifdataloggingatthemaximumrate(0.002secor500/sec)themaximumamount
ofdataperrecordwhichcanbeloggedwithoutrecordlossis2500data(higheratslowerdataloggingrates).
Drivesarenotconsistentintheirtiming;atypicaldrivewilloccasionallypausewhilewritingdatawhichwillcausethebufferusage
bartomoveinaninconsistentmanner.Itisrecommendedtoperformatestdatalogtoadrivebeforeattemptingtocreatea
substantialdatalogfiletoensurethatthedrivecansupporttherequiredaveragedatawriterate.Thistestrunshouldbeforatleast
afewminutes.
Ifthedrivewillnotsupporttherequiredmeansustainedwritespeedrequiredforthedesireddatalogintervalanddatathenthe
internalbufferwillfillupandrecordswillbelost.
ToachievethefastestsustainedaveragewritespeedwithanexternalUSBdrivethefollowingrecommendationsaremade‐
Formostdrivesalargeallocationunitsize(orclustersize)willachievethefastestsustainedwritespeed.Youmaywishto
reformatthedrivetohavealargerallocationunitsizethanwaspresentwhenpurchased(16kbyteisrecommendedfor
datalogging).AsanexamplethefollowingresultswereobtainedusingatypicalUSBDrive(4Gbytesize,writinga70Mbyte
file)–
4kbyteallocationunit(aspurchased):330kbytes/secsustainedspeed(82.5Kdata/secinbinaryformat)
8kbyteallocationunit:511kbytes/secsustainedspeed(127.75Kdata/secinbinaryformat)
16kbyteallocationunit:670kbytes/secsustainedspeed(167.5Kdata/secinbinaryformat)
32kbyteallocationunit:715kbytes/secsustainedspeed(176.25Kdata/secinbinaryformat)
Notethatthesefiguresarefarlessthanthepublishedmaximumwritespeedforthisdevice(3Mbytes/sec),but
neitherthebusspeednortheXT2640werethelimitingfactorsfortheabovetests.