Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to soem version 1.3.1 #4

Open
wants to merge 4 commits into
base: hydro-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ catkin_package(
INCLUDE_DIRS include
LIBRARIES ethercat_soem
# CATKIN_DEPENDS other_catkin_pkg
DEPENDS pthread rt
DEPENDS
)

###########
Expand Down Expand Up @@ -130,11 +130,11 @@ target_link_libraries(slaveinfo ethercat_soem)
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
Expand Down
17 changes: 9 additions & 8 deletions include/ethercat_soem/ethercatbase.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatbase.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -38,9 +39,9 @@
* (www.beckhoff.com).
*/

/** \file
/** \file
* \brief
* Headerfile for ethercatbase.c
* Headerfile for ethercatbase.c
*/

#ifndef _ethercatbase_
Expand Down
25 changes: 13 additions & 12 deletions include/ethercat_soem/ethercatcoe.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatcoe.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -38,9 +39,9 @@
* (www.beckhoff.com).
*/

/** \file
/** \file
* \brief
* Headerfile for ethercatcoe.c
* Headerfile for ethercatcoe.c
*/

#ifndef _ethercatcoe_
Expand All @@ -58,7 +59,7 @@ extern "C"
#define EC_MAXOELIST 256

/* Storage for object description list */
typedef struct
typedef struct
{
/** slave number */
uint16 Slave;
Expand All @@ -77,7 +78,7 @@ typedef struct
} ec_ODlistt;

/* storage for object list entry information */
typedef struct
typedef struct
{
/** number of entries in list */
uint16 Entries;
Expand All @@ -102,7 +103,7 @@ int ec_SDOwrite(uint16 Slave, uint16 Index, uint8 SubIndex,
int ec_RxPDO(uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
int ec_TxPDO(uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
int ec_readPDOmap(uint16 Slave, int *Osize, int *Isize);
int ec_readPDOmapCA(uint16 Slave, int *Osize, int *Isize);
int ec_readPDOmapCA(uint16 Slave, int Thread_n, int *Osize, int *Isize);
int ec_readODlist(uint16 Slave, ec_ODlistt *pODlist);
int ec_readODdescription(uint16 Item, ec_ODlistt *pODlist);
int ec_readOEsingle(uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
Expand All @@ -117,7 +118,7 @@ int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubInd
int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize);
int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize);
int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int Thread_n, int *Osize, int *Isize);
int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist);
int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist);
int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
Expand Down
17 changes: 9 additions & 8 deletions include/ethercat_soem/ethercatconfig.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatconfig.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -38,9 +39,9 @@
* (www.beckhoff.com).
*/

/** \file
/** \file
* \brief
* Headerfile for ethercatconfig.c
* Headerfile for ethercatconfig.c
*/

#ifndef _ethercatconfig_
Expand Down
41 changes: 27 additions & 14 deletions include/ethercat_soem/ethercatconfiglist.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatconfiglist.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -46,16 +47,23 @@
* in the list. Otherwise the configuration info is read directly from the slave
* EEPROM (SII or Slave Information Interface).
*/
#ifndef _ethercatconfiglist_
#define _ethercatconfiglist_

#ifdef __cplusplus
extern "C"
{
#endif

/*
explanation of dev:
1: static device with no IO mapping ie EK1100
2: input device no mailbox ie simple IO device
3: output device no mailbox
4: input device with mailbox configuration
5: output device with mailbox configuration
6: input/output device no mailbox
7: input.output device with mailbox configuration
explanation of dev:
1: static device with no IO mapping ie EK1100
2: input device no mailbox ie simple IO device
3: output device no mailbox
4: input device with mailbox configuration
5: output device with mailbox configuration
6: input/output device no mailbox
7: input.output device with mailbox configuration
*/
#define EC_CONFIGEND 0xffffffff

Expand Down Expand Up @@ -85,3 +93,8 @@ ec_configlist_t ec_configlist[] = {
{/*Man=*/0x00000002,/*ID=*/0x13ed3052,/*Name=*/"EL5101" ,/*dtype=*/7,/*Ibits=*/40,/*Obits=*/24,/*SM2a*/0x1000,/*SM2f*/0x00010024,/*SM3a*/0x1100,/*SM3f*/0x00010020,/*FM0ac*/1,/*FM1ac*/1},
{/*Man=*/EC_CONFIGEND,/*ID=*/0x00000000,/*Name=*/"" ,/*dtype=*/0,/*Ibits=*/ 0,/*Obits=*/ 0,/*SM2a*/ 0,/*SM2f*/ 0,/*SM3a*/ 0,/*SM3f*/ 0,/*FM0ac*/0,/*FM1ac*/0}
};
#ifdef __cplusplus
}
#endif

#endif
25 changes: 13 additions & 12 deletions include/ethercat_soem/ethercatdc.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatdc.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -38,9 +39,9 @@
* (www.beckhoff.com).
*/

/** \file
/** \file
* \brief
* Headerfile for ethercatdc.c
* Headerfile for ethercatdc.c
*/

#ifndef _EC_ECATDC_H
Expand All @@ -53,13 +54,13 @@ extern "C"

#ifdef EC_VER1
boolean ec_configdc();
void ec_dcsync0(uint16 slave, boolean act, uint32 CyclTime, uint32 CyclShift);
void ec_dcsync01(uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, uint32 CyclShift);
void ec_dcsync0(uint16 slave, boolean act, uint32 CyclTime, int32 CyclShift);
void ec_dcsync01(uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, int32 CyclShift);
#endif

boolean ecx_configdc(ecx_contextt *context);
void ecx_dcsync0(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime, uint32 CyclShift);
void ecx_dcsync01(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, uint32 CyclShift);
void ecx_dcsync0(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime, int32 CyclShift);
void ecx_dcsync01(ecx_contextt *context, uint16 slave, boolean act, uint32 CyclTime0, uint32 CyclTime1, int32 CyclShift);

#ifdef __cplusplus
}
Expand Down
17 changes: 9 additions & 8 deletions include/ethercat_soem/ethercatfoe.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Simple Open EtherCAT Master Library
* Simple Open EtherCAT Master Library
*
* File : ethercatfoe.h
* Version : 1.3.0
* Date : 24-02-2013
* Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2013 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Version : 1.3.1
* Date : 11-03-2015
* Copyright (C) 2005-2015 Speciaal Machinefabriek Ketels v.o.f.
* Copyright (C) 2005-2015 Arthur Ketels
* Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
* Copyright (C) 2014-2015 rt-labs AB , Sweden
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
Expand Down Expand Up @@ -38,9 +39,9 @@
* (www.beckhoff.com).
*/

/** \file
/** \file
* \brief
* Headerfile for ethercatfoe.c
* Headerfile for ethercatfoe.c
*/

#ifndef _ethercatfoe_
Expand Down
Loading