![Campbell COM110A Скачать руководство пользователя страница 50](http://html1.mh-extra.com/html/campbell/com110a/com110a_user-manual_3760132050.webp)
CS-GSM/GPRS Digital Transceiver Kits (including the COM110A modem)
A-2
'Main Program
BeginProg
'Normal measurements in the main scan here
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (Batt_volt)
'......etc
NextScan
'-------------------------------------------------------------------
'Modem control slow sequence - can be cut and paste as self-contained
'Set this constant to match the port the modem is connected to
Const Modemport=COMME
Const Modembaud = 9600 'Change to match modem baud rate
SlowSequence
'Run once a minute so can have one min resolution of timing
Scan (1,Min,3,0)
'Every hour, in this example, turn on the modem
If TimeIntoInterval (0,60,Min) Then
'Set port 1 to 1 (ON) (use writeio as in slowsequence)
WriteIO (&B00000001,1)
Delay(1,2,sec) 'Allow 2 seconds for the modem to power on
SerialOpen (Modemport,modembaud,0,0,100)
'Send the command to unlock the pin code (PIN=601141 in this case)
'Allow one retry
SerialOut (Modemport,"AT+CPIN=601141"+CHR(13),"OK"+CHR(13),1,100)
SerialClose(Modemport)
EndIf
'10 minutes later turn the modem off
If TimeIntoInterval (10,60,Min) Then
SerialOpen (Modemport,modembaud,0,0,100)
'Send the command to log off the network and shutdown cleanly
SerialOut (Modemport,"AT+CFUN=0"+CHR(13),"OK"+CHR(13),1,300)
SerialClose(Modemport)
'Set port 1 to 0 (LOW) (use writeio as in slowsequence)
Delay(1,2,sec) 'Allow 2 seconds for the modem to shutdown
WriteIO (&B00000001,0)
EndIf
NextScan
EndProg
Содержание COM110A
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 10: ......
Страница 48: ...CS GSM GPRS Digital Transceiver Kits including the COM110A modem 38...
Страница 54: ......
Страница 60: ......
Страница 66: ......
Страница 68: ...CS GSM GPRS Digital Transceiver Kits including the COM110A modem D 2...
Страница 72: ......
Страница 75: ......