Campbell Scientific CR5000 Measurement and Control Module User Manual
Page 198

Section 8. Processing and Math Instructions
8-26
To have the program generate a different random-number sequence each time
it is run, use the Randomize statement with no Number argument to initialize
the random-number generator before RND is called.
To produce random integers in a given range, use this formula:
INT( ( upperbound - lowerbound + 1 ) * RND + lowerbound )
Here, upperbound is the highest number in the range, and lowerbound is the
lowest number in the range.
StrainCalc (Dest, Reps, Source, BrZero, BrConfig, GF, v)
Converts the output of a bridge measurement instruction to microstrain.
Syntax
StrainCalc (Dest, Reps, Source, BrZero, BrConfig, GF, v)
Remarks
Calculates microstrain,
µ∈
, from the appropriate formula for the bridge
configuration. All are electrically full bridges , the quarter bridge, half bridge
and full bridge strain gages refer to the number of active elements (i.e., strain
gages), 1,2, or 4 respectively.
Parameter
& Data Type
Enter
Dest
Variable to store strain in.
Reps
Number of strains to calculate, Destination, source, and zero variables must
be dimensioned accordingly.
BrConfig
Bridge configuration code for strain gages The bridge configuration code
can be entered as a positive or negative number:
+ code:
V
r
=
−
0 001
.
(
)
Source
Zero
; bridge configured so its output
decreases with increasing strain.
- code:
V
r
= −
−
0 001
.
(
)
Source
Zero
; bridge configured so output
increases with strain. This is the configuration for a quarter bridge using
CSI’s 4WFB350 Terminal Input Module (i.e., enter the bridge configuration
code as -1 for 1/4 bridge with TIM.)
Code
Configuration
1
Quarter bridge strain gauge
µε =
− ⋅
+
4 10
1 2
6
V
GF
V
r
r
(
)
2
Half bridge strain gauge, one gage parallel to strain, the other at 90
°
to strain:
µε
ν
ν
=
− ⋅
+ −
−
4 10
1
2
1
6
V
GF
V
r
r
[(
)
(
)]
3
Half bridge strain gauge, one gage parallel to
+ε
, the other parallel
to
−ε
:
µε =
− ⋅
2 10
6
V
GF
r