industrialNETworXnetx

Markus Mueller

Markus Mueller

Murrelektronik GmbH

| 14.04.2010 | 15:09 | 8 replies

comX DPM - No Data transmitted to the Master

Hello,

i am using the comX CA-RE and i´m tyring to send data from comX to EtherCAT Master (TwinCAT), but it doesn´t work.
I put my data in the Output Data Area 0 of the DPM and watch the network communication with Wireshark.
I don´t see any kind of data transmission from the slave to the master. :-(

When i put data in the Output Data Area and send it correctly, is this area after the transmission empty?

regards,
Markus

Johnny

Johnny

| 14.04.2010 | 16:39

Hallo Markus,

Do you mean, that you only write the data in the DPM (lets say 4 byte) and wait for a result?

This is not enough. The DPM has a handshake mechanism to avoid inconsistent data. This mechanism is described in the netX Dualport memory interface manual. Usually you use the cifx Device driver or toolkit to access the cyclic data in the DPM. These functions handle the handshake mechism correct. You dont need to reinvent the wheel.

Johnny

Markus Mueller

Markus Mueller

Murrelektronik GmbH

| 15.04.2010 | 08:03

Good morning,

i know the handshake mechanism, i forgot to discribe it in my last post. :-)

Ok, let me explain my mechanism to send data.
1. First, i put two pointers at Adress 0x20A & 0x208 to check the access right.
2. After that, i put another pointer to adress 0x1300 (output data area) and put my data in it.
3. And last i toggle the Host handshake flag (0x20A) and wait for an result.
I´m using the 8bit connection to comX.

My Programm hast following structure: (simplified)
- check the EtherCAT statemachine
- check for new data in Input MBX
- if new data in MBX, put data in Output MBX and send it, goto begin

Then i look with an debugger at the handshake registers i can see the following data:
- First call of the send function:
1. 0x208 = 0x45, 0x20A = 0x44 (check access rights)
3. 0x208 = 0x05, 0x20A = 0x04 (toggled handshake flag)
- Second call of the send function after new data arrived:
1. 0x208 = 0x85, 0x20A = 0x84
3. 0x208 = 0xC5, 0x20A = 0xC4

I hope my english descriptionis is not so bad and you understand it ;-)

regards,
Markus

Johnny

Johnny

| 15.04.2010 | 13:42

Hello Markus,

you wrote "I don´t see any kind of data transmission from the slave to the master."

Do you mean, you dont see any frames in wireshark? Or are you in data exchange "OPERATIONAL" and the transmitted data is just 0x0?

The behaviour of the handshake cells looks good.

Johnny

Markus Mueller

Markus Mueller

Murrelektronik GmbH

| 15.04.2010 | 15:04

Hello Johnny,

you are right, the data transmission in OP-state is 0x0 from comX to TwinCAT.
The data transmission with wireshark looks like this:

I´m sending from TwinCAT 1x2 Byte, 1x1 Byte and 2x4 Byte Packets. The first 4 Byte Packet is 0x00000012.
The data is correctly transmitted to the input data area.

Markus

liuyan

liuyan

| 20.04.2010 | 09:37

Well, you should select the "Promiscuous Mode" on the "Adapter" ticket. :-)

Johnny

Johnny

| 20.04.2010 | 10:04

Hello Markus,

Sorry, I havnt noticed your last post.

Please look at the LRD with Adr=0x10800. The Working Counter remains 0. The Slave hasnt processed this "Read Command". So I guess your problem is not DPM specific. Its eigther a problem with the EtherCAT configuration of TwinCAT or a firmware bug or a invalid/broken Warmstart configuration.

1.) Please post your version of the EtherCAT Slave Firmware

2.) Please post your warmstart parameters

3.) Please post a wireshark trace of the bus start. Evt. send a private message to me.

 

Johnny

Markus Mueller

Markus Mueller

Murrelektronik GmbH

| 20.04.2010 | 13:38

Hello Johnny,

i fixed the Problem, it was a bug in TwinCAT.

Thanks you for your help and have a nice day ;-)

Markus

renee bass

renee bass

| 18.05.2010 | 07:35

Remarakable post on technology. These are interesting to learn some insights.

Login