[etherlab-users] Beckhoff EL6002 Issues

Benjamin Girault girault at bionic-robotics.de
Wed Mar 25 11:42:43 CET 2015


Hello,

I have some problems with the Beckhoff EL6002 (coupler Ethercat <->  
RS232). I saw that last year Derrill Vezina had some issues too with  
this coupler but I don't know how he solved his problem. It seems that  
I face a similar one. I have trouble transmitting bytes between the PC  
and the coupler. I followed and implemented the protocol as described  
in the documentation and also described in Richard's answer to Derrill.

Unfortunately, the transmission only works a few times and then stops,  
but it is somehow unpredictable. After a point, either the coupler  
does not accept a transmit request, or does not notify that some bytes  
arrived using the receiveRequest bit. The only explanation would be  
that the coupler did not notice that the bit changed, or thinks I have  
not copied the old data yet and waits until I do it.

The ethercat communication itself keeps working fine. I described  
below with more details one test setup.

I would be very thankful if somebody had some idea / advice

Best regards / Viele Grüße

Benjamin Girault


= Hardware setup =
* Beckhoff EK1100
* Beckhoff EL6002 (Ethercat - RS232 coupler)
* Linux PC with real-time kernel (Kernel #1 SMP PREEMPT RT Debian  
3.14.15-2~bpo70+1 (2014-08-21))

= Software setup =
* Etherlab driver for Linux (Etherlab, Version 1.5.2, output of "ec  
version": IgH EtherCAT master 1.5.2 2eff7c993a63+)
* Ethercat communication loop: 4kHz
* Baudrate of the serial bus: 9600 Baud
* no RTS/CTS

= Domain setup =
* Write domain (PC -> EL6002), 24 Bytes in total

  +----------------+-------------+-------------+-----+--------------+
  | Byte #1        | Byte #2     | Byte #3     | ... | Byte #24     |
  +----------------+-------------+-------------+-----+--------------+
  |transmitRequest |outputLength |outputBytes0 | ... |outputBytes21 |
  |receiveAccepted |             |             |     |              |
  |initRequest     |             |             |     |              |
  |sendContinous   |             |             |     |              |
  +----------------+-------------+-------------+-----+--------------+

* Read domain (EL6002 -> PC), 24 Bytes in total

  +----------------+-------------+-------------+-----+--------------+
  | Byte #1        | Byte #2     | Byte #3     | ... | Byte #24     |
  +----------------+-------------+-------------+-----+--------------+
  |transmitAccepted|inputLength  |inputBytes0  | ... |inputBytes21  |
  |receiveRequest  |             |             |     |              |
  |initAccepted    |             |             |     |              |
  |bufferFull      |             |             |     |              |
  |parityError     |             |             |     |              |
  |framingError    |             |             |     |              |
  |overrunError    |             |             |     |              |
  +----------------+-------------+-------------+-----+--------------+

= Test 1: send Bytes to the coupler =
The Pins Tx and Rx of the Beckhoff serial coupler are bridged

* I. 0x8000 data field:
0x8000:01 | Enable RTS/CTS = 0x00
0x8000:02 | Xon/Xoff supported Tx Data = 0x00
0x8000:03 | Xon/Xoff supported Rx Data = 0x00
0x8000:04 | Enable send FIFO data continuous = 0x00
0x8000:05 | Enable transfer rate optimization = 0x01
0x8000:11 | Baud rate = 0x06
0x8000:15 | Data Frame =0x03
0x8000:1a | Rx Buffer Full notification = 0x03 0x60
0x8000:1b | Explicit Baud rate = 0x00 0x00 0x25 0x80

* II. EL 6002 coupled initialize
-> Bit „initRequest“ set to 1
Write-Domain (as Hex):
raw write domain data: 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> coupler sets then „initAccepted“
Answer of the coupler (as Hex):
raw read domain data: 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> PC sets „initRequest“ back to 0
raw write domain data: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> the coupler is ready for the communikation („initAccepted“ is 0)
raw read domain data: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

* III. Send Bytes to the EL6002 coupler
-> Bytes to send: 0x01 0x31 0x44 0x50 0x0d (Start Byte, '1', 'D', 'P'  
and Stop Byte)
-> toggle the Bit „transmitRequest“, modify „outputLength“ and copy  
the bytes „outputBytes0“ to „outputBytes4“
raw write domain data: 1 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> the coupler accepts the transmission (Bit „transmitAccepted“ changed)
raw read domain data: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> the coupler sends the Bytes on the serial bus and receives them  
back (since Tx and Rx are coupled)
-> the coupler notifies, that some Bytes are in its Input-Buffer:
raw read domain data: 3 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> PC accepts the transmission and copy the bytes locally (Start Byte,  
'1', 'D', 'P', Stop Byte)
raw write domain data: 3 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> new Bytes to send: 0x01 0x31 0x44 0x50 0x0d (Start Byte, '1', 'D',  
'P' and Stop Byte)
-> toggle the Bit „transmitRequest“, modify „outputLength“ and copy  
the bytes „outputBytes0“ to „outputBytes4“
raw write domain data: 2 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

-> the coupler NEVER accepts the transmission and keeps sending the  
same bytes:
raw read domain data: 3 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The PC also keeps sending the same bytes:
raw write domain data: 2 5 1 31 44 50 d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The EL6002 is in mode „OP“ and seems to work properly

While the communication continues, I checked the data fields in 0xa000:
0xa000:01 | Buffer overflow = 0x00
0xa000:02 | Parity error = 0x00
0xa000:03 | Framing error = 0x00
0xa000:04 | Overrun error = 0x00
0xa000:05 | Buffer full = 0x00
0xa000:11 | Data bytes in send buffer = 0x0000
0xa000:21 | Data bytes in receive buffer = 0x0000



---

Benjamin Girault
Software-Developer

Bionic Robotics GmbH
Robert-Bosch-Straße 7
64293 Darmstadt

Tel: +49 6151 2767285
Fax: +49 6151 2767287
Mail: Girault at bionic-robotics.de
Web: www.bionic-robotics.de

Bionic Robotics GmbH
Firmensitz: Robert-Bosch-Str, 7, 64293 Darmstadt
Registergericht: Amtsgericht Darmstadt, HRB 89275
Geschäftsführer: Ralf Teichmann


Diese E-Mail ist nur für die genannten Empfänger bestimmt und kann  
vertrauliche Informationen enthalten. Wenn Sie nicht der richtige  
Empfänger sind, unterlassen Sie bitte das Kopieren, die Benutzung oder  
die Weitergabe dieser Informationen an Dritte. Sollten Sie diese  
E-Mail versehentlich erhalten haben, senden Sie sie bitte an uns  
zurück und löschen sie anschließend.

This email is confidential. If you are not the intended recipient, you  
must not copy, disclose or use its contents. If you have received it  
in error, please inform us immediately by return email and delete the  
document.




More information about the Etherlab-users mailing list