Campbell Scientific CR1000 Measurement and Control System User Manual

Page 498

Advertising
background image

Appendix A. CRBasic Programming Instructions

498 

 

 

Floor 
Rounds a value to a lower integer. 

Syntax 

variable = Floor(Number)

FRAC 
Returns the fractional part of a number. 

Syntax 

x = FRAC(source)

INT or FIX 
Return the integer portion of a number. 

Syntax 

x = INT(source)
x = Fix(source)

INTDV 
Performs an integer division of two numbers. 

Syntax 

X INTDV Y

LN or LOG 
Returns the natural logarithm of a number. Ln and Log perform the same 
function. 

Syntax 

x = LOG(source)
x = LN(source)

Note LOGN = LOG(X) / LOG(N)

LOG10 
The LOG10 function returns the base‐10 logarithm of a number. 

Syntax 

x = LOG10 (number)

MOD 
Modulo divide.  Divides one number into another and returns only the 
remainder. 

Syntax 

result = operand1 MOD operand2

PWR 
Performs an exponentiation on a variable. Same functionality as ^ operator 
(6.6.1). 

Syntax 

PWR(X, Y)

RectPolar 
Converts from rectangular to polar coordinates. 

Syntax 

RectPolar(Dest, Source)

Advertising