beautypg.com

2 cr5000 and cr3000 programming, Cr5000 and cr3000 programming – Campbell Scientific AM16/32B Relay Multiplexer User Manual

Page 26

background image

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