ethercatdc.c File Reference

Distributed Clock EtherCAT functions. More...

#include "ethercattype.h"
#include "nicdrv.h"
#include "ethercatbase.h"
#include "ethercatmain.h"
#include "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)
 1st sync pulse delay in ns here 100ms

Functions

void ec_dcsync0 (uint16 slave, boolean act, uint32 CyclTime, uint32 CyclShift)
 Set DC of slave to fire sync0 at CyclTime interval with CyclShift offset.
void ec_dcsync01 (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.
int32 ec_porttime (uint16 slave, uint8 port)
uint8 ec_prevport (uint16 slave, uint8 port)
uint8 ec_parentport (uint16 parent)
boolean ec_configdc (void)
 Locate DC slaves, measure propagation delays.

Detailed Description

Distributed Clock EtherCAT functions.

Definition in file ethercatdc.c.


Define Documentation

#define PORTM0   0x01

Definition at line 52 of file ethercatdc.c.

#define PORTM1   0x02

Definition at line 53 of file ethercatdc.c.

#define PORTM2   0x04

Definition at line 54 of file ethercatdc.c.

#define PORTM3   0x08

Definition at line 55 of file ethercatdc.c.

#define SyncDelay   ((int32)100000000)

1st sync pulse delay in ns here 100ms

Definition at line 58 of file ethercatdc.c.


Function Documentation

boolean ec_configdc ( void   ) 

Locate DC slaves, measure propagation delays.

Set DC's of all slaves to sync with the first, measure propagation delays.

return boolean if slaves are found with DC

Definition at line 266 of file ethercatdc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ec_dcsync0 ( uint16  slave,
boolean  act,
uint32  CyclTime,
uint32  CyclShift 
)

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

Parameters:
[in] slave Slave number.
[in] act TRUE = active, FALSE = deactivated
[in] CyclTime Cycltime in ns.
[in] CyclShift CyclShift in ns.

Definition at line 68 of file ethercatdc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ec_dcsync01 ( 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] slave Slave number.
[in] act TRUE = active, FALSE = deactivated
[in] CyclTime0 Cycltime SYNC0 in ns.
[in] CyclTime1 Cycltime 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] CyclShift CyclShift in ns.

Definition at line 120 of file ethercatdc.c.

Here is the call graph for this function:

uint8 ec_parentport ( uint16  parent  ) 

Definition at line 231 of file ethercatdc.c.

Here is the caller graph for this function:

int32 ec_porttime ( uint16  slave,
uint8  port 
)

Definition at line 164 of file ethercatdc.c.

Here is the caller graph for this function:

uint8 ec_prevport ( uint16  slave,
uint8  port 
)

Definition at line 188 of file ethercatdc.c.

Here is the caller graph for this function:

Generated by  doxygen 1.6.3