<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
<BR>
Check if your device has notLRW set. <BR>
<BR>
If so you are going to need to have a separate domain for input and output. <BR>
<BR>
On Tue, 2010-11-09 at 10:39 +0100, Wilfried Holzke wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,
I trying to transfer process data to and from a CIFX50RE pci card from
Hilscher. With Twincat software it works. I am able to read and write
data to the CIFX50RE card.
If I use the IgH EtherCAT Master, I am only able to write data to the
outputs. For my tests I use the rtai example of the ethercat master.
If I only add the entry for data out to domain1_reg then it works.
The working counter changes to 1/1. And a can read for example 06 on the
slave.
But if I add the entry for data input, I get working counter 0/3
(ethercat domain -v) and no change.
If I only add the entry for data input, I get working counter 0/1
and no change.
I made the following modifications to the example code:
----------------------------------------------------------------------
// process data
static uint8_t *domain1_pd; // process data memory
#define DataIoSlavePos 0, 0
#define CIFX_RE_ECS 0xE0000044, 0x00000001
static unsigned int off_data_out; // offsets for PDO entries
static unsigned int off_data_in; // offsets for PDO entries
const static ec_pdo_entry_reg_t domain1_regs[] = {
// { DataIoSlavePos , CIFX_RE_ECS, 0x3000 , 1 , &off_data_in },
{ DataIoSlavePos , CIFX_RE_ECS, 0x2000 , 1 , &off_data_out },
{}
};
static unsigned int counter = 0;
static unsigned int blink = 0;
/*****************************************************************************/
/* Master 0, Slave 0, "CIFX RE/ECS"
* Vendor ID: 0xE0000044
* Product code: 0x00000001
* Revision number: 0x00000002
*/
ec_pdo_entry_info_t slave_0_pdo_entries[] = {
{0x2000, 0x01, 8}, /* 1 Byte Out (0) */
...
{0x2000, 0xc8, 8}, /* 1 Byte Out (199) */
{0x3000, 0x01, 8}, /* 1 Byte In (0) */
...
{0x3000, 0xc8, 8}, /* 1 Byte In (199) */
};
ec_pdo_info_t slave_0_pdos[] = {
{0x1600, 200, slave_0_pdo_entries + 0}, /* 1. RxPDO */
{0x1A00, 200, slave_0_pdo_entries + 200}, /* 1. TxPDO */
};
ec_sync_info_t slave_0_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_0_pdos + 0, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 1, slave_0_pdos + 1, EC_WD_DEFAULT},
{0xff}
};
----------------------------------------------------------------------
Further on I removed the configuration for the second slave (sc).
I tried "etherlab upload 0x3000 1" and I get the value which I have
written from the slave.
Do I miss something in my configuration?
Thanks for hints.
regards
W. Holzke
_______________________________________________
etherlab-users mailing list
<A HREF="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</A>
<A HREF="http://lists.etherlab.org/mailman/listinfo/etherlab-users">http://lists.etherlab.org/mailman/listinfo/etherlab-users</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>