Jump to content
OMRON Forums

Reset with Ethercat


NigelInWindsor

Recommended Posts

When the PPMAC boots it checks the hardware configuration and if it has changed since the last power up then it issues $$$***

 

The problem I have is that my Ethercat devices (2 off Robotic arms) take over 4 minutes to boot up. So the PPMAC doesn't see them and so issues the $$$***

 

When all the Ethercat devices have booted, I then have to issue a $$$ in order to load the correct last configuration.

 

Is there any way to disable the $$$*** and only do a $$$ during boot up?

Link to comment
Share on other sites

  • 1 month later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Do you have ecat[0].enable=1 saved?

 

What is likely happening is on power up the ethercat configuration is not valid since the robot device isn't present for a minute or two. If a project is not valid a factory default state is set.

 

Check via the powerpmac's ftp site ftp://192.168.0.200/usrflash/Project/Log for pp_error_hist.log this will verify how the loading failure occurred.

 

You can so set Ecat[0].enable=0 so there is not a power up fault.

 

Once your ethercat robot controllers are up you can set Ecat[0].enable=1 in your code. Perhaps you can use an ecatsdo to see if the robot controller is up.

Link to comment
Share on other sites

  • 3 weeks later...

Do you have ecat[0].enable=1 saved?

 

What is likely happening is on power up the ethercat configuration is not valid since the robot device isn't present for a minute or two. If a project is not valid a factory default state is set.

 

Check via the powerpmac's ftp site ftp://192.168.0.200/usrflash/Project/Log for pp_error_hist.log this will verify how the loading failure occurred.

 

You can so set Ecat[0].enable=0 so there is not a power up fault.

 

Once your ethercat robot controllers are up you can set Ecat[0].enable=1 in your code. Perhaps you can use an ecatsdo to see if the robot controller is up.

 

 

You are correct Ecat[0].enable is set to 1. If I set it to 0 it doesn't force the factory reset $$$***.

 

Can you suggest a way shortly after PPMAC boots to then get the PPMAC to enable the ECAT without issuing the $$$*** or at least can you expand on your ecatsdo suggestion

Link to comment
Share on other sites

Hi,

 

Page 1173 of the Power PMAC SRM describes the functionality of ecatsdo. Basically, if the command is invalid (e.g. the EtherCAT devices have not yet booted), the output of the ecatsdo command will be NaN (not a number); otherwise, it will be the data value of the SDO you're trying to read. So just keep issuing ecatsdo until the return value ceases to be NaN, and you will know the devices have powered up.

Link to comment
Share on other sites

  • 2 months later...

Below is an example EtherCAT startup plc. It checks to see if the slaves are ready prior to issuing ecat[0].enable = 1.

 

// PLC EcatSlavesReady.plc
//  Example: One of the PLC's you might use 
//			during a StartUp sequence to test
//            if all slaves are ready before enabling master
/****************************************/
// To read slave #0 Status Word, index $6041
//  use, ecatsdo(r/w, slave#, $index, subindex, value, master#),
//  where read=1, write=0
// EXAMPLE:
// L0 = ecatsdo(1,0,$6041,0,0,0)); // then query L0 in the terminal window
/****************************************/
#define READY 0
#define NOT_READY 1

Global SlaveAll, Slave0, Slave1, Slave2; // up to ... , SlaveN for your system;
SlaveAll = 1; // NOT_READY is the default startup 

open plc EcatSlavesReady
ECAT[0].Enable=0;
Slave0 = isnan(ecatsdo(1,0,$6041,0,0,0)); // 1 if NaN, 0 if not NaN, to read slave #0 Status Word on Master[0]
Slave1 = isnan(ecatsdo(1,1,$6041,0,0,0)); // to read slave #1 Status Word on Master[0]
Slave2 = isnan(ecatsdo(1,2,$6041,0,0,0)); // to read slave #2 Status Word "	"
//  SlaveN = isnan(ecatsdo(1,n,$6041,0,0,0)); // to read slave #n Status Word "	"

// Keep updating SlaveAll, SlaveAll = 1, means the Slaves are NOT ready.
SlaveAll = Slave0 | Slave1 | Slave2; // ... | SlaveN;

// Keep testing to see if all the slaves are ready
If(SlaveAll == READY) // if SlaveAll = 0, all slaves are READY
{
	ECAT[0].Enable=1;
	enable plc YourStartupPLC
	disable plc EcatSlavesReady
}
close
/****************************************/

 

Also, you might place in the pp_startup.txt file something like this:

 

pp_startup.txt (example)

Ecat[0].enable = 0
disable plc YourStartupPLC
enable plc EcatSlavesReady

 

 

Hi,

 

Page 1173 of the Power PMAC SRM describes the functionality of ecatsdo. Basically, if the command is invalid (e.g. the EtherCAT devices have not yet booted), the output of the ecatsdo command will be NaN (not a number); otherwise, it will be the data value of the SDO you're trying to read. So just keep issuing ecatsdo until the return value ceases to be NaN, and you will know the devices have powered up.

Link to comment
Share on other sites

  • 2 weeks later...

The previous example PLC tests only for one source of power to the drive, but if both Logic and Mains power are provided then both should be checked before enabling the EtherCAT ring (Ecat[0].enable=1). The EcatSlavesReadyWithMainsPLC below checks both $6041 Status Word for NaN and it checks $6041:4, EtherCAT Drive Voltage Enabled before setting Ecat[0].enable=1.

// Example: One of the PLC's you might use 
//				during a StartUp sequence
/****************************************/
// To read slave #0 Status Word, index $6041
//  use, ecatsdo(r/w, slave#, $index, subindex, value, master#),
//  where read=1, write=0
// EXAMPLE:
// L0 = ecatsdo(1,0,$6041,0,0,0)); // then query L0 in the terminal window
/****************************************/

#define LOGIC_READY 0
#define LOGIC_NOT_READY 1

#define MAINS_READY 1
#define MAINS_NOT_READY 0

Global SlaveAllLogic, SlaveAllMains;
Global Slave0Logic, Slave1Logic, Slave2Logic, Slave3Logic, Slave4Logic;
Global Slave5Logic, Slave6Logic, Slave7Logic, Slave8Logic, Slave9Logic; // up to SlaveNLogic
Global Slave0Mains, Slave1Mains, Slave2Mains, Slave3Mains, Slave4Mains;
Global Slave5Mains, Slave6Mains, Slave7Mains, Slave8Mains, Slave9Mains; // up to SlaveNMains

SlaveAllLogic = 1; // LOGIC_NOT_READY is the default startup
SlaveAllMains = 0; // MAINS_NOT_READY is the default startup

open plc EcatSlavesReady

ECAT[0].Enable=0;

// Test SlaveNLogic.  1 if NaN, 0 if not NaN
Slave0Logic = isnan(ecatsdo(1,0,$6041,0,0,0)); // to read slave #0 Status Word (r/w, slave#, $index, subindex, value, master#), where read=1, write=0
Slave1Logic = isnan(ecatsdo(1,1,$6041,0,0,0)); // to read slave #1 Status Word on Master[0]
Slave2Logic = isnan(ecatsdo(1,2,$6041,0,0,0)); // to read slave #2 Status Word "	"
Slave3Logic = isnan(ecatsdo(1,3,$6041,0,0,0)); // to read slave #3 Status Word "	"
Slave4Logic = isnan(ecatsdo(1,4,$6041,0,0,0)); // to read slave #4 Status Word "	"
Slave5Logic = isnan(ecatsdo(1,5,$6041,0,0,0)); // to read slave #5 Status Word "	"
Slave6Logic = isnan(ecatsdo(1,6,$6041,0,0,0)); // to read slave #6 Status Word "	"
Slave7Logic = isnan(ecatsdo(1,7,$6041,0,0,0)); // to read slave #7 Status Word "	"
Slave8Logic = isnan(ecatsdo(1,8,$6041,0,0,0)); // to read slave #8 Status Word "	"
Slave9Logic = isnan(ecatsdo(1,9,$6041,0,0,0)); // to read slave #9 Status Word "	" up to slave #N

// Keep updating SlaveAllLogic
SlaveAllLogic = Slave0Logic | Slave1Logic | Slave2Logic | Slave3Logic | Slave4Logic | Slave5Logic | Slave6Logic | Slave7Logic | Slave8Logic | Slave9Logic; // ... | SlaveNLogic;

// Keep testing to see if all the slaves are logic ready
If(SlaveAllLogic == LOGIC_READY) // if SlaveAllLogic = 0 THEN test if SlaveAllMains is READY
{
	Local MainsReadyMask = $10; // bit 4 mask

	// Test SlaveNMains. 0 if not ready, 1 if ready
	Slave0Mains = (ecatsdo(1,0,$6041,0,0,0) & MainsReadyMask)>>4; // to read slave #0 Status Word bit 4
	Slave1Mains = (ecatsdo(1,1,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave2Mains = (ecatsdo(1,2,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave3Mains = (ecatsdo(1,3,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave4Mains = (ecatsdo(1,4,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave5Mains = (ecatsdo(1,5,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave6Mains = (ecatsdo(1,6,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave7Mains = (ecatsdo(1,7,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave8Mains = (ecatsdo(1,8,$6041,0,0,0) & MainsReadyMask)>>4;
	Slave9Mains = (ecatsdo(1,9,$6041,0,0,0) & MainsReadyMask)>>4; // to read slave #9 Status Word bit 4

	// Keep updating SlaveAllLogic and SlaveAllMains
	SlaveAllMains = Slave0Mains | Slave1Mains | Slave2Mains | Slave3Mains | Slave4Mains | Slave5Mains | Slave6Mains | Slave7Mains | Slave8Mains | Slave9Mains; // ... | SlaveNMains;

	If(SlaveAllMains == MAINS_READY) // if SlaveAllMains = 1 THEN all slaves are READY
	{
		ECAT[0].Enable=1;
		//enable plc YourStartPLC
		disable plc EcatSlavesReady;
	}
}

close
/****************************************/

 

Below is an example EtherCAT startup plc. It checks to see if the slaves are ready prior to issuing ecat[0].enable = 1.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...