beautypg.com

1. operators, Functions -8 – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 144

background image

Section 8. Datalogger Program Creation with Edlog

Following are rules for creating expressions:

• Expressions must be set equal to the label of the Input Location that will

store the result. The result label must be to the left of the expression.

• Expressions can have both fixed numbers and Input Location labels. Input

Locations can only be referenced by their label; each number in an expression
is assumed to be a constant.

• Floating-point numbers are limited to six digits plus the decimal point and

sign.

• The operator(s) and/or function(s) used in the expression are limited to

those in the Operator and Function list (TABLE 8-1 below).

• Numbers and labels that appear immediately after a function must be

enclosed in parentheses.

• Several operators and/or functions can be used in one expression.

Operations and functions that are enclosed in parentheses are calculated
first; the innermost parentheses are evaluated first.

• To continue an expression to the next line, end the first line with an

underscore ( _ ).

TABLE 8-1. Operators and Functions

Operators
* multiply
/ divide
+ add
- subtract
^

raise to the power of; enclose negative values in parentheses

@ modulo

divide

E scientific

notation;

6e-1=0.6

Functions
COS

cosine; angle in degrees

SIN

sine; angle in degrees

TAN

tangent; angle in degrees

COTAN

cotangent; angle in degrees

ARCTAN

arctangent; angle in degrees

ARCSIN

arcsine; angle in degrees

ARCCOS

arccosine; angle in degrees

ARCCOT

arccotangent; angle in degrees

SQRT square

root

LN natural

logarithm

EXP

exponent of e; EXP(2) = e

2

RCP

reciprocal; RCP(4) = 1/4 = 0.25

ABS absolute

value

FRAC

takes the fraction portion; FRAC(2.78)=.78

INT

takes the integer portion; INT(2.78)=2

8-8