IPNetPower (Ethernet Power)

IPNetPower controls power to a specific IP network interface. To control power to all IP network devices simultaneously, use the EthernetPower instruction instead.

Syntax

IPNetPower ( Interface, State, Timeout )

Remarks

The first 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. This instruction is the same as the Ethernet Interface Enabled setting in the datalogger’s Settings table. 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.

Parameters

IPNetInterface (Interface to Power On/Off)

Used to select the interface to be powered on or off: 1 = internal Ethernet; 2 = CS I/O Interface(1) (NL201 by default); 3 = CS I/O Interface(2) (NL241 by default); 4 = internal Wi-Fi; 5 = CS Cell2XX-Series cellular modem. Right-click the parameter to display a drop-down list with the valid options.

Type: Constant

State (Power State)

Determines whether the power is on or off. A non-zero value turns the power on; zero turns the power off. Right click the parameter for a drop-down list.

Type: Constant or variable

Timeout

The Timeout parameter is the number of seconds the interface will stay powered on after the last activity is detected on the Interface. 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.

NOTE:   Cell interfaces often experience frequent network traffic, which typically prevents them from shutting down. If shutting down a cell interface is desired, setting a short timeout (minimum of one second), in the optional timeout parameter can be used to prompt a shutdown.

Type: Constant