公共battery_voltage公共panel_temperature_c“蜂窝调制解调器diagnotics信息公共cell_todays_usage:单位cell_todays_usage = KB公共cell_yesterdays_usage:单位cell_yesterdays_usage = KB公共cell_this_months_usage:单位cell_this_months_usage = KB公共cell_last_months_usage:单位cell_last_months_usage = KB公共cell_rssi只要:单位cell_rssi = DB公共cell_info作为字符串* 400公共Cell_IP_Address作为字符串* 40公共Cell_RSRP作为长公共Cell_RSRQ公共Cell_Ecio公共Cell_Status作为String * 300 Public Cell_State作为String * 100 DataTable(Cell_Diagnostics,T​​rue,-1)示例(1,Cell_Todays_usage,FP2)'或样本(1,settings.cellusagetoday,fp2)样本(1,cell_yesterdays_usage,fp2)'或sample(1,settings.cellusagey interday,fp2)样本(1,cell_this_months_usage,fp2)'或sample(1,settings.cellusagemonth,fp2)样本(1,cell_last_months_usage,fp2)'或样本(1,settings.cellusagelastmontmon,fp2)样本(1,cell_rssi,Ieee4)'或样本(1,settings.cellrssi,IEEE4)样本(1,Cell_Info,String)'或Sample(1,Settings.cellInfo,String)样本(1,Cell_IP_Address,String)样本(1,Cell_RSRP,IEEE4)'或Sample(1,设置。CellRSRP,IEEE4)样本(1,Cell_RSRQ,FP2)'或Sample(1,Settings.cellRSRQ,FP2)样本(1,Cell_ecio,FP2)'或Sample(1,Settings.cellecio,FP2)样本(1,Cell_Status,字符串)或样本(1,setainst.cellstatus,String)示例(1,Cell_State,String)'或Sample(1,Settings.cellstate,String)可endTable DataTable(test_data,true,-1)datainerval(0,5,最小值,10)最小(1,Batter_Voltage,FP2,True,False)样本(1,Panel_Temperature_C,FP2)最终的“主程序BeginProg”通过CRBasic编程设置连接的Cell2xx模块。启用setSetting(“蜂窝单位”,True)'单元格调制解调器,True =已启用,False ='禁用SetSetting(“CellApn”,“We01.vzwstatic”)'由我们的蜂窝提供商分配给我们的APN。setSetting(“CellPWrstArtTime”,1440)'自动启动计划。设置在'分钟(进入日期)。1440 =始终打开。15 = '00:15小时,180 = 03:00小时,1380 = 23:00'小时塞列(“CellPwrduration”,0)'调制解调器在线停留在线之后的时间才能开始。 Setting is ignored if 'CellPwrStartTime is set to 1440 SetSetting("CellPwrRepeat", 0) 'Specifies the interval (in minutes) after the 'first time of the day that the datalogger 'powers on its cellular interface, that the 'datalogger will power its cellular interface at 'subsequent times throughout the day. 0 = 'disabled. SetSetting("CellBillingDay", 15) 'Tells the modem what day of the month to roll 'over its stats counters. Used to align it with 'my cellular provider’s billing dates. SetSetting("CellDiversity", 1) 'Turns on the use of the cell modules diversity 'antenna in the cellular module. 0 = OFF. 1 = 'ON. cell_ip_address = PPPOpen() 'Just make sure we are ready to go! Scan (1,Sec,0,0) PanelTemp (panel_temperature_c,60) Battery (battery_voltage) CallTable TEST_DATA NextScan SlowSequence Scan (10, Min, 0, 0) cell_rssi = Settings.CellRSSI 'read RSSI (signal strength) from tower connected to cell_todays_usage = Settings.CellUsageToday 'usage reported in KB cell_yesterdays_usage = Settings.CellUsageYesterday 'usage reported in KB cell_this_months_usage = Settings.CellUsageMonth 'usage reported in KB cell_last_months_usage = Settings.CellUsageLastMonth 'usage reported in KB cell_info = Settings.CellInfo 'Cell Info. Same information that shows in the 'DevConfig Cellular Network Status field cell_status = Settings.CellStatus 'Status of the cellular modem. cell_state = Settings.CellState 'State that the modem is in. "Network ready." lets me 'know my modem is good to go. 'CellState can be the following (but not limited to): '"Power off.", '"Powering up.", '"Powered up.", '"SIM authorized.", '"Setting baud rate.", '"Waiting for baud rate.", '"Baud rate set.", '"Baud rate failure.", '"Power off. Waiting for retry.", '"Powered up. SIM auth failure.", '"Querying modem.", '"Waiting for network registration.", '"Configuring modem.", '"Dialing.", '"Dialing (retry).", '"Dialed.", '"PPP negotiation.", '"Network ready.", '"PPP closing.", '"PPP paused.", '"PPP dropped.", '"Terminal AT command mode.", '"Firmware update mode.", '"Shutting down." cell_rsrp = Settings.CellRSRP 'Reference signal received power for LTE in dbm. 'Very similar to RSSI cell_ecio = Settings.CellECIO 'Reference signal received quality for 3G. cell_rsrq = Settings.CellRSRQ 'Reference signal received quality for 4G. cell_ip_address = IPInfo(1, 0) 'Get the TCP/IP address of the PPP/cellular modem 'interface. CallTable CELL_DIAGNOSTICS NextScan EndSequence EndProg
Baidu