beautypg.com

A.8 clock functions – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 505

background image

Appendix A. CRBasic Programming Instructions

505

 

StrComp 
Compares two strings by subtracting the characters in one string from the 
characters in another 

Syntax 

Variable = StrComp(String1, String2)

SplitStr 
Splits out one or more strings or numeric variables from an existing string. 

Syntax 

SplitStr(SplitResult, SearchString, FilterString, NumSplit,

SplitOption)

SPrintF 
Converts data to formatted strings.  Returns length of formatted string.  Replaces 
FormatFloat() and FormatLong(). 

Syntax 

length = SPrintF(Destination, format,...)

Trim 
Returns a copy of a string with no leading or trailing spaces. 

Syntax 

variable = Trim(TrimString)

UpperCase 
Converts a string to all uppercase characters 

Syntax 

String = UpperCase(SourceString)

A.8 Clock Functions

Within the CR1000, time is stored as integer seconds and nanoseconds into the
second since midnight, January 1, 1990.

ClockChange 
Returns milliseconds of clock change due to any setting of the clock that 
occurred since the last execution of ClockChange. 

Syntax 

variable = ClockChange

ClockReport 
Sends the datalogger clock value to a remote datalogger in the PakBus network. 

Syntax 

ClockReport(ComPort, RouterAddr, PakBusAddr)

ClockSet 
Sets the datalogger clock from the values in an array. 

Syntax 

ClockSet(Source)