CS-3G Digital Transceiver Kits (including the COM111 modem)
A-2
For extreme low power consumption applications where the modem has to be left
powered on it is possible to disable the status LED which will save a further
1-2 mA power use on average. Please contact Campbell Scientific for further
details on how to do this.
The code below implicitly performs a
“hard-reset”
of the logger as it is forced to
power up from cold. You can use this code just for a hard reset, rather than
saving power, by changing the off/on time to be a few seconds. Additional code
can also be added to only call this code by checking if connection is lost to the
internet by using the IPPing command, for instance. Contact Campbell Scientific
for more details.
A.1.1 A CRBasic Program Example of Power Control/hard reset
This example can be used on the CR6, CR300, CR800 series, CR1000 and
CR3000 dataloggers with only minor amendments. It uses the standard CRBasic
serialopen, serialout and serialclose commands to send out configuration
commands to the modem. The example shows using a slow sequence to turn on
and then turn off the modem after 5 minutes. When it comes to turn off the
modem it sets a flag. If communications are still active the modem is not turned
off unless a full 15 minutes have expired since it was turned on. Please note that
the logger may indicate that a Com port is active all the time when used with a
PPP connection.
This example also shows how to log off the network before power is turned off
(using AT+CFUN=0) and how to disable a PPP connection if the logger is setup
to make a PPP connection automatically for IP communications.
'CR1000 Series Datalogger
'Example program showing how to turn on/off a GSM modem
'This example only turns on the modem for 5 minutes, but extends the time on for up
'to 15 minutes if the com port is active when it is time to shutdown.
'Also includes the correct sequence to shutdown the modem cleanly before turning
'off the power.
'The modem control is done in a slow sequence to avoid interference
'with measurements
'Declare Public Variables
'Example:
Public PTemp, batt_volt
'Main Program
BeginProg
'Normal measurements in the main scan here
Scan (1,Sec,3,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
'......etc
NextScan
'-------------------------------------------------------------------
'Modem control slow sequence - can be cut and pasted as self-contained
'Set this constant to match the port the modem is connected to
Const Modemport=COMRS232
Const Modembaud = 115200 'Change to match modem baud rate
Public timetogooff As Boolean
SlowSequence
'Run once a minute so can have one minute resolution of timing
Scan (1,Min,3,0)
'Every hour, in this example, turn on the modem
If TimeIntoInterval (0,60,Min) Then
'Turn on the SW12V port if using it
'SW12 (1 )
'OR