Appendix B. Configuring the Raven Modem for PPP
Example CR1000 Program
The following example sends an email message when an alarm condition is
True. Both the CR1000 and Raven modem must be configured as PPP as
described above.
CR1000 Program Example to Send Email Message
'Main program variables
Public Batt, RefTemp, Temp
'declare Email parameter strings (as constants), Message String & Result Variable
Const ServerAddr="smtpauth.earthlink.net"'"207.69.189.201"
Const ToAddr="[email protected]"
Const FromAddr="[email protected]"
Const Subject="Email Message Test"
Const Attach=""
Const UserName="[email protected]"
Const Password="cr1000"
Const CRLF = CHR(13)+CHR(10)
Public Result as String * 100
Public AlarmTrigger As Boolean
Public Message As String * 250
Public EmailSuccess As Boolean
BeginProg
Scan
(1,Sec,3,0)
Battery
(Batt)
PanelTemp
(RefTemp,250)
TCDiff
(Temp,1,mV2_5C,1,TypeT,RefTemp,True ,0,250,1.0,0)
NextScan
SlowSequence
Scan(1,sec,1,0)
If AlarmTrigger = False Then
If Temp > 28 THEN AlarmTrigger = True
If
AlarmTrigger
Then
Message
=
"Warning!" + CRLF + CRLF
Message = M "This is a automatic email message from the datalogger station " + Status.Stati ". "
Message
=
Message
+
"An
alarm condition has been identified. "
Message
=
Message
+
"The
temperature
is
" + Temp + " degrees C." + CRLF + CRLF + CRLF
Message = M "Datalogger time is " + Status.Timestamp
EmailSuccess=EmailSend
(ServerAddr,ToAddr,FromAddr,Subject,Message,Attach,UserName,Password,Result)
EndIf
EndIf
If Temp < 28 then AlarmTrigger=False
NextScan
EndProg
B-5
Содержание Raven100
Страница 4: ...Raven100 Table of Contents ii This is a blank page...
Страница 21: ...Raven100 CDMA AirLink Cellular Modem 17...
Страница 26: ...Raven100 CDMA AirLink Cellular Modem 22 This is a blank page...
Страница 30: ...Appendix A Wireless Ace Setup without Template File A 4 This is a blank page...
Страница 36: ...Appendix B Configuring the Raven Modem for PPP B 6 This is a blank page...
Страница 37: ...This is a blank page...