Function documentation exported on 2005/06/26 15:09:10.94. The functions in the list were obtained from source "\datalog\resources\import\querylib.lua".


Index of functions

csv s2t tcsv units
interpolations t2s timeseries

Background

The documentation of each function is headed by a synopsis that summarizes how the function can be called. Optional parameters are surrounded with square brackets. An arbitrary number of repeats, including zero repeats, of the preceding parameter is denoted by an ellipsis (three subsequent dots). As per the Lua calling conventions, the caller is not obliged to process all results.


Function documentation

csv
csv(obj:db,tab:tags,tab:times)
Output a comma separated file named "results.csv" for the given tags interpolated at the given times. The header will include both tag names and units. The first column includes the times converted in hours since the first specified time.
Parameters:
obj:db, database object.
tab:tags, array of tag names.
tab:times, times to interpolate at.
Errors:
Non-existing tag.
Wrong temporal type for interpolation.
Up to function index
interpolations
tab:values_per_tag=interpolations(obj:db,tab:tags,tab:times)
Returns a table of tables containing the values of a series of tags interpolated at the specified times.
Parameters:
obj:db, database object.
tab:tags, array of tags to interpolate.
tab:times, array of times to interpolate at.
Results:
tab:values_per_tag, table of tables containing the interpolated tag values.
Up to function index
s2t
num:t=s2t(str:s)
Convert a BTC-format time string into a LabVIEW timestamp.
Parameters:
str:s, string to convert.
Results:
num:t, time in seconds since the LabVIEW epoch.
Errors:
String too short.
Missing separation dot between days and hours.
Value out of range.
Up to function index
t2s
str:s=t2s(num:t)
Convert a LabVIEW timestamp into a BTC-format time string.
Parameters:
num:t, time in seconds since the LabVIEW epoch..
Results:
str:s, converted time string.
Up to function index
tcsv
tcsv(obj:db,tab:tags,tab:times)
Output a comma separated file named "results.csv" for the given tags interpolated at the given times. The header will include both tag names and units. The first two columns include the times converted a BTC time string and hours since the first specified time.
Parameters:
obj:db, database object.
tab:tags, array of tag names.
tab:times, times to interpolate at.
Errors:
Non-existing tag.
Wrong temporal type for interpolation.
Up to function index
timeseries
tab:times=timeseries(num:be,num:en,num:step)
Return a series of times starting from the begin time and incremented by the specified step up to the end time. The last returned value does not exceed the specified end time.
Parameters:
num:be, begin time in seconds since the LabVIEW epoch.
num:en, end time in seconds since the LabVIEW epoch.
num:step, time step size in seconds.
Results:
tab:times
Up to function index
units
tab:units=units(tab:tags)
Return the unit strings of the given tags.
Parameters:
tab:tags
Results:
tab:units
Up to function index