Defines | Functions
ethercatdc.c File Reference

Distributed Clock EtherCAT functions. More...

#include "ethercat_soem/oshw.h"
#include "ethercat_soem/osal.h"
#include "ethercat_soem/ethercattype.h"
#include "ethercat_soem/ethercatbase.h"
#include "ethercat_soem/ethercatmain.h"
#include "ethercat_soem/ethercatdc.h"
Include dependency graph for ethercatdc.c:

Go to the source code of this file.

Defines

#define PORTM0   0x01
#define PORTM1   0x02
#define PORTM2   0x04
#define PORTM3   0x08
#define SyncDelay   ((int32)100000000)

Functions

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)
static uint8 ecx_parentport (ecx_contextt *context, uint16 parent)
static int32 ecx_porttime (ecx_contextt *context, uint16 slave, uint8 port)
static uint8 ecx_prevport (ecx_contextt *context, uint16 slave, uint8 port)

Detailed Description

Distributed Clock EtherCAT functions.

Definition in file ethercatdc.c.


Define Documentation

#define PORTM0   0x01

Definition at line 53 of file ethercatdc.c.

#define PORTM1   0x02

Definition at line 54 of file ethercatdc.c.

#define PORTM2   0x04

Definition at line 55 of file ethercatdc.c.

#define PORTM3   0x08

Definition at line 56 of file ethercatdc.c.

#define SyncDelay   ((int32)100000000)

1st sync pulse delay in ns here 100ms

Definition at line 59 of file ethercatdc.c.


Function Documentation

Locate DC slaves, measure propagation delays.

Parameters:
[in]context= context struct
Returns:
boolean if slaves are found with DC

Definition at line 270 of file ethercatdc.c.

void ecx_dcsync0 ( ecx_contextt context,
uint16  slave,
boolean  act,
uint32  CyclTime,
uint32  CyclShift 
)

Set DC of slave to fire sync0 at CyclTime interval with CyclShift offset.

Parameters:
[in]context= context struct
[in]slaveSlave number.
[in]actTRUE = active, FALSE = deactivated
[in]CyclTimeCycltime in ns.
[in]CyclShiftCyclShift in ns.

Definition at line 70 of file ethercatdc.c.

void ecx_dcsync01 ( ecx_contextt context,
uint16  slave,
boolean  act,
uint32  CyclTime0,
uint32  CyclTime1,
uint32  CyclShift 
)

Set DC of slave to fire sync0 and sync1 at CyclTime interval with CyclShift offset.

Parameters:
[in]context= context struct
[in]slaveSlave number.
[in]actTRUE = active, FALSE = deactivated
[in]CyclTime0Cycltime SYNC0 in ns.
[in]CyclTime1Cycltime SYNC1 in ns. This time is a delta time in relation to the SYNC0 fire. If CylcTime1 = 0 then SYNC1 fires a the same time as SYNC0.
[in]CyclShiftCyclShift in ns.

Definition at line 123 of file ethercatdc.c.

static uint8 ecx_parentport ( ecx_contextt context,
uint16  parent 
) [static]

Definition at line 234 of file ethercatdc.c.

static int32 ecx_porttime ( ecx_contextt context,
uint16  slave,
uint8  port 
) [static]

Definition at line 167 of file ethercatdc.c.

static uint8 ecx_prevport ( ecx_contextt context,
uint16  slave,
uint8  port 
) [static]

Definition at line 191 of file ethercatdc.c.



ethercat_soem
Author(s): Arthur Ketels, M.J.G. van de Molengraft
autogenerated on Wed Aug 26 2015 11:32:40