CS-GSM Digital Transceiver Kits (including the COM110 modem)
SlowSequence
'Run once a minute so can have one minute resolution of timing
Scan (1,Min,3,0)
'Every 12 hours, in this example and only if we are not communicating
If TimeIntoInterval (0,12,hr) AND (NOT status.commactiveRS232) Then
SerialOpen (Modemport,Modembaud,0,0,100)
'First send the +++ sequence to get the modem in command mode
SerialOut (Modemport,"+++","OK"+CHR(13),1,150)
'Send the command to reset the modem the connection wait up to 5 sec
SerialOut (Modemport,"AT+CFUN=1"+CHR(13),"OK"+CHR(13),1,500)
Delay(1,2,sec) 'Wait another 2 sec just to make sure the reset is complete
SerialClose(Modemport)
EndIf
NextScan
'--------------------------------------------------------------------
EndProg
E.3 CR10X Program Example
;{CR10X}
;Program example showing how to reset the COM110 once per
;day and also how to reset the low power mode
;Instruction 97 is used to send out the reset commands
*Table 1 Program
01: 10 Execution Interval (seconds)
;As an example includes a simple measurement and data storage
;example
1: Batt Voltage (P10)
1: 1 Loc [ Batt ]
2: If time is (P92)
1: 0 Minutes (Seconds --) into a
2: 1 Interval (same units as above)
3: 10 Set Output Flag High (Flag 0)
3: Real Time (P77)
1: 110 Day,Hour/Minute (midnight = 0000)
4: Sample (P70)
1: 1 Reps
2: 1 Loc [ Batt ]
;In this example Table 2 is only used to control sending of
;the reset commands to the attached COM110 unit
*Table 2 Program
02: 60 Execution Interval (seconds)
; At one minute to midnight set flag 8 low to force the
; module to be reset
; Note this will also happen immediately after the programmed
E-2