beautypg.com

Intdv, Iftime(tintoint, interval, units), Syntax – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 306

background image

Section 8. Processing and Math Instructions

Public HexString As String, DecString, Expression
DataTable (HexTable,True,-1)
Sample

(1,Expression,FP2)

Sample

(1,HexString,String)

Sample

(1,DecString,FP2)

EndTable
BeginProg
Scan (1,Sec,3,-1)
HexString=Hex(Expression)
DecString=

HEXTODEC

(HexString)

CallTable (HexTable)
NextScan
EndProg

INTDV

The INTDV function performs an integer division of two numbers.

Syntax
Result = Var1 INTDV Var2

Remarks
The INTDV function divides one number by another and returns the integer
portion of the result. The function can be used in an expression or set equal to a
variable.

INTDV Function Example
In the following example an integer division is performed on two variables
(X, Y) and the result is stored in another variable (Result). For the values given,
Result would equal 3.

Public Result, X, Y
BeginProg

X = 7

Y = 2

Scan (1,Sec,3,0)

Result = X

INTDV

Y

NextScan

EndProg

IfTime(TintoInt, Interval, Units)

The IfTime instruction is used to return a number indicating True (-1) or False
(0) based on the datalogger's real-time clock.

Syntax
IfTime
(TintoInt, Interval, Units)

8-20