Functions | Variables
ec_master.c File Reference

Example code for Simple Open EtherCAT master. More...

#include <stdio.h>
#include <string.h>
#include <rt.h>
#include <traceapi.h>
#include "ethercat.h"
Include dependency graph for ec_master.c:

Go to the source code of this file.

Functions

void main (int argc, char *argv[])
 
void slaveinfo (char *ifname)
 

Variables

static ecx_contextt ctx []
 
int64 ec_DCtime
 
int64 ec_DCtime2
 
static ec_eringt ec_elist
 
static ec_eringt ec_elist2
 
static ec_eepromFMMUt ec_FMMU
 
static ec_eepromFMMUt ec_FMMU2
 
ec_groupt ec_groups [EC_MAXGROUP]
 
ec_groupt ec_groups2 [EC_MAXGROUP]
 
static ec_idxstackT ec_idxstack
 
static ec_idxstackT ec_idxstack2
 
static ec_PDOassignt ec_PDOassign
 
static ec_PDOassignt ec_PDOassign2
 
static ec_PDOdesct ec_PDOdesc
 
static ec_PDOdesct ec_PDOdesc2
 
ec_slavet ec_slave [EC_MAXSLAVE]
 
ec_slavet ec_slave2 [EC_MAXSLAVE]
 
int ec_slavecount
 
int ec_slavecount2
 
static ec_eepromSMt ec_SM
 
static ec_eepromSMt ec_SM2
 
static ec_SMcommtypet ec_SMcommtype
 
static ec_SMcommtypet ec_SMcommtype2
 
static boolean EcatError = FALSE
 
static boolean EcatError2 = FALSE
 
static ecx_portt ecx_port
 
static ecx_portt ecx_port2
 
static uint8 esibuf [EC_MAXEEPBUF]
 
static uint8 esibuf2 [EC_MAXEEPBUF]
 
static uint32 esimap [EC_MAXEEPBITMAP]
 
static uint32 esimap2 [EC_MAXEEPBITMAP]
 
char IOmap [4096]
 
char IOmap2 [4096]
 

Detailed Description

Example code for Simple Open EtherCAT master.

Usage : slaveinfo [ifname] [-sdo] [-map] Ifname is NIC interface, f.e. eth0. Optional -sdo to display CoE object dictionary. Optional -map to display slave PDO mapping

This shows the configured slave data.

(c)Arthur Ketels 2010 - 2011

Definition in file ec_master.c.

Function Documentation

◆ main()

void main ( int  argc,
char *  argv[] 
)

Definition at line 345 of file ec_master.c.

◆ slaveinfo()

void slaveinfo ( char *  ifname)

Definition at line 146 of file ec_master.c.

Variable Documentation

◆ ctx

ecx_contextt ctx[]
static

Definition at line 99 of file ec_master.c.

◆ ec_DCtime

int64 ec_DCtime

Definition at line 92 of file ec_master.c.

◆ ec_DCtime2

int64 ec_DCtime2

Definition at line 93 of file ec_master.c.

◆ ec_elist

ec_eringt ec_elist
static

current slave for EEPROM cache buffer

Definition at line 66 of file ec_master.c.

◆ ec_elist2

ec_eringt ec_elist2
static

Definition at line 67 of file ec_master.c.

◆ ec_FMMU

ec_eepromFMMUt ec_FMMU
static

buffer for EEPROM FMMU data

Definition at line 85 of file ec_master.c.

◆ ec_FMMU2

ec_eepromFMMUt ec_FMMU2
static

Definition at line 86 of file ec_master.c.

◆ ec_groups

ec_groupt ec_groups[EC_MAXGROUP]

slave group structure

Definition at line 56 of file ec_master.c.

◆ ec_groups2

ec_groupt ec_groups2[EC_MAXGROUP]

Definition at line 57 of file ec_master.c.

◆ ec_idxstack

Definition at line 68 of file ec_master.c.

◆ ec_idxstack2

ec_idxstackT ec_idxstack2
static

Definition at line 69 of file ec_master.c.

◆ ec_PDOassign

PDO assign struct to store data of one slave

Definition at line 75 of file ec_master.c.

◆ ec_PDOassign2

ec_PDOassignt ec_PDOassign2
static

Definition at line 76 of file ec_master.c.

◆ ec_PDOdesc

PDO description struct to store data of one slave

Definition at line 78 of file ec_master.c.

◆ ec_PDOdesc2

ec_PDOdesct ec_PDOdesc2
static

Definition at line 79 of file ec_master.c.

◆ ec_slave

Main slave data array. Each slave found on the network gets its own record. ec_slave[0] is reserved for the master. Structure gets filled in by the configuration function ec_config().

Definition at line 50 of file ec_master.c.

◆ ec_slave2

ec_slavet ec_slave2[EC_MAXSLAVE]

Definition at line 51 of file ec_master.c.

◆ ec_slavecount

int ec_slavecount

number of slaves found on the network

Definition at line 53 of file ec_master.c.

◆ ec_slavecount2

int ec_slavecount2

Definition at line 54 of file ec_master.c.

◆ ec_SM

ec_eepromSMt ec_SM
static

buffer for EEPROM SM data

Definition at line 82 of file ec_master.c.

◆ ec_SM2

ec_eepromSMt ec_SM2
static

Definition at line 83 of file ec_master.c.

◆ ec_SMcommtype

SyncManager Communication Type struct to store data of one slave

Definition at line 72 of file ec_master.c.

◆ ec_SMcommtype2

ec_SMcommtypet ec_SMcommtype2
static

Definition at line 73 of file ec_master.c.

◆ EcatError

boolean EcatError = FALSE
static

Global variable TRUE if error available in error stack

Definition at line 89 of file ec_master.c.

◆ EcatError2

boolean EcatError2 = FALSE
static

Definition at line 90 of file ec_master.c.

◆ ecx_port

Definition at line 95 of file ec_master.c.

◆ ecx_port2

ecx_portt ecx_port2
static

Definition at line 96 of file ec_master.c.

◆ esibuf

uint8 esibuf[EC_MAXEEPBUF]
static

cache for EEPROM read functions

Definition at line 60 of file ec_master.c.

◆ esibuf2

uint8 esibuf2[EC_MAXEEPBUF]
static

Definition at line 61 of file ec_master.c.

◆ esimap

uint32 esimap[EC_MAXEEPBITMAP]
static

bitmap for filled cache buffer bytes

Definition at line 63 of file ec_master.c.

◆ esimap2

uint32 esimap2[EC_MAXEEPBITMAP]
static

Definition at line 64 of file ec_master.c.

◆ IOmap

char IOmap[4096]

Definition at line 42 of file ec_master.c.

◆ IOmap2

char IOmap2[4096]

Definition at line 43 of file ec_master.c.



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49