[etherlab-users] Beckhoff EL6001/EL6021 Issues

Richard Hacker ha at igh.de
Fri May 23 09:39:11 CEST 2014


1) Have you initialized the slave with CW.2 (InitRequest)?
2) Have you set the number of bytes in CW.8...CW.15 (OutLength) correctly?
3) Every state change of CW.0 (TransmitRequest) (i.e. CW.0 = !CW.0) will 
start a transmission. Transmission is complete when SW.0 == CW.0 and you 
have to wait for this before sending the next data set.

This is the easy way to use the slave. It also has a complicated way 
where you fill an internal 122-byte buffer using TransmitRequest and 
TransmitAccepted and when this process is complete, you set CW.3 
(SendContinuous) to flush the buffer all at once, thereby getting a sort 
of (!!) coherent message on the wire.

I hope you realize that you have to implement a statemachine to handle 
this slave, it is not as easy as using a standard input/output slave.

- Richard

Am 05/22/2014 08:42 PM, schrieb Derrill Vezina:
> Has anyone implemented the Beckhoff EL6001 RS232 and EL6021 Modbus
> interfaces with the etherlab 1.5.2 master? I am having some trouble with
> both of the devices and I think the same issue is happening with both
> modules.
>
> I am able to initialize each of the devices using the ctrl and status
> register bits doing the initialization sequence. Also, I can set 4073,
> 4074, 4075 SDO registers for configuration on the port with setting the
> baud rate, data frame, etc..
>
> Where I am failing is to actually send out the data. Using the structure
> output from the ethercat tool in the ethercat 1.5.2 / tool folder, I get
> the following for PDO outputs:
>
> // EL6021 PDO entries
> ec_pdo_entry_info_t EL60XX_pdo_entries[] = {
>      {0x3003, 0x01, 16},/* Ctrl */
>      {0x3003, 0x02, 8},/* Data Out 0 */
>      {0x3003, 0x03, 8},/* Data Out 1 */
>      {0x3003, 0x04, 8},/* Data Out 2 */
>      {0x3003, 0x05, 8},/* Data Out 3 */
>      {0x3003, 0x06, 8},/* Data Out 4 */
>      {0x3003, 0x07, 8},/* Data Out 5 */
>      {0x3003, 0x08, 8},/* Data Out 6 */
>      {0x3003, 0x09, 8},/* Data Out 7 */
>      {0x3003, 0x0a, 8},/* Data Out 8 */
>      {0x3003, 0x0b, 8},/* Data Out 9 */
>      {0x3003, 0x0c, 8},/* Data Out 10 */
>      {0x3003, 0x0d, 8},/* Data Out 11 */
>      {0x3003, 0x0e, 8},/* Data Out 12 */
>      {0x3003, 0x0f, 8},/* Data Out 13 */
>      {0x3003, 0x10, 8},/* Data Out 14 */
>      {0x3003, 0x11, 8},/* Data Out 15 */
>      {0x3003, 0x12, 8},/* Data Out 16 */
>      {0x3003, 0x13, 8},/* Data Out 17 */
>      {0x3003, 0x14, 8},/* Data Out 18 */
>      {0x3003, 0x15, 8},/* Data Out 19 */
>      {0x3003, 0x16, 8},/* Data Out 20 */
>      {0x3003, 0x17, 8},/* Data Out 21 */
>      {0x3103, 0x01, 16},/* Status */
>      {0x3103, 0x02, 8},/* Data In 0 */
>      {0x3103, 0x03, 8},/* Data In 1 */
>      {0x3103, 0x04, 8},/* Data In 2 */
>      {0x3103, 0x05, 8},/* Data In 3 */
>      {0x3103, 0x06, 8},/* Data In 4 */
>      {0x3103, 0x07, 8},/* Data In 5 */
>      {0x3103, 0x08, 8},/* Data In 6 */
>      {0x3103, 0x09, 8},/* Data In 7 */
>      {0x3103, 0x0a, 8},/* Data In 8 */
>      {0x3103, 0x0b, 8},/* Data In 9 */
>      {0x3103, 0x0c, 8},/* Data In 10 */
>      {0x3103, 0x0d, 8},/* Data In 11 */
>      {0x3103, 0x0e, 8},/* Data In 12 */
>      {0x3103, 0x0f, 8},/* Data In 13 */
>      {0x3103, 0x10, 8},/* Data In 14 */
>      {0x3103, 0x11, 8},/* Data In 15 */
>      {0x3103, 0x12, 8},/* Data In 16 */
>      {0x3103, 0x13, 8},/* Data In 17 */
>      {0x3103, 0x14, 8},/* Data In 18 */
>      {0x3103, 0x15, 8},/* Data In 19 */
>      {0x3103, 0x16, 8},/* Data In 20 */
>      {0x3103, 0x17, 8},/* Data In 21 */
> };
>
> // EL6021 PDO information
> ec_pdo_info_t EL60XX_pdos[] = {
>      {0x1602, 23, EL60XX_pdo_entries + 0},/* RxPDO-Map Outputs */
>      {0x1a02, 23, EL60XX_pdo_entries + 23},/* TxPDO-Map Inputs */
> };
>
> // EL6021 syncs
> ec_sync_info_t EL60XX_syncs[] = {
>      {0, /EC_DIR_OUTPUT/, 0, NULL, /EC_WD_DISABLE/},
>      {1, /EC_DIR_INPUT/, 0, NULL, /EC_WD_DISABLE/},
>      {2, /EC_DIR_OUTPUT/, 1, EL60XX_pdos + 0, /EC_WD_DISABLE/},
>      {3, /EC_DIR_INPUT/, 1, EL60XX_pdos + 1, /EC_WD_DISABLE/},
>      {0xff}
> };
>
> I am using these as my defaults since I want to use the full 22 bytes (I
> know you can configure between 3, 5, and 22 bytes, in which I would like
> to stick with 22).
>
> When I fill the data bytes and set the ctrl bit to transmit data, I get
> a transmit success status on the status byte in the next process data
> exchange but no data goes out the port. I have the other side of the
> RS232 interface hooked up to procomm to verify there is no data coming
> out of the port. Plus the activity light does not blink.
>
> Has anyone else had any issues with this?
>
> Thank you!
>
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>



More information about the Etherlab-users mailing list