Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Command to have the CR1000 Automatically Restart Every 2 Days


SeanC1335 Feb 27, 2021 11:55 PM

I recently replaced my Raven XT modem with a Cradlepoint LTE modem hooked to my CR1000 via the NL-121 interface. This new modem has proven to be a drain on the battery and will occasionally cause the whole system voltage to drop if there have been too many cloudy days without solar recharge where the CR1000 and modem lose power then reboot.

When sufficient voltage returns to the system once the sun is up and both devices power up and the CR1000 collects data, however I lose network connectivity between the CR1000 and modem. According to a friend who lives out there and goes and reboots the station for me, unplugging and plugging the power to the CR1000 causes the network link to re-establish with the modem right away .

Until a time when I can get out there to add a bigger battery and/or solar panel is there a simple "Restart" command" I can add to to my existing CR Basic program to have the CR1000 Restart every two days, where it doesn't lose any of the table data?

I've tried adding the Restart command under a Scan, and that wouldn't compile saying you can't do a scan for more than 1 day, but would that even work?  Would I need to set up some sort of time/hour count table that the Restart can reference and execute under some sort of If statement? 


pokeeffe Mar 1, 2021 07:39 PM

What is the value of EthernetPower in your datalogger settings? And are you using the latest OS release? I seem to recall the default value was changed to "1 Minute" and it's possible the logger is not recognizing the modem when it checks for an active link. You can use the EthernetPower() instruction in your program, or just change it permanently to "Always on" (though doing so could exasperate your power situation). 

The EthernetPower setting is not that new but it is poorly documented. Some manuals have no explanation while others provide conflicting info. Here are the full details from the actual Loggernet Connect Settings screen:

Mode
Description

Always On
The Ethernet interface will always be powered and will contribute approximately 50 mA at 12 Vdc to the power budget regardless of the connectivity. Using this mode is recommended if using IPNetPower() to control Ethernet power under program control.

1 Minute
The Ethernet interface powers on for a few seconds every 1 minute to detect an active network link pulse. If a link is present, the interface will remain on until the cable is removed or the network is shut down. This setting allows the Ethernet interface to be available for periodic use without a significant contribution to power consumption when a link is not present.

Disable
The Ethernet interface will be disabled. Memory will not be allocated for IP communications if no other active IP interface is present.

The other potentially helpful instruction is IPNetPower(). This instruction is also not documented, except for within the CRBasic Program Reference. Here are the relevant remarks on its usage: 

IPNetPower controls power to IP network interfaces in the datalogger, including the NL116/NL121 Ethernet interface on the peripheral port, or CS I/O Ethernet interfaces. The default state of Ethernet power is on, and Ethernet power will stay on until this instruction is executed to turn it off.

The Interface parameter is used to select the interface to control. The State parameter determines whether the power is on or off. When State is 0, a command is sent to the interface to put it into sleep mode. Power to network interfaces may also be contolled with settings in the datalogger’s Settings table (e.g., EthernetEnable). The Timeout parameter is optional and if the state is non-zero, the interface will be powered on and remain on for the time specified by the Timeout. The Timeout is refreshed when activity is detected, thus keeping the interface on while communications are active. The interface will be powered off the number of seconds specified by Timeout after the last detected activity.

To control power to all Ethernet interfaces with one instruction, use the EthernetPower instruction.

Interface

The Interface parameter selects the devices to be controlled with this instruction. 1 = Ethernet; 2 = CS I/O Interface(1) (NL201 series by default); 3 = CS I/O Interface(2) (NL241 series by default).

State

The State parameter controls the power. A non-zero value turns the power on; zero turns the power off. 

Timeout

The Timeout parameter is optional and used when powering on the interface. The timeout is the number of seconds the interface will stay powered on after the last activity is detected on the Interface. If no activity is detected during this timeout, then the interface will power off.

These two instructions should help you restore the network link programmatically. Another approach to consider would be turning the modem off & on under program control, either via separate relay or by toggling the "ignition sense" signal, if provided. 

*(Sorry about the formatting, it's a forum limitation.)*


paulhenge Dec 8, 2023 04:51 AM

This post is under review.

Log in or register to post/reply in the forum.