SUMMARY
This article will explain how the .HTD file exported from the 5000 series loggers are organized. File is in ASCII format and organized by line and CSV delimiters.
SOLUTION
Line 1 = Test name
Line 2 = Test Setup information
Line 3+:
COL 1 = Current RTC TIME (unsigned long). This is an encoded time and date value.
COL 2 = Point index.
COL 3 = Temperature.
Each input used in the test will follow COL 3 with 4 columns a piece (ADC value, Calibrated Value, units index, and MS time point was recorded). So, if I the test contained 2 inputs. COL 4 - COL 7 would be first input used in test and second input would be COL 8 - COL 11.
Columns for each input used in test:
COL 4 = ADC
COL 5 = Calibrated value.
COL 6 = Units index.
COL 7 = MS point time.
Using the MS point time and the initial MS point time the total MS since test start can be calculated. Please note, this is an unsigned long and overflow is possible and my need to be accounted for.
To decode the RTC time:
byte month = RTC TIME >> 56 bits or RTC TIME / 72057594037927936
byte day = RTC TIME >> 48 bits or RTC TIME / 281474976710656
uint16 year = RTC TIME >> 32 bits or RTC TIME / 4294967296
hour = RTC TIME >> 24 or RTC TIME / 16777216
min = RTC TIME >> 16 or RTC TIME / 65536
sec = RTC TIME >> 8 or RTC TIME / 256
Comments
0 comments
Please sign in to leave a comment.