Appendix C. Example Programs; Configuring Granite Measurement Module With Cpiaddmodule() - Campbell GRANITE VOLT Series Product Manual

Measurement modules
Table of Contents

Advertisement

Appendix C. Example programs

These programs were written for a GRANITE 9 data logger. With slight modifications, they can be
used with other Campbell Scientific data loggers.
C.1 Configuring GRANITE Measurement
Module with CPIAddModule()
The following program sets CPI addresses and device names on VOLT 108s with serial numbers
1234, 1235, and 1236 and makes a single-ended measurement on each module SE 1 channel.
With slight modifications, this program can be used with other Campbell Scientific data loggers.
'GRANITE 9 Datalogger
'This program sets CPI addresses and device names on VOLT108s.
'It makes a single-ended measurement on each unit's SE 1 channel.
'Declare Variables and Units
Public
SEVolt1
Public
SEVolt2
Public
SEVolt3
'Main Program
BeginProg
'Set CPI Addresses
CPIAddModule
(VOLT108,1234,
CPIAddModule
(VOLT108,1235,
CPIAddModule
(VOLT108,1236,
'Main Scan
Scan
(5,Sec,3,0)
'Single-ended voltage measurements on VOLT108s w/ CPI addresses 4, 5 and 6
CDM_VoltSe
(VOLT108,4,SEVolt1,1,mV5000,1,True,500,60,1,0)
CDM_VoltSe
(VOLT108,5,SEVolt2,1,mV5000,1,True,500,60,1,0)
CDM_VoltSe
(VOLT108,6,SEVolt3,1,mV5000,1,True,500,60,1,0)
NextScan
EndProg
CRBasic Example 4: Using CPIAddModule()
"A"
,CPI_BusA + 4)
"12345"
,CPI_BusA + 5)
"VOLT108 in Pump House"
,CPI_BusA + 6)
VOLT 100 series
45

Advertisement

Table of Contents
loading

This manual is also suitable for:

Granite volt 108Granite volt 116

Table of Contents