Campbell Scientific 4WFBS120, 4WFBS350, 4WFBS1K 4 Wire Full Bridge Terminal Input Modules User Manual
Page 16
4WFBS120, 4WFBS350, 4WFBS1K 4 Wire Full Bridge Terminal Input Modules (TIM)
Example Program 4.3. CR1000 ¼ Bridge Strain using an AM16/32B
Multiplexer with 16 reps and zero offset
This example program has 16 strain gages multiplexed through an AM16/32
Multiplexer and uses FieldCalStrain for zeroing.
'
Program name: QuarterStrain with Zero and Mux.CR1
' This is only an example program and should be used only for help in creating a usable program
' ----------------------------------------------- WIRING ----------------------------------------------------------
' CR1000
to
AM16/32 Multiplexer Control
' C1 (Control Port 1)
Res (Reset)
' C2 (Control Port 2)
Clk (Clock)
' G
GND (Ground)
' 12V
12V
' CR1000 to
AM16/32 Common
TIMs
to
AM16/32 Banks
' Diff 1H
to
Common Even Hi
Blk Wire to
Bank Odd Lo
' Diff 1L
to
Common Even Lo
TIM H
to
Bank Even Hi
' EX1
to
Common Odd Lo
Tim L
to
Bank Even Lo
' AG
to
Common Gnd
Tim AG to
Bank Even AG
'\\\\\\\\\\\\\\\\\\\\\\\DECLARE VARIABLES and CONSTANTS ///////////////////////
Const
REPS = 16
'Strain gage sensor count
Public
MVpV(REPS)
:
Units
MVpV = mV_V
'mV per Volt output from Bridge Measurement
Public
STRAIN(REPS)
:
Units
STRAIN = uStrain
'Variable where uS is stored,
Const
BATCH_GF = 2.1 :
Publi
c GF(REPS)
'Batch Gage Factor
Public
mV_VZero(REPS) :
Units
mV_VZero = mV_V
'Variable for Zero mV per V reading
Public
CalReps, ZeroMode, ZeroStartIdx, ZeroCalAvgs
'Used by wizard for zeroing
Public
CalFileLoaded As Boolean
Dim
I
'\\\\IF DESIRED (NOT REQUIRED): GIVE STRAIN VARIABLES UNIQUE ALIAS NAMES ////////
Alias
STRAIN(1) = Strain1
:
Alias
STRAIN(2) = Strain2
: Alias
STRAIN(3) = Strain3
Alias
STRAIN(4) = Strain4
:
Alias
STRAIN(5) = Strain5
: Alias
STRAIN(6) = Strain6
Alias
STRAIN(7) = Strain7
:
Alias
STRAIN(8) = Strain8
: Alias
STRAIN(9) = Strain9
Alias
STRAIN(10) = Strain10
:
Alias
STRAIN(11) = Strain11
: Alias
STRAIN(12) = Strain12
Alias
STRAIN(13) = Strain13
:
Alias
STRAIN(14) = Strain14
: Alias
STRAIN(15) = Strain15
Alias
STRAIN(16) = Strain16
'\\\\\\\\\\\\\\\\\\\\\\\\ OUTPUT SECTION ////////////////////////
' Table STRAIN stores uStrain and raw mV per Volt measurements to the PC Card
DataTable
(STRAIN,True,-1)
'Trigger, auto size
DataInterval
(0,0,0,100)
'Synchronous, 100 lapses
CardOu
t(0,-1)
'PC card , Autosize
Sample
(REPS,STRAIN(),IEEE4)
'Sample uStrain
Sample
(Reps,mVpV(),IEEE4)
'Sample raw mV per Volt values
EndTable
'End of table
' Table CalHist uses SampleFieldCal which stores all of the Calibration constants
' When a calibration function is complete, user should always collect this Table as a record
DataTable
(CalHist,NewFieldCal,50)
SampleFieldCal
EndTable
'\\\\\\\\\\\\\\\\\\\\\\\\MAIN PROGRAM SECTION ////////////////////////
BeginProg
'Program begins here
For
I = 1
To
REPS
' For the 16 gages
GF(I) = BATCH_GF
'Assign default gauge factor (2.1) to GF array elements
Next
I
'Loop back up until complete
CalFileLoaded =
LoadFieldCal
(1)
'Load the Cal constants if program signature matches
10