Hi again Richard,

I was working on this topic this week, following the indication from the 
link I get to a new scenario, I tell you:

I've imported from TwinCAT XML the data of the diferents SDO entries. (XML 
appended on this email).
I get to write the config SDO entries [0x1212, 0x1C13, 0xF800, 0x8000], I 
could check the correct configuration with etchercat tool (./ethercat upload 
...):
     # sudo ./ethercat upload -p4 -t uint16 0x8000 1
     >  0x0007 7     // This is the correct Can Slave Node ID (0x0000 by 
default)
     # sudo ./ethercat upload -p4 -t uint8 0xF800 2
     > 0x03 3          // This is the correct Baudratre configuration (0x02 
by default)

But the EL6751 can't pass to OP, it keeps on PREOP+ERROR (Code appended on 
this email).

This is the dmesg output:

[ 4055.253520] EtherCAT 0: Releasing master...
[ 4055.253529] EtherCAT 0: Master thread exited.
[ 4055.253539] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 4055.253561] EtherCAT 0: Released.
[ 4057.131180] EtherCAT: Requesting master 0...
[ 4057.131184] EtherCAT: Successfully requested master 0.
[ 4057.131375] EtherCAT 0: Domain0: Logical address 0x00000000, 22 byte, 
expected working counter 8.
[ 4057.131377] EtherCAT 0:   Datagram domain0-0-main: Logical offset 
0x00000000, 22 byte, type LRW.
[ 4057.131389] EtherCAT 0: Master thread exited.
[ 4057.131391] EtherCAT 0: Starting EtherCAT-OP thread.
[ 4057.131453] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 4057.133102] EtherCAT WARNING 0: No app_time received up to now, but 
master already active.
[ 4060.034303] EtherCAT 0: Domain 0: Working counter changed to 2/8.
[ 4061.835479] EtherCAT 0: Domain 0: Working counter changed to 3/8.
[ 4063.336336] EtherCAT 0: Domain 0: Working counter changed to 5/8.
[ 4065.637736] EtherCAT ERROR 0-4: SDO upload 0x1A00:00 aborted.
[ 4065.637740] EtherCAT ERROR 0-4: SDO abort message 0x06020000: "This 
object does not exist in the object directory".
[ 4065.637742] EtherCAT ERROR 0-4: Failed to read number of mapped PDO 
entries.
[ 4065.637743] EtherCAT WARNING 0-4: Failed to read PDO entries for PDO 
0x1A00.
[ 4065.637745] EtherCAT WARNING 0-4: Slave does not support changing the PDO 
mapping!
[ 4065.637746] EtherCAT WARNING 0-4: Currently mapped PDO entries: (none). 
Entries to map: 0x6000:01/8
[ 4065.637750] EtherCAT WARNING 0-4: Slave does not support assigning PDOs!
[ 4065.637750] EtherCAT WARNING 0-4: Currently assigned PDOs: (none). PDOs 
to assign: 0x1A00
[ 4066.037976] EtherCAT ERROR 0-4: SDO upload 0x1600:00 aborted.
[ 4066.037981] EtherCAT ERROR 0-4: SDO abort message 0x06020000: "This 
object does not exist in the object directory".
[ 4066.037982] EtherCAT ERROR 0-4: Failed to read number of mapped PDO 
entries.
[ 4066.037984] EtherCAT WARNING 0-4: Failed to read PDO entries for PDO 
0x1600.
[ 4066.037985] EtherCAT WARNING 0-4: Slave does not support changing the PDO 
mapping!
[ 4066.037986] EtherCAT WARNING 0-4: Currently mapped PDO entries: (none). 
Entries to map: 0x7000:01/32
[ 4071.841620] EtherCAT WARNING 0-4: Slave does not support changing the PDO 
mapping!
[ 4071.841627] EtherCAT WARNING 0-4: Currently mapped PDO entries: 
0xF102:01/8 0xF101:03/8 0xF108:01/1 0xF108:02/1 0xF108:03/1 0x0000:00/1 
0xF108:05/1 0xF108:06/1 0x0000:00/2 0x0000:00/8 0xF108:21/8 0xF108:22/8 
0xF101:14/1 0xF103:01/1 0x0000:00/6. Entries to map: 0xA000:01/8 0xF100:01/8 
0xF100:03/16 0xF100:05/8 0xF100:04/8 0xF100:02/1 0xA000:02/1
[ 4071.841656] EtherCAT WARNING 0-4: Slave does not support assigning PDOs!
[ 4071.841658] EtherCAT WARNING 0-4: Currently assigned PDOs: (none). PDOs 
to assign: 0x1600 0x1A80
[ 4072.241802] EtherCAT 0: Domain 0: Working counter changed to 7/8.
[ 4072.341869] EtherCAT ERROR 0-4: Failed to set SAFEOP state, slave refused 
state change (PREOP + ERROR).
[ 4072.541984] EtherCAT ERROR 0-4: AL status message 0x001E: "Invalid input 
configuration".
[ 4072.742107] EtherCAT 0-4: Acknowledged state PREOP.
[ 4073.142357] EtherCAT WARNING 0-4: CoE Emergency Request received:
[ 4073.142360] EtherCAT DEBUG: 0E 07 10 07 10


Could you tell me some tip that make me know how to get the EL6751 
Operational with its Can-Slave working?

Thank you in advance

Best regards

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-
David Jiménez Mejías - Gran Telescopio de Canarias S.A

Ingeniero de Operación / Operation Engineer


-----Original Message-----
From: Richard Hacker <h...@igh.de>
To: "etherlab-users@etherlab.org" <etherlab-users@etherlab.org>
Cc: David Jiménez Mejías <david.jime...@gtc.iac.es>
Date: Wed, 28 Oct 2015 11:37:26 +0100
Subject: Re: [etherlab-users] Initializing CanOpen Master Module EL6751-0010

Hi David,

Communication slaves are very(!) difficult to handle, because they are
configured by means of SDO's. We are not aware of a free tool that can
be used to cofigure them.

They must be configured using TwinCAT(2). A trial version is available
free of charge from Beckhoff. This can be used to configure the slave.
Have a look at:
http://lists.etherlab.org/pipermail/etherlab-users/2012/001860.html

Search the mailing list for EL6731 or EL6751.

- Richard


BTW: I cannot find EL6710! CANopen master is EL6751. And besides, -0010
is usually the slave and not the master! Check carefully what you have.
In case of a slave, select it in the TwinCAT Project, instead of the
master, before "Export configuration XML".

------------------------------------------------------------------------

