Campbell Scientific AM16/32B AM16/32B Relay Multiplexer - Page 26

CR5000 and CR3000 Programming

Page 26 highlights

AM16/32B Relay Multiplexer PulsePort (5,10000) 'Clock Mux CS616 (Period(I),3,1,6,3,1.0,0) 'measure 3ea CS616 probes I=I+3 NextSubScan ' For I=1 to 48 'convert CS616 period to Volumetric Water Content VWC(I)=a0 + a1*Period(I) + a2*Period(I)^2 Next ' PortSet (4,0) 'Set Mux Reset line Low flag(1)= low EndIf ' CallTable Dat30min 'Call Output Tables NextScan EndProg 5.1.2 CR5000 and CR3000 Programming Although the following example is a CR5000 program, a similar program can be used for the CR3000. This CR5000 program uses the AM16/32B to measure 16 100 ohm Platinum Resistance Thermometers connected in the 4x16 configuration. The program also measures 6 copper constantan thermocouples. CR5000 C1 C2 IX1 IXR 7H 7L AM16/32B Control/Common Sensor Terminals Reset Odd H Clock Odd L COM Odd H Even H COM Odd L Even L COM Even H COM Even L PRT(4 Wires) Excitation Excitation Return Sense wire excitation side Sense wire return side 'CR5000 Example Program to measure 16 100 ohm Platinum Resistance Thermometers 'connected to an AM16/32B multiplexer used in the 4x16 configuration. The program also 'measures 6 copper constantan thermocouples. 'The Thermocouples are connected to differential channels 1-6. 'Declare Variables: Public TRef, TCTemp(6), PRTResist(16), PRTTemp(16) Dim I 'Counter for setting Array element to correct value for mux measurement 'Declare Output Table for 15 minute averages: DataTable (Avg15Min,1,-1) DataInterval (0,5,Min,10) Average (1,TRef,IEEE4,0) Average (6,TCTemp(),IEEE4,0) Average (16,PRTTemp(),IEEE4,0) EndTable BeginProg Scan (60,Sec,3,0) PanelTemp (TRef,250) TCDiff (TCTemp(),6,mV20C ,1,TypeT,TRef,True ,0,250,1.0,0) Portset (1 ,1) 'Set C1 high to Enable Multiplexer I=0 SubScan(0,sec,16) 'Pulse C2 (Set High, Delay, Set Low) to clock multiplexer Portset (2,1 ) Delay (0,20,mSec) Portset (2,0) 16

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

AM16/32B Relay Multiplexer
PulsePort (5,10000)
'Clock Mux
CS616 (Period(I)
,3,1.0
,3,1,6
,0)
16 probes
'measure 3ea CS6
I=I+3
NextSubScan
'
For I=1 to 48
616
olumetric Water Content
'convert CS
period to V
VWC(I)=a0 + a1*
od(I) + a
iod(I)^2
Peri
2*Per
Next
'
PortSet (4,0)
x Reset line
'Set Mu
Low
flag(1)= low
EndIf
++++++++++++
++++
'++++
+++++++
'
CallTable Dat30mi
put Tabl
n
'Call Out
es
NextScan
EndProg
5.1.2 CR5000 and CR3000 Programming
m, a similar program can
he AM16/32B to
easure 16 100 ohm Platinum Resistance Thermometers connected in the 4x16
ation.
The program also measures 6 copper constantan thermocouples.
M16/32B
PRT(4 Wires)
Although the following example is a CR5000 progra
e used for the CR3000.
This CR5000 program uses t
b
m
configur
CR5000
A
Control/Common
Sensor Terminals
C1
Reset
Odd H
Excitation
C2
Clock
Odd L
Excitation Return
IX1
COM Odd H
Even H
Sense wire excitation side
IXR
COM Odd L
Even L
Sense wire return side
7H
COM Even H
7L
COM Even L
'CR5000 Example Program to measure 16 100 ohm Platinum Resistance Thermometers
'connected to an AM16/32B multiplexer used in the 4x16 configuration. The program also
'measures 6 copper constantan thermocouples.
'The Thermocouples are connected to differential channels 1-6.
'Declare Variables:
Public TRef, TCTemp(6), PRTResist(16), PRTTemp(16)
Dim I
'Counter for setting Array element to correct value for mux measurement
'Declare Output Table for 15 minute averages:
DataTable (Avg15Min,1,-1)
DataInterval (0,5,Min,10)
Average (1,TRef,IEEE4,0)
Average (6,TCTemp(),IEEE4,0)
Average (16,PRTTemp(),IEEE4,0)
EndTable
BeginProg
Scan (60,Sec,3,0)
PanelTemp (TRef,250)
TCDiff (TCTemp(),6,mV20C ,1,TypeT,TRef,True ,0,250,1.0,0)
Portset (1 ,1)
'Set C1 high to Enable Multiplexer
I=0
SubScan(0,sec,16)
'Pulse C2 (Set H
Set Low) to clock multiple
igh, Delay,
xer
Portset (2,1 )
Delay (0,20,mSec)
Portset (2,0)
16