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.

CR6 ethernet power for default.CR6 file


jonny Jun 11, 2017 10:09 PM

I'm attempting to write a default.CR6 file for a datalogger that makes sure the ethernet power will turn on after a remote OS update. I've tried EthernetPower(-1), as well as the IPNetPower commands but not seeming to have any luck. I also tried the SetStatus("EthernetPower", "1") commands with no luck (manual is a bit vague and says values range 0-4 with 4 off so tried 0-3).

I've been testing using device config, and just changing all the settings through there and checking the program correctly sets the datalogger back up. This works for the IP stuff but if I disable ethernet power it won't come back. Any ideas?

My program... 

BeginProg
  EthernetPower(-1)
  SetStatus ("PakBusAddress", "154")
  SetStatus ("StationName", Station)
  SetStatus ("IPAddressEth", "x.x.x.x")
  SetStatus ("IPGateway", "x.x.x.x")
  SetStatus ("IPMaskEth", "x.x.x.x")
	Scan (1,Sec,0,0)

	NextScan
EndProg

 


Normand_HQ Jun 19, 2017 01:41 PM

Hi,

I used the same configuration as Jonny did and the result is the same.  The IP address, Mask and Gateway are  OK using SetSettings or SetStatus but ethernet interface always remains to OFF


GaryTRoberts Jun 20, 2017 05:21 PM

Try

SetSetting("EthernetEnable", True)  (on) and SetSetting("EthernetEnable", False) (off)

Also EthernetPower takes Booleans.

EthernetPower(True) (on) and EthernetPower(False) (off). 

Also the help you are looking at is for setting EthernetPower not the instruction EthernetPOwer().  SetSetting("EthernetPower", 0) (always on), SetSetting("EthernetPower", 2) (1 minute), and SetSetting("EthernetPower", 4) (Always Off).


Normand_HQ Jun 20, 2017 08:42 PM

Thanks Gary,

I tried with the instruction SetSetting("EthernetEnable, True) and everything is working fine.

But I am wondering where this EthernethEnable comes from.  I didn't see this instruction neither in the manual nor help.

But anyway it's working


GaryTRoberts Jun 21, 2017 12:44 AM

If you go to the following website (https://www.campbellsci.com/downloads?c=9999&d=324), download the executable, then run it on the PC you are running the CRBasic Editor on, it will update the help for the CRBasic Editor as well as copy the latest OS for the CR6 to your computer's hard drive for later use.

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