7 read special ps200/ch200 settings and variables, 8 power usage, Read special ps200/ch200 settings and variables – Campbell Scientific PS200/CH200 12 V Charging Regulators User Manual
Page 54: Power usage, Ps200/ch200

PS200/CH200 12 V Charging Regulators
6.3.3.7 Read Special PS200/CH200 Settings and Variables
Host command string: RD_SPECIAL>
PS200/CH200 response string: *,nnnn,nnnn,….,cc0
where “nnnn” refers to ASCII character strings that are separated by ASCII
commas, “cc” is a two-character CRC nullifier, and 0 is the string terminator.
The PS200/CH200 character strings occur in the following order (the sequence
order numbers shown below do not occur in the character strings):
1 - Target Battery Voltage, 2 - Digital Pot Setting, 3 - Capacity, 4 – Qloss, 5
- Continuous Input Volts.
The character strings are numerical values expressed in ASCII numerals and
decimal points except for Charge State and Charge Source, which appear as
ASCII letter strings.
See Appendix A.4.2, Zero Out QLoss RS-232 Programming Example, for a
programming example using this instruction.
6.3.3.8 Power Usage
Although this is not an instruction in and of itself the ability to calculate power
usage by the battery and the system is a very powerful capability of the
PS200/CH200. Measuring and storing power usage is useful to determine
system power requirements (power budget) and help to identify devices using
too much power.
See Appendix A.5.2, Station Power Usage RS-232 Programming Example, for
a programming example.
6.3.4 Datalogger Programming for RS-232 Communication to the
PS200/CH200
The normal condition for the PS200/CH200 is that it expects SDI-12
communication, so when the host first sends RS-232 characters, the first
character might be missed. Therefore, the host should initiate RS-232
communication by sending two backspace characters (hexadecimal 08). See
the example below.
'Subroutine sends two back space characters to the PS/CH200 to
'wake it up and switch over to RS-232 mode.
Sub WAKEUP
SerialOut (COMPRT,CHR(&H08),"",1,3)
SerialOut (COMPRT,CHR(&H08),"",1,3)
EndSub
In processing the strings from a PS200/CH200, use the CRBasic instruction
“SerialIn” and then use the instruction “SplitStr” to separate the numerical
values into individual values. The CRBasic instruction “Checksum” can
optionally be used to validate data from a PS200/CH200. If “CheckSum” is to
be used, two successive “SerialIn” instructions should be used—one to discard
everything up to and including the “*” character which starts a PS200/CH200
response string, and another to obtain all the characters after the “*” up to and
including the string terminator character, zero.
46