On 28.10.2015 11:13, David Jiménez Mejías wrote:
> Hello,
> I just trying to configure a CanOpen Network with a CanOpen Master
> Module EL6710-0010 (Beckhoff), and get some doubts and issues.
> I proceed just the module infosys website indicates, I did the next steps:
> - Configure the BaudRate SDO:
> # ./ethercat download -p4 -t uint8 0xF800 2 3 (250KBauds)
> - Request a Detect Module Command
> # ./ethercat download -p4 -t uint16 0xF002 1 0x11
>       -> At this step I need to write "something" to a octet_string[2]
> entry, with this format the requested commando doesn work, I do it using
> a uint16. Does someone know which octet is the expected?
> - After the request command I observe the percent counter process:
> # ./ethercat upload -p4 -t uint8 0xF002 2
> 0x80 128
> # ./ethercat upload -p4 -t uint8 0xF002 2
> 0x95 149
> - Until it keeps on value 0x01:
> # ./ethercat upload -p4 -t uint8 0xF002 2
> 0x01 1
> - It means, reading at infosys, that: "Command ended without error,
> response data in SubIndex 3", then I tried read the octet_string[n]
> directly from the terminal, but it can't be possible, then I do:
> # ./ethercat upload -p4 -t octet_string 0xF002 3 > ~/prescan.out
> - This output file is:
> 00000000   01 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
> 00000010   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
> 00000020   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
> 00000030   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
> 00000040   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
> 00000050   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
>   ................
>       -> The first octet_couple correspond with the infosys website
> detail, al the next is 0.
> - I tried to repeat the request command but I get the next error:
> # ./ethercat download -p4 -t octet_string 0xF002 1 0x22
> SDO transfer aborted with code 0x08000021: Data cannot be transferred or
> stored to the application because of local control
> This is the point where i'm get stacked.
> Is there some one that have some experience with this type of modules?
> Thank you very much
> Best regards
> ​
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - -
> *David Jiménez Mejías -* Gran Telescopio de Canarias S.A
> /Ingeniero de Operación / Operation Engineer/
>
> ----------
> ADVERTENCIA: Sobre la privacidad y cumplimiento de la Ley de Protección
> de Datos, acceda a http://www.gtc.iac.es/gtc/legal_es.php
> WARNING: For more information on privacy and fulfilment of the Law
> concerning the Protection of Data, consult
> http://www.gtc.iac.es/gtc/legal_es.php
>
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users@etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>

----------
ADVERTENCIA: Sobre la privacidad y cumplimiento de la Ley de Protección de 
Datos, acceda a http://www.gtc.iac.es/gtc/legal_es.php
WARNING: For more information on privacy and fulfilment of the Law concerning 
the Protection of Data, consult http://www.gtc.iac.es/gtc/legal_es.php
/*****************************************************************************
 *
	Testing EL6751 Can Open Master Operation
 *
 ****************************************************************************/
#include "ecrt.h"
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/resource.h>
#include <unistd.h>

/****************************************************************************/

// Application parameters
#define FREQUENCY 10
#define PRIORITY 1

// Optional features
#define CONFIGURE_PDOS  1
#define SDO_ACCESS      0

/****************************************************************************/

// EtherCAT
static ec_master_t *master = NULL;
static ec_master_state_t master_state = {};

static ec_domain_t *domain1 = NULL;
static ec_domain_state_t domain1_state = {};

static ec_slave_config_t *sc_EL2602_dig_out = NULL;
static ec_slave_config_state_t sc_EL2602_dig_out_state = {};

static ec_slave_config_t *sc_EL2008_dig_out = NULL;
static ec_slave_config_state_t sc_EL2008_dig_out_state = {};

static ec_slave_config_t *sc_EL3202_ana_in = NULL;
static ec_slave_config_state_t sc_EL3202_ana_in_state = {};

static ec_slave_config_t *sc_EL6751_Canopen = NULL;
static ec_slave_config_state_t sc_EL6751_Canopen_state = {};

// CanOpen Master configuration., from TwinCAT XML
const char *pb_config_master_0x1C32=
    "0300010000093d0000000000";
const char *pb_config_master_0x1C33 =
    "030022000000000000000000";
const char *pb_config_master_0xf800 =
    "0a007f0380001e00010010006400";
const char *pb_config_master_0x8000 =
    "2b000700000000000000000000000000000000009101030084000000010000010000000"
    "0000000000000000000000000000000006400030000000000010178000a00";
const char *pb_config_master_0x8003 =
    "10000018010400870100000018020100ff0118010400870200000118020100ff0218010"
    "400870300000218020100ff0318010400870400000318020100ff001401040007020000"
    "0014020100ff0114010400070300000114020100ff0214010400070400000214020100f"
    "f0314010400070500000314020100ff";
// Timer
static unsigned int sig_alarms = 0;
static unsigned int user_alarms = 0;

// Application Vars
int num;
short niTemp = 0;
short nFlag = 0;
short nInit = 0;
static short nLimitMax = 320; 
static short nLimitMin = 300;

int nPT100_1 = 0;
int nPT100_2 = 0;

/****************************************************************************/

// process data
static uint8_t *domain1_pd = NULL;

// Posición de Elementos (Igual es preferible la designación por nombre de 
// terminal EK1100_Pos por ejemplo)

#define EK1100Pos 0, 0
#define EL2602Pos 0, 1
#define EL3202Pos 0, 2
#define EL2008Pos 0, 3
#define EL6751Pos 0, 4

// Definición de info del producto, VendorID y ProductNum
#define Beckhoff_EK1100 0x00000002, 0x044c2c52
#define Beckhoff_EL2602 0x00000002, 0x0a2a3052
#define Beckhoff_EL2008 0x00000002, 0x07d83052
#define Beckhoff_EL3202 0x00000002, 0x0c823052
#define Beckhoff_EL6751 0x00000002, 0x1a5f3052

// offsets for PDO entries
static unsigned int off_ana_in_value;
static unsigned int off_ana_in_status;
static unsigned int off_ana_in_value2;
static unsigned int off_ana_in_status2;
static unsigned int off_EL2602_dig_out;
static unsigned int off_EL2008_dig_out;
static unsigned int off_in_CanMaster;
static unsigned int off_out_CanMaster;

// Se identifican los PDOs correspondientes a cada elemento. La dirección
// del Indice es 0x7000, si es Output, o 0x6000 si es Input. Si existen más E/S
// se van situando en saltos de 10: 0x6010, 0x7010 etc ... El subindice 
// se localiza con un CSTRUCT pudiendo darse en Decimal o Hexadecimal
 
const static ec_pdo_entry_reg_t domain1_regs[] = {

    {EL2602Pos, Beckhoff_EL2602, 0x7000, 0x01, &off_EL2602_dig_out},
    {EL2008Pos, Beckhoff_EL2008, 0x7000, 0x01, &off_EL2008_dig_out},
    {EL3202Pos, Beckhoff_EL3202, 0x6000, 0x11, &off_ana_in_value},
    {EL3202Pos, Beckhoff_EL3202, 0x6010, 0x11, &off_ana_in_value2},
    {EL3202Pos, Beckhoff_EL3202, 0x6000, 0x01, &off_ana_in_status},
    {EL3202Pos, Beckhoff_EL3202, 0x6000, 0x01, &off_ana_in_status2},
    {EL6751Pos, Beckhoff_EL6751, 0x7000, 0x01, &off_out_CanMaster},
    {EL6751Pos, Beckhoff_EL6751, 0x6000, 0x01, &off_in_CanMaster},
    {}
};

static unsigned int counter = 0;

/*****************************************************************************/

#if CONFIGURE_PDOS

// Analog in --------------------------
/* Master 0, Slave 2, "EL3202-0010"
 * Vendor ID:       0x00000002
 * Product code:    0x0c823052
 * Revision number: 0x0014000a
 */

ec_pdo_entry_info_t slave_2_pdo_entries[] = {
    {0x6000, 0x01, 1}, /* Underrange */
    {0x6000, 0x02, 1}, /* Overrange */
    {0x6000, 0x03, 2}, /* Limit 1 */
    {0x6000, 0x05, 2}, /* Limit 2 */
    {0x6000, 0x07, 1}, /* Error */
    {0x0000, 0x00, 7}, /* Gap */
    {0x1800, 0x07, 1}, // TxPDO State
    {0x1800, 0x09, 1}, // TxPDO Toggle
    {0x6000, 0x11, 16}, /* Value */	// PT100 Sensor 1
    {0x6010, 0x01, 1}, /* Underrange */
    {0x6010, 0x02, 1}, /* Overrange */
    {0x6010, 0x03, 2}, /* Limit 1 */
    {0x6010, 0x05, 2}, /* Limit 2 */
    {0x6010, 0x07, 1}, /* Error */
    {0x0000, 0x00, 7}, /* Gap */
    {0x1801, 0x07, 1},
    {0x1801, 0x09, 1},
    {0x6010, 0x11, 16}, /* Value */	// PT100 Sensor 2
};

ec_pdo_info_t slave_2_pdos[] = {
    {0x1a00, 9, slave_2_pdo_entries + 0}, /* RTD TxPDO-Map Ch.1 */
    {0x1a01, 9, slave_2_pdo_entries + 9}, /* RTD TxPDO-Map Ch.2 */
};

ec_sync_info_t slave_2_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {3, EC_DIR_INPUT, 2, slave_2_pdos + 0, EC_WD_DISABLE},
    {0xff}
};

// Digital out ------------------------

/*****/
/* Master 0, Slave 1, "EL2602"
 * Vendor ID:       0x00000002
 * Product code:    0x0a2a3052
 * Revision number: 0x00120000
 */

ec_pdo_entry_info_t slave_1_pdo_entries[] = {
    {0x7000, 0x01, 1}, /* Output Fun and Valve*/
    {0x7010, 0x01, 1}, /* Output */
};

ec_pdo_info_t slave_1_pdos[] = {
    {0x1600, 1, slave_1_pdo_entries + 0}, /* Channel 1 */
    {0x1601, 1, slave_1_pdo_entries + 1}, /* Channel 2 */
};

ec_sync_info_t slave_1_syncs[] = {
    {0, EC_DIR_OUTPUT, 2, slave_1_pdos + 0, EC_WD_ENABLE},
    {0xff}
};

/* Master 0, Slave 3, "EL2008"
 * Vendor ID:       0x00000002
 * Product code:    0x07d83052
 * Revision number: 0x00110000
 */

ec_pdo_entry_info_t slave_3_pdo_entries[] = {
    {0x7000, 0x01, 1}, /* Output */
    {0x7010, 0x01, 1}, /* Output */
    {0x7020, 0x01, 1}, /* Output */	// Relay 1
    {0x7030, 0x01, 1}, /* Output */	// Relay 2
    {0x7040, 0x01, 1}, /* Output */	// Relay 3
    {0x7050, 0x01, 1}, /* Output */	// Relay 4
    {0x7060, 0x01, 1}, /* Output */	// Relay 5
    {0x7070, 0x01, 1}, /* Output */
};

ec_pdo_info_t slave_3_pdos[] = {
    {0x1600, 1, slave_3_pdo_entries + 0}, /* Channel 1 */
    {0x1601, 1, slave_3_pdo_entries + 1}, /* Channel 2 */
    {0x1602, 1, slave_3_pdo_entries + 2}, /* Channel 3 */
    {0x1603, 1, slave_3_pdo_entries + 3}, /* Channel 4 */
    {0x1604, 1, slave_3_pdo_entries + 4}, /* Channel 5 */
    {0x1605, 1, slave_3_pdo_entries + 5}, /* Channel 6 */
    {0x1606, 1, slave_3_pdo_entries + 6}, /* Channel 7 */
    {0x1607, 1, slave_3_pdo_entries + 7}, /* Channel 8 */
};

ec_sync_info_t slave_3_syncs[] = {
    {0, EC_DIR_OUTPUT, 8, slave_3_pdos + 0, EC_WD_ENABLE},
    {0xff}
};
// Comm Modules ----------------------------

/* Master 0, Slave 4, "EL6751"
 * Vendor ID:       0x00000002
 * Product code:    0x1a5f3052
 * Revision number: 0x00130000
 */

ec_pdo_entry_info_t slave_4_pdo_entries[] = {
  { 0x6000, 0x01, 8 },             //0
  { 0x7000, 0x01, 32},             //1  
  { 0xA000, 0x01, 8 },             //2
  { 0xF100, 0x01, 8 },             //3
  { 0xF100, 0x03, 16},             //4
  { 0xF100, 0x05, 8 },             //5
  { 0xF100, 0x04, 8 },             //6
  { 0xF100, 0x02, 1 },             //7
  { 0xA000, 0x02, 1 },             //8
  { 0x0000, 0x00, 6 },
};

ec_pdo_info_t slave_4_pdos[] = {
    {0x1a00, 1, slave_4_pdo_entries + 0}, // DPS TxPDO-Map Slave     
    {0x1600, 1, slave_4_pdo_entries + 1}, // DPS RxPDO-Map Slave     
    {0x1a80, 7, slave_4_pdo_entries + 2},
};

ec_sync_info_t slave_4_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 1, slave_4_pdos + 0, EC_WD_DISABLE},
    {3, EC_DIR_INPUT, 2, slave_4_pdos + 1, EC_WD_DISABLE},
    {0xff}
};

#endif

/*****************************************************************************/

// Helper function, buffer has be allocated and big enough

unsigned int strToCharArray(const char *str, unsigned char *buffer)
    {
        unsigned int i;
        unsigned char byteVal;
        size_t size = strlen(str)/2;
        for (i = 0; i < (size); i++) {
            sscanf(str,"%2X", &byteVal);
            str += 2;
            buffer[i] = (uint8_t) byteVal;
        }
	
	return (size);
    }

/*****************************************************************************/


void check_domain1_state(void)
{
    ec_domain_state_t ds;

    ecrt_domain_state(domain1, &ds);

    if (ds.working_counter != domain1_state.working_counter)
        printf("Domain1: WC %u.\n", ds.working_counter);
    if (ds.wc_state != domain1_state.wc_state)
        printf("Domain1: State %u.\n", ds.wc_state);

    domain1_state = ds;
}

/*****************************************************************************/

void check_master_state(void)
{
    ec_master_state_t ms;
    ecrt_master_state(master, &ms);

    if (ms.slaves_responding != master_state.slaves_responding)
        printf("%u slave(s).\n", ms.slaves_responding);
    if (ms.al_states != master_state.al_states)
        printf("AL states: 0x%02X.\n", ms.al_states);
    if (ms.link_up != master_state.link_up)
        printf("Link is %s.\n", ms.link_up ? "up" : "down");

    master_state = ms;
}

/*****************************************************************************/

void check_slave_config_states(void)
{
    ec_slave_config_state_t s;
    ecrt_slave_config_state(sc_EL3202_ana_in, &s);

    if (s.al_state != sc_EL3202_ana_in_state.al_state)
        printf("EL3202: State 0x%02X.\n", s.al_state);
    if (s.online != sc_EL3202_ana_in_state.online)
        printf("EL3202: %s.\n", s.online ? "online" : "offline");
    if (s.operational != sc_EL3202_ana_in_state.operational)
        printf("EL3202: %soperational.\n", s.operational ? "" : "Not ");

    sc_EL3202_ana_in_state = s;
    ecrt_slave_config_state(sc_EL2602_dig_out, &s);

    if (s.al_state != sc_EL2602_dig_out_state.al_state)
        printf("EL2602: State 0x%02X.\n", s.al_state);
    if (s.online != sc_EL2602_dig_out_state.online)
        printf("EL2602: %s.\n", s.online ? "online" : "offline");
    if (s.operational != sc_EL2602_dig_out_state.operational)
        printf("EL2602: %soperational.\n", s.operational ? "" : "Not ");

    sc_EL2602_dig_out_state = s;
    ecrt_slave_config_state(sc_EL2008_dig_out, &s);

    if (s.al_state != sc_EL2008_dig_out_state.al_state)
        printf("EL2008: State 0x%02X.\n", s.al_state);
    if (s.online != sc_EL2008_dig_out_state.online)
        printf("EL2008: %s.\n", s.online ? "online" : "offline");
    if (s.operational != sc_EL2008_dig_out_state.operational)
        printf("EL2008: %soperational.\n", s.operational ? "" : "Not ");

    sc_EL2008_dig_out_state = s;
    ecrt_slave_config_state(sc_EL6751_Canopen, &s);

    if (s.al_state != sc_EL6751_Canopen_state.al_state)
        printf("EL6751: State 0x%02X.\n", s.al_state);
    if (s.online != sc_EL6751_Canopen_state.online)
        printf("EL6751: %s.\n", s.online ? "online" : "offline");
    if (s.operational != sc_EL6751_Canopen_state.operational)
        printf("EL6751: %soperational.\n", s.operational ? "" : "Not ");

    sc_EL6751_Canopen_state = s;
}

/*****************************************************************************/
//********************************CYCLIC TASK*******************************//
void cyclic_task()
{
    // receive process data
    ecrt_master_receive(master);
    ecrt_domain_process(domain1);

    // check process data state (optional)
    check_domain1_state();

    if (counter) {
        counter--;
    } else { // do this at 1 Hz
        counter = FREQUENCY;
        // check for master state (optional)
        check_master_state();
        // check for islave configuration state(s) (optional)
        check_slave_config_states();
    }

    // Reading Analog Input & Writing Digital Output
	nPT100_1=EC_READ_U16(domain1_pd + off_ana_in_value);
	nPT100_2=EC_READ_U16(domain1_pd + off_ana_in_value2);
	#if 1
    	    switch (nFlag){
	        case 0:		// IDLE
	   	    if (nPT100_1 > nLimitMax) {
    	                EC_WRITE_BIT(domain1_pd+ off_EL2602_dig_out,0x00,1);	// Para escribir una salida u otra sumar 1 a off_dig_out
		        EC_WRITE_U32(domain1_pd + off_out_CanMaster + 1,0x55555555);
	                nFlag=10;
		        printf("Temperature PT100_1 Reached the Max Limit -> Value: %u\n",
            	        EC_READ_U16(domain1_pd + off_ana_in_value));
		        printf("Status Value: %u\n",
            	        EC_READ_U8(domain1_pd + off_ana_in_status));
	                printf("Funs and Valve Turned ON\n\n");
                    }
	   	    if (nPT100_2 > nLimitMax) {
    	                EC_WRITE_BIT(domain1_pd+ off_EL2602_dig_out,0x00,1);	// Para escribir una salida u otra sumar 1 a off_dig_out
		        EC_WRITE_U32(domain1_pd + off_out_CanMaster + 1,0x00000000);
	                nFlag=10;
		        printf("Temperature PT100_2 Reached the Max Limit -> Value: %u\n",
            	        EC_READ_U16(domain1_pd + off_ana_in_value2));
		        printf("Status Value: %u\n",
            	        EC_READ_U8(domain1_pd + off_ana_in_status2));
	                printf("Funs and Valve Turned ON\n\n");
                    }
		break;
	    case 10:		// OverTemp
	        if ((nPT100_1 < nLimitMin)&&(nPT100_2 < nLimitMin)) {
    	            EC_WRITE_BIT(domain1_pd + off_EL2602_dig_out,0x00,0);
	    	    nFlag=0;
		    printf("Both Temperature Reached the Min Limit\n -> PT100_1 Value: %u || PT100_2 Value: %u \n",
            	    EC_READ_U16(domain1_pd + off_ana_in_value),EC_READ_U16(domain1_pd + off_ana_in_value2));
	    	    printf("Funs and Cooler Turned OFF\n\n");
           	    }
	    	    break;
    	    }

	EC_WRITE_BIT(domain1_pd + off_EL2008_dig_out, 0x02,0);
	EC_WRITE_BIT(domain1_pd + off_EL2008_dig_out, 0x03,1);
	EC_WRITE_BIT(domain1_pd + off_EL2008_dig_out, 0x04,0);
	EC_WRITE_BIT(domain1_pd + off_EL2008_dig_out, 0x05,1);
	EC_WRITE_BIT(domain1_pd + off_EL2008_dig_out, 0x06,0);
	EC_WRITE_U32(domain1_pd + off_out_CanMaster + 1,0x55555555);
    
#endif
    // send process data
    ecrt_domain_queue(domain1);
    ecrt_master_send(master);
}

/****************************************************************************/

void signal_handler(int signum) {
    switch (signum) {
        case SIGALRM:
            sig_alarms++;
            break;
    }
}

//********************************MAIN***************************************//
int main(int argc, char **argv)
{
    int cnt;
    unsigned char pb_config_buf[256];

    ec_slave_config_t *sc;
    struct sigaction sa;
    struct itimerval tv;
    fprintf(stderr,"Requesting Master 0 ...\n");
    master = ecrt_request_master(0);
    if (!master)
        return -1;
    fprintf(stderr,"Creating Domain 1 ...\n");
    domain1 = ecrt_master_create_domain(master);
    if (!domain1)
        return -1;

    printf("Configuring PDOs...\n");

   if (!(sc = ecrt_master_slave_config(master, EK1100Pos, Beckhoff_EK1100))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

    fprintf(stderr,"Getting EL2602 Configuration ...\n");
    if (!(sc_EL2602_dig_out = ecrt_master_slave_config(
                    master,EL2602Pos, Beckhoff_EL2602))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

    printf("Configuring EL2602 PDOs...\n");
    if (ecrt_slave_config_pdos(sc_EL2602_dig_out, EC_END, slave_1_syncs)) {
        fprintf(stderr, "Failed to configure PDOs.\n");
        return -1;
    }

    fprintf(stderr,"Getting EL2008 Configuration ...\n");
    if (!(sc_EL2008_dig_out = ecrt_master_slave_config(
                    master,EL2008Pos, Beckhoff_EL2008))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

    printf("Configuring EL2008 PDOs...\n");
    if (ecrt_slave_config_pdos(sc_EL2008_dig_out, EC_END, slave_3_syncs)) {
        fprintf(stderr, "Failed to configure PDOs.\n");
        return -1;
    }

    fprintf(stderr,"Getting EL3202 Configuration ...\n");
    if (!(sc_EL3202_ana_in = ecrt_master_slave_config(
                    master, EL3202Pos, Beckhoff_EL3202))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

    printf("Configuring EL3202 PDOs...\n");
    if (ecrt_slave_config_pdos(sc_EL3202_ana_in, EC_END, slave_2_syncs)) {
        fprintf(stderr, "Failed to configure PDOs.\n");
        return -1;
    }


    fprintf(stderr,"Getting EL6751 Configuration ...\n");
    if (!(sc_EL6751_Canopen = ecrt_master_slave_config(
                    master, EL6751Pos, Beckhoff_EL6751))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

// EL6751 SDO Download 
    fprintf(stderr,"Starting EL6751 Configuration ...\n");
/*
    fprintf(stderr,"Proceeding 0x1C32 wrinting ...\n");
    cnt = strToCharArray(pb_config_master_0x1C32,pb_config_buf);
    ecrt_slave_config_complete_sdo(sc_EL6751_Canopen, 0x1C32, pb_config_buf, cnt);

    fprintf(stderr,"Proceeding 0x1C33 wrinting ...\n");
    cnt = strToCharArray(pb_config_master_0x1C33,pb_config_buf);
    ecrt_slave_config_complete_sdo(sc_EL6751_Canopen, 0x1C33, pb_config_buf, cnt);
*/
    fprintf(stderr,"Proceeding 0xF800 wrinting ...\n");
    cnt = strToCharArray(pb_config_master_0xf800,pb_config_buf);
    ecrt_slave_config_complete_sdo(sc_EL6751_Canopen, 0xf800, pb_config_buf, cnt);

    fprintf(stderr,"Proceeding 0x8000 wrinting ...\n");
    cnt = strToCharArray(pb_config_master_0x8000,pb_config_buf);
    ecrt_slave_config_complete_sdo(sc_EL6751_Canopen, 0x8000, pb_config_buf, cnt);
/*
    fprintf(stderr,"Proceeding 0x8003 wrinting ...\n");
    cnt = strToCharArray(pb_config_master_0x8003,pb_config_buf);
    ecrt_slave_config_complete_sdo(sc_EL6751_Canopen, 0x8003, pb_config_buf, cnt);
*/
    fprintf(stderr,"EL6751 Configuration Ended ...\n");

    printf("Configuring EL6751 PDOs...\n");
    if (ecrt_slave_config_pdos(sc_EL6751_Canopen, EC_END, slave_4_syncs)) {
        fprintf(stderr, "Failed to configure PDOs.\n");
        return -1;
    }

    // Create configuration for bus coupler
    sc = ecrt_master_slave_config(master, EK1100Pos, Beckhoff_EK1100);
    if (!sc)
        return -1;

    if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) {
        fprintf(stderr, "PDO entry registration failed!\n");
        return -1;
    }

    printf("Activating master...\n");
    if (ecrt_master_activate(master))
        return -1;

    if (!(domain1_pd = ecrt_domain_data(domain1))) {
        return -1;
    }

#if PRIORITY
    pid_t pid = getpid();
    if (setpriority(PRIO_PROCESS, pid, -19))
        fprintf(stderr, "Warning: Failed to set priority: %s\n",
                strerror(errno));
#endif

    sa.sa_handler = signal_handler;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    if (sigaction(SIGALRM, &sa, 0)) {
        fprintf(stderr, "Failed to install signal handler!\n");
        return -1;
    }

    printf("Starting timer...\n");
    tv.it_interval.tv_sec = 0;
    tv.it_interval.tv_usec = 1000000 / FREQUENCY;
    tv.it_value.tv_sec = 0;
    tv.it_value.tv_usec = 1000;
    if (setitimer(ITIMER_REAL, &tv, NULL)) {
        fprintf(stderr, "Failed to start timer: %s\n", strerror(errno));
        return 1;
    }

    printf("Started.\n");
    while (1) {
        pause();

#if 0
        struct timeval t;
        gettimeofday(&t, NULL);
        printf("%u.%06u\n", t.tv_sec, t.tv_usec);
#endif

        while (sig_alarms != user_alarms) {
            cyclic_task();
            user_alarms++;
        }
    }

    return 0;
}

/****************************************************************************/
<?xml version="1.0" encoding="ISO-8859-1"?>
<TreeItem>
	<ItemName>Terminal 5 (EL6751)</ItemName>
	<PathName>TIID^Dispositivo 1 (EtherCAT)^Terminal 1 (EK1200)^Terminal 5 (EL6751)</PathName>
	<ItemType>5</ItemType>
	<ItemId>5</ItemId>
	<ItemSubType>9099</ItemSubType>
	<ItemSubTypeName>EL6751 CANopen Master</ItemSubTypeName>
	<ChildCount>0</ChildCount>
	<Disabled>0</Disabled>
	<TreeImageData16x14>424dba030000000000003a00000028000000100000000e0000000100200000000000800300000000000000000000000000000000000067006500ff00ff000000000000000000ff00ff00ff00ff00ff00ff008080800080808000808080008080800080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0000000000ff00ff00ff00ff0000000000ff00ff00ff00ff00c0c0c00000000000c0c0c0000000000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0000000000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00c0c0c00000ffff00c0c0c00000ffff0080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0000000000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00c0c0c000c0c0c000c0c0c000c0c0c00080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0000000000ff00ff00ff00ff0000000000ff00ff00ff00ff00c0c0c00000000000c0c0c0000000000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff000000000000000000ff00ff00ff00ff00ff00ff00c0c0c000ff000000c0c0c000ff00000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00c0c0c000c0c0c000c0c0c000c0c0c00080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c00000000000c0c0c0000000000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c0000000ff00c0c0c0000000ff0080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c000c0c0c000c0c0c000c0c0c00080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c00000000000c0c0c0000000000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c000c0c0c000c0c0c000c0c0c00080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c00000800000c0c0c0000080000080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00007fff00007fff00007fff00007fff00007fff00007fff00c0c0c000c0c0c000c0c0c000c0c0c00080808000ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00</TreeImageData16x14>
	<BoxDef>
		<FieldbusAddress>1004</FieldbusAddress>
		<AmsAddress>
			<AmsPort>0</AmsPort>
			<AmsPortTimeout>5</AmsPortTimeout>
		</AmsAddress>
	</BoxDef>
	<EtherCAT>
		<Slave>
			<Info>
				<Name><![CDATA[Terminal 5 (EL6751)]]></Name>
				<PhysAddr>1004</PhysAddr>
				<AutoIncAddr>65533</AutoIncAddr>
				<Physics>KK</Physics>
				<VendorId>2</VendorId>
				<ProductCode>442445906</ProductCode>
				<RevisionNo>1245184</RevisionNo>
				<SerialNo>0</SerialNo>
				<ProductRevision>EL6751-0000-0019</ProductRevision>
				<Type>EL6751</Type>
			</Info>
			<ProcessData>
				<Send>
					<BitStart>584</BitStart>
					<BitLength>32</BitLength>
				</Send>
				<Recv>
					<BitStart>584</BitStart>
					<BitLength>64</BitLength>
				</Recv>
				<Sm2>
					<Type>Outputs</Type>
					<StartAddress>4096</StartAddress>
					<ControlByte>38</ControlByte>
					<Enable>1</Enable>
					<Pdo>5632</Pdo>
				</Sm2>
				<Sm3>
					<Type>Inputs</Type>
					<StartAddress>5120</StartAddress>
					<ControlByte>34</ControlByte>
					<Enable>1</Enable>
					<Pdo>6656</Pdo>
					<Pdo>6784</Pdo>
				</Sm3>
				<TxPdo Fixed="1" Mandatory="1" Sm="3">
					<Index>#x1a00</Index>
					<Name>Box 7 (IL CAN BK-TC)_IN</Name>
					<Entry>
						<Index>#x6000</Index>
						<SubIndex>1</SubIndex>
						<BitLen>8</BitLen>
						<Name>TxPDO_1</Name>
						<DataType>ARRAY [0..0] OF USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>73</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
				</TxPdo>
				<RxPdo Fixed="1" Mandatory="1" Sm="2">
					<Index>#x1600</Index>
					<Name>Box 7 (IL CAN BK-TC)_OUT</Name>
					<Entry>
						<Index>#x7000</Index>
						<SubIndex>1</SubIndex>
						<BitLen>32</BitLen>
						<Name>RxPDO_1</Name>
						<DataType>ARRAY [0..3] OF USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>69634</IndexGroup>
							<IndexOffset>73</IndexOffset>
							<Length>4</Length>
						</AdsInfo>
					</Entry>
				</RxPdo>
				<TxPdo Fixed="1" Mandatory="1" Sm="3">
					<Index>#x1a80</Index>
					<Name>Dispositivo 2 (EL6751)</Name>
					<Entry>
						<Index>#xa000</Index>
						<SubIndex>1</SubIndex>
						<BitLen>8</BitLen>
						<Name>Box 7 (IL CAN BK-TC)_NodeState</Name>
						<DataType>USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>74</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xf100</Index>
						<SubIndex>1</SubIndex>
						<BitLen>8</BitLen>
						<Name>Dispositivo 2 (EL6751)_Error</Name>
						<DataType>USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>75</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xf100</Index>
						<SubIndex>3</SubIndex>
						<BitLen>16</BitLen>
						<Name>Dispositivo 2 (EL6751)_CanState</Name>
						<DataType>UINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>76</IndexOffset>
							<Length>2</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xf100</Index>
						<SubIndex>5</SubIndex>
						<BitLen>8</BitLen>
						<Name>Dispositivo 2 (EL6751)_RxErrorCounter</Name>
						<DataType>USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>78</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xf100</Index>
						<SubIndex>4</SubIndex>
						<BitLen>8</BitLen>
						<Name>Dispositivo 2 (EL6751)_TxErrorCounter</Name>
						<DataType>USINT</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>73730</IndexGroup>
							<IndexOffset>79</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xf100</Index>
						<SubIndex>2</SubIndex>
						<BitLen>1</BitLen>
						<Name>Dispositivo 2 (EL6751)_DiagFlag</Name>
						<DataType>BOOL</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>81922</IndexGroup>
							<IndexOffset>640</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#xa000</Index>
						<SubIndex>2</SubIndex>
						<BitLen>1</BitLen>
						<Name>Box 7 (IL CAN BK-TC)_DiagFlag</Name>
						<DataType>BOOL</DataType>
						<AdsInfo>
							<AmsAddress>
								<AmsPort>300</AmsPort>
							</AmsAddress>
							<IndexGroup>81922</IndexGroup>
							<IndexOffset>641</IndexOffset>
							<Length>1</Length>
						</AdsInfo>
					</Entry>
					<Entry>
						<Index>#x0</Index>
						<BitLen>6</BitLen>
					</Entry>
				</TxPdo>
			</ProcessData>
			<Mailbox DataLinkLayer="true">
				<Send>
					<Start>6144</Start>
					<Length>558</Length>
				</Send>
				<Recv>
					<Start>6702</Start>
					<Length>558</Length>
					<StatusBitAddr>1</StatusBitAddr>
				</Recv>
				<Timeout>
					<ReturningRequest>100</ReturningRequest>
					<Response>2000</Response>
				</Timeout>
				<BootStrap>
					<Send>
						<Start>4096</Start>
						<Length>532</Length>
					</Send>
					<Recv>
						<Start>6144</Start>
						<Length>532</Length>
					</Recv>
				</BootStrap>
				<Protocol>AoE</Protocol>
				<Protocol>CoE</Protocol>
				<Protocol>FoE</Protocol>
				<CoE>
					<InitCmds>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 0 (1C32:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>7218</Index>
							<SubIndex>0</SubIndex>
							<Data>0300010000093d0000000000</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 1 (1C33:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>7219</Index>
							<SubIndex>0</SubIndex>
							<Data>030022000000000000000000</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 2 (F800:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>63488</Index>
							<SubIndex>0</SubIndex>
							<Data>0a007f0380001e00010010006400</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 3 (8000:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>32768</Index>
							<SubIndex>0</SubIndex>
							<Data>2b0007000000000000000000000000000000000091010300840000000100000100000000000000000000000000000000000000006400030000000000010178000a00</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 4 (8001:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>32769</Index>
							<SubIndex>0</SubIndex>
							<Data>010001000000ff018701000000000018</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 5 (8002:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>32770</Index>
							<SubIndex>0</SubIndex>
							<Data>010000000000ff040702000000000014</Data>
						</InitCmd>
						<InitCmd Fixed="1" CompleteAccess="1">
							<Transition>PS</Transition>
							<Comment><![CDATA[EL67xx CoE Init Cmd 6 (8003:00)]]></Comment>
							<Timeout>0</Timeout>
							<Ccs>1</Ccs>
							<Index>32771</Index>
							<SubIndex>0</SubIndex>
							<Data>10000018010400870100000018020100ff0118010400870200000118020100ff0218010400870300000218020100ff0318010400870400000318020100ff0014010400070200000014020100ff0114010400070300000114020100ff0214010400070400000214020100ff0314010400070500000314020100ff</Data>
						</InitCmd>
					</InitCmds>
					<Profile>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
						<ChannelInfo>
							<ProfileNo>5001</ProfileNo>
							<AddInfo>0</AddInfo>
						</ChannelInfo>
					</Profile>
				</CoE>
				<AoE/></Mailbox>
				<InitCmds>
					<InitCmd>
						<Transition>PI</Transition>
						<Transition>BI</Transition>
						<Transition>SI</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[set device state to INIT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>288</Ado>
						<Data>1100</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PI</Transition>
						<Transition>SI</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[check device state for INIT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>1</Cmd>
						<Adp>65533</Adp>
						<Ado>304</Ado>
						<Data>0000</Data>
						<Retries>3</Retries>
						<Validate>
							<Data>0100</Data>
							<DataMask>0f00</DataMask>
							<Timeout>10000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>BI</Transition>
						<Comment><![CDATA[check device state for INIT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>1</Cmd>
						<Adp>65533</Adp>
						<Ado>304</Ado>
						<Data>0000</Data>
						<Retries>3</Retries>
						<Validate>
							<Data>0100</Data>
							<DataMask>0f00</DataMask>
							<Timeout>20000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Comment><![CDATA[set device state to INIT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>288</Ado>
						<Data>1100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Comment><![CDATA[check device state for INIT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>1</Cmd>
						<Adp>65533</Adp>
						<Ado>304</Ado>
						<Data>0000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>0100</Data>
							<DataMask>0f00</DataMask>
							<Timeout>5000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[assign EEPROM to ECAT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>1280</Ado>
						<Data>00</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[check vendor id]]></Comment>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>1282</Ado>
						<Data>000108000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[check vendor id]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>1</Cmd>
						<Adp>65533</Adp>
						<Ado>1288</Ado>
						<Data>00000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>02000000</Data>
							<Timeout>100</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[check product code]]></Comment>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>1282</Ado>
						<Data>00010a000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[check product code]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>1</Cmd>
						<Adp>65533</Adp>
						<Ado>1288</Ado>
						<Data>00000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>52305f1a</Data>
							<Timeout>100</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Comment><![CDATA[set physical address]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>16</Ado>
						<Data>ec03</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Transition>PI</Transition>
						<Transition>SI</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[clear sm 0/1 (mailbox out/in)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2048</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>BI</Transition>
						<Comment><![CDATA[clear sm 0/1 (mailbox out/in)]]></Comment>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>2048</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[set sm 0 (mailbox out)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2048</Ado>
						<Data>00182e0226000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[set sm 1 (mailbox in)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2056</Ado>
						<Data>2e1a2e0222000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IB</Transition>
						<Comment><![CDATA[set sm 0 (bootstrap out)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2048</Ado>
						<Data>0010140226000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IB</Transition>
						<Comment><![CDATA[set sm 1 (bootstrap in)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2056</Ado>
						<Data>0018140222000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>SP</Transition>
						<Transition>OP</Transition>
						<Comment><![CDATA[set device state to PREOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>1200</Data>
						<Retries>300</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>SP</Transition>
						<Transition>SI</Transition>
						<Transition>OP</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[clear sms]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2064</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[set sm 2 (outputs)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2064</Ado>
						<Data>0010040026000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[set sm 3 (inputs)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>2072</Ado>
						<Data>0014080022000100</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[set fmmu 0 (outputs)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1536</Ado>
						<Data>00100001040000070010000201000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[set fmmu 1 (inputs)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1552</Ado>
						<Data>00100001080000070014000101000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Comment><![CDATA[set fmmu 2 (mailbox state)]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1568</Ado>
						<Data>00000009010001010d08000101000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>OS</Transition>
						<Comment><![CDATA[set device state to SAFEOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>0400</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>SP</Transition>
						<Transition>SI</Transition>
						<Transition>OP</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[clear fmmu 0]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1536</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>SP</Transition>
						<Transition>SI</Transition>
						<Transition>OP</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[clear fmmu 1]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1552</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PI</Transition>
						<Transition>BI</Transition>
						<Transition>SI</Transition>
						<Transition>OI</Transition>
						<Comment><![CDATA[clear fmmu 2]]></Comment>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1568</Ado>
						<Data>00000000000000000000000000000000</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>SP</Transition>
						<Transition>OP</Transition>
						<Comment><![CDATA[check device state for PREOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Retries>3</Retries>
						<Validate>
							<Data>020000000000</Data>
							<DataMask>0f0000000000</DataMask>
							<Timeout>10000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>IB</Transition>
						<Comment><![CDATA[assign EEPROM to PDI]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>1280</Ado>
						<Data>01</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>II</Transition>
						<Comment><![CDATA[assign EEPROM back to ECAT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>1280</Ado>
						<Data>00</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[set device state to PREOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>1200</Data>
						<Cnt>1</Cnt>
						<Retries>300</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Comment><![CDATA[check device state for PREOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>020000000000</Data>
							<DataMask>1f0000000000</DataMask>
							<Timeout>5000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>IP</Transition>
						<Transition>BI</Transition>
						<Comment><![CDATA[assign EEPROM back to ECAT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>2</Cmd>
						<Adp>65533</Adp>
						<Ado>1280</Ado>
						<Data>00</Data>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IB</Transition>
						<Comment><![CDATA[set device state to BOOT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>1300</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>IB</Transition>
						<Comment><![CDATA[check device state for BOOT]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>030000000000</Data>
							<DataMask>1f0000000000</DataMask>
							<Timeout>5000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[set device state to SAFEOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>0400</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>PS</Transition>
						<Comment><![CDATA[check device state for SAFEOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>040000000000</Data>
							<DataMask>1f0000000000</DataMask>
							<Timeout>10000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>OS</Transition>
						<Comment><![CDATA[check device state for SAFEOP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Retries>3</Retries>
						<Validate>
							<Data>040000000000</Data>
							<DataMask>0f0000000000</DataMask>
							<Timeout>1000</Timeout>
						</Validate>
					</InitCmd>
					<InitCmd>
						<Transition>SO</Transition>
						<Comment><![CDATA[set device state to OP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>5</Cmd>
						<Adp>1004</Adp>
						<Ado>288</Ado>
						<Data>0800</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
					</InitCmd>
					<InitCmd>
						<Transition>SO</Transition>
						<Comment><![CDATA[check device state for OP]]></Comment>
						<Requires>cycle</Requires>
						<Cmd>4</Cmd>
						<Adp>1004</Adp>
						<Ado>304</Ado>
						<Data>000000000000</Data>
						<Cnt>1</Cnt>
						<Retries>3</Retries>
						<Validate>
							<Data>080000000000</Data>
							<DataMask>1f0000000000</DataMask>
							<Timeout>10000</Timeout>
						</Validate>
					</InitCmd>
				</InitCmds>
				<PreviousPort Selected="1">
					<Port>B</Port>
					<PhysAddr>1003</PhysAddr>
				</PreviousPort>
				<SyncUnits>
					<SyncUnit>Terminal 5 (EL6751)</SyncUnit>
				</SyncUnits>
				<DC>
					<PotentialReferenceClock>0</PotentialReferenceClock>
					<TimeLoopControlOnly>0</TimeLoopControlOnly>
					<OpMode Selected="1">
						<Name>Synchron</Name>
						<Desc>SM-Synchron</Desc>
						<AssignActivate>#x0</AssignActivate>
						<CycleTimeSync0 Factor="0">0</CycleTimeSync0>
						<ShiftTimeSync0>0</ShiftTimeSync0>
						<CycleTimeSync1 Factor="1">0</CycleTimeSync1>
						<ShiftTimeSync1>0</ShiftTimeSync1>
					</OpMode>
					<OpMode>
						<Name>DCSYNC</Name>
						<Desc>DC-Synchron</Desc>
						<AssignActivate>#x700</AssignActivate>
						<CycleTimeSync0 Factor="1">0</CycleTimeSync0>
						<ShiftTimeSync0>0</ShiftTimeSync0>
						<CycleTimeSync1 Factor="1">0</CycleTimeSync1>
						<ShiftTimeSync1>250000</ShiftTimeSync1>
					</OpMode>
				</DC>
				<Settings>
					<StateMachine>
						<AutoRestoreStates>1</AutoRestoreStates>
						<WaitForWcStateOkay>0</WaitForWcStateOkay>
						<ReInitAfterCommError>1</ReInitAfterCommError>
						<LogCommChanges>1</LogCommChanges>
						<FinalState>OP</FinalState>
						<Timeout>
							<I2P>5000</I2P>
							<P2S2O>10000</P2S2O>
							<Back2PI>10000</Back2PI>
							<O2S>1000</O2S>
						</Timeout>
						<CheckVendorId>EQ</CheckVendorId>
						<CheckProductCode>EQ</CheckProductCode>
						<CheckRevisionNo></CheckRevisionNo>
						<CheckSerialNo></CheckSerialNo>
					</StateMachine>
					<Watchdog>
						<Divider0400 Enabled="0">2498</Divider0400>
						<PdiTime0410 Enabled="0">1000</PdiTime0410>
						<SmTime0420 Enabled="0">1000</SmTime0420>
					</Watchdog>
					<PdoSettings>
						<PdoAssign>0</PdoAssign>
						<PdoConfig>0</PdoConfig>
					</PdoSettings>
				</Settings>
				<AssociatedDevice>Dispositivo 2 (EL6751)</AssociatedDevice>
				<Slot>
					<Name>EL6751</Name>
				</Slot>
			</Slave>
			<AmsAddress>
				<AmsNetId>5.27.250.190.2.1</AmsNetId>
				<AmsPort>1004</AmsPort>
			</AmsAddress>
		</EtherCAT>
	</TreeItem>
_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to