beautypg.com

A.2 change battery capacity, A.2.1, And appendix a.2, change battery capacity , using – Campbell Scientific PS200/CH200 12 V Charging Regulators User Manual

Page 68

background image

Appendix A. Advanced Programming Techniques

'Values for check battery start with zero. Have to shift the value
'by one to line it up with the correct words in the array.

CheckBattery = CheckBatteryArr(Ck_Batt + 1)
EndIf
NextScan
EndProg

A.2 Change Battery Capacity

Battery capacity is used by the PS/CH200 to determine when to switch from a
higher current charge state, such as cycle charging or current limited, to a lower
current charging state – float charging. The reason for the switching back and
forth is to charge the battery in the quickest possible time without damaging
the battery. By default the PS200 is set to a battery capacity of 7 Amp-hours
and the CH200 is set to a battery capacity of zero. Setting the battery capacity
to zero forces the CH200 to only charge at the lower float charging rate. When
the CH200 is built it is not known what Amp-hour capacity of battery will be
used with it so it is purposely set to a lower charging rate to protect the user.

Setting the battery capacity can be done via Device Configuration Utility or in
the field using the following programs. Both of the following programs look at
a variable that contains the battery capacity to be used with the charger. When
this value is changed the datalogger will automatically send the new value to
the charger.

A.2.1 Change Battery Capacity SDI12 Programming Example

'CR1000 Series Datalogger
'Program: SDI12_Set_Batt_Cap.CR1
'Date: 7.October.2010

'Ver: A
'
'Notes: This program sets the battery capacity in the PS/CH200

'via SDI-12.
'PS200/CH200 configured with SDI-12 address 0 (zero).
'

'Use Campbell Scientific SDI-12 cable part # 20769.
'

'SDI-12 CABLE TO CR1000 WIRING
'-----------------------------
'WHITE: C3

'BLACK: G
'CLEAR: G
'

'Public Variables
Public PanelTempC

'Datalogger panel temperature: Celsius

Public CH200_M0(6)

'Array to hold data coming from the PS200/CH200

'Alias names for array elements.
Alias CH200_M0(1)=VBatt

'Battery voltage: VDC

Alias CH200_M0(2)=IBatt

'Current going into, or out of, the battery: Amps

Alias CH200_M0(3)=ILoad

'Current going to the load: Amps

Alias CH200_M0(4)=V_in_chg

'Voltage coming into the charger: VDC

Alias CH200_M0(5)=I_in_chg

'Current coming into the charger: Amps

Alias CH200_M0(6)=Chg_TmpC

'Charger temperature: Celsius

A-6