Prt (dest, reps, source, mult, offset), Randomize (source) – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 194

Advertising
background image

Section 8. Processing and Math Instructions

8-22

PRT (Dest, Reps, Source, Mult, Offset)

Used to calculate temperature from the resistance of an RTD.

Syntax
PRT (
Dest, Reps, Source, Mult, Offset)

Remarks
This instruction uses the result of a previous RTD bridge measurement to
calculate the temperature. The input (Source) must be the ratio Rs/R0, where
Rs is the RTD resistance and R0 the resistance of the RTD at 0

°

C.

The temperature is calculated according to the DIN 43760 specification
adjusted (1980) to the International Electrotechnical Commission standard.
The range of linearization is -200

°

C to 850

°

C. The error in the linearization is

less than 0.001

°

C between -200 and +300

°

C, and is less than 0.003

°

C

between -180 and +830

°

C. The error (T calculated - T standard) is +0.006

°

at

-200

°

C and -0.006

°

at +850

°

C.

Parameter
& Data Type

Enter

Dest
Variable or
Array

The variable in which to store the temperature in degrees C.

Reps
Constant

The number of repetitions for the measurement or instruction.

Source
Variable or
Array

The name of the variable or array that contains the Rs/RO value(s).

Mult, Offset
Constant,
Variable,
Array, or
Expression

A multiplier and offset by which to scale the raw results of the
measurement. See the measurement description for the units of the raw
result; a multiplier of one and an offset of 0 are necessary to output in the
raw units. For example, the TCDiff instruction measures a thermocouple
and outputs temperature in degrees C. A multiplier of 1.8 and an offset of
32 will convert the temperature to degrees F.

Randomize

(Source)

Initializes the random-number generator.

Syntax
Randomize
(source)

Remarks
The argument number can be any valid numeric expression. Number is used to
initialize the random-number generator by giving it a new seed value. If you
omit number, the value returned by the Timer function is used as the new seed
value.

If Randomize is not used, the Rnd function returns the same sequence of
random numbers every time the program is run. To have the sequence of
random numbers change each time the program is run, place a Randomize
statement with no argument at the beginning of the program.

Advertising