Campbell Scientific PS200/CH200 12 V Charging Regulators User Manual
Page 44

PS200/CH200 12 V Charging Regulators
See Appendix A.4.1, Zero Out QLoss SDI12 Programming Example, for an
example program.
Recorder: M7! Available for future use.
Recorder: M8! Available for future use.
Recorder: M9! Available for future use.
Below is a CR1000 programming example that acquires all 9 measurements
once per minute from a PS200/CH200. Note that the PS200/CH200 does
internal averaging of the voltage, current, and temperature measurements, with
an averaging period that is set by the scan rate, so that in this example, the
measurements are 30 second averages:
'CR1000 Series Datalogger
'Program: SDI12_Status_Info.CR1
'Date: 1.September.2010
'Ver: A
'
'Notes: Program returns all information from PS200/CH200.
'PS200/CH200 configured with SDI-12 address 0 (zero).
'Connect the PS200/CH200 to SDI-12 port C3 of the CR1000.
'Use Campbell Scientific SDI-12 cable part # 20769.
'
'SDI-12 CABLE TO CR1000 WIRING
'-----------------------------
'WHITE: C3
'BLACK: G
'CLEAR: G
'
'Public variables.
'Datalogger panel temperature: Celsius
Public PanelTempC
'Array to hold all the data coming from the PS200/CH200
Public CH200_M0(9)
'Alias names for array elements.
'Battery voltage: VDC
Alias CH200_M0(1)=VBatt
'Current going into, or out of, the battery: Amps
Alias CH200_M0(2)=IBatt
'Current going to the load: Amps
Alias CH200_M0(3)=ILoad
'Voltage coming into the charger: VDC
Alias CH200_M0(4)=V_in_chg
'Current coming into the charger: Amps
Alias CH200_M0(5)=I_in_chg
'Charger temperature: Celsius
Alias CH200_M0(6)=Chg_TmpC
'Charging state: Cycle, Float, Current Limited, or None
Alias CH200_M0(7)=Chg_State
'Charging source: None, AC, or Solar
Alias CH200_M0(8)=Chg_Source
'Check battery error: 0=normal, 1=check battery
Alias CH200_M0(9)=Ck_Batt
'Arrays to hold the associated words for the charge state, charge source,
'and check battery values.
Dim ChargeStateArr(6) As String
Dim ChargeSourceArr(3) As String
36