A.6 processing and math instructions, A.6.1 mathematical operators, A.6.2 arithmetic operators – Campbell Scientific CR3000 Micrologger User Manual

Page 495: Table 119. arithmetic operators

Advertising
background image

Appendix A. CRBasic Programming Instructions

495

 

SDMTrigger 
Synchronize when SDM measurements on all SDM devices are made. 

Syntax 

SDMTrigger

SDMX50 
Allows individual multiplexer switches to be activated independently of the 
TDR100 instruction. 

Syntax 

SDMX50(SDMAddress, Channel)

TDR100 
Directly measures TDR probes connected to the TDR100 or via an SDMX50. 

Syntax 

TDR100(Dest, SDMAddress, Option, Mux/ProbeSelect, WaveAvg,

Vp, Points, CableLength, WindowLength, ProbeLength,
ProbeOffset, Mult, Offset)

TimedControl 
Allows a sequence of fixed values and durations to be controlled by the SDM task 
sequencer enabling SDM‐CD16x control events to occur at a precise time.  See 
the appendix Relay Drivers

 (p. 565).

 

Syntax 

TimedControl(Size, SyncInterval, IntervalUnits, DefaultValue,

CurrentIndex, Source, ClockOption

A.6 Processing and Math Instructions

A.6.1 Mathematical Operators

Note Program declaration AngleDegrees() (see Program Declarations

(p. 475)

)

sets math functions to use degrees instead of radians.

A.6.2 Arithmetic Operators

Table 119. Arithmetic Operators

Symbol Name

Notes

^

Raise to power

Result is always promoted to a float

(p. 147)

to avoid problems that

may occur when raising an integer to a negative power. However,
loss of precision occurs if result is > 24 bits.
For example:
(46340 ^ 2) will yield 2,147,395,584 (not precisely correct)
whereas,
(46340 * 46340) will yield 2,147,395,600 (precisely correct)
Simply use repeated multiplications instead of ^ operators when
full 32-bit precision is required.
Same functionality as PWR()

(p. 500)

instruction.

*

Multiply

/

Divide Use

INTDV()

(p. 500)

to retain 32-bit precision

Advertising