ECMC: EtherCAT open source motion control.
Motion control based on the open source EtherCAT master (www.etherlab.org). The motion package is integerated into the ESS EPCIS environment (E3).
Loading...
Searching...
No Matches
Functions
ecmcGeneral.h File Reference

General commands. More...

Go to the source code of this file.

Functions

int getControllerError ()
 Returns the controller error code.
.
 
int controllerErrorReset ()
 Resets the controller error code.
.
 
const char * getErrorString (int errorNumber)
 Get axis error code in string format.
.
 
int validateConfig ()
 Validates the current configuration)".
 
int linkEcEntryToObject (char *ecPath, char *objPath)
 Links an EtherCAT entry to an object.
 
int setEnableTimeDiag (int value)
 Enable printouts of timing information related to the realtime thread.
.
 
int setEnableFunctionCallDiag (int value)
 Enable printouts of which functions in hw_motor.cpp are being called.
.
 

Detailed Description

General commands.

Function Documentation

◆ controllerErrorReset()

int controllerErrorReset ( )

Resets the controller error code.
.

Returns
0
Note
Example: Reset controller error.
"ControllerErrorReset()" //Command string to ecmcCmdParser.c

◆ getControllerError()

int getControllerError ( )

Returns the controller error code.
.

Returns
current error code of controller.
Note
Example: Get current controller error code.
"GetControllerError()" //Command string to ecmcCmdParser.c

◆ getErrorString()

const char * getErrorString ( int errorNumber)

Get axis error code in string format.
.

Parameters
[in]errorNumberError code.
Returns
axis error string.
Note
Example: Get error code of axis 3.
"Main.M3.sErrorMessage?" //Command string to ecmcCmdParser.c.
Todo
"TwinCAT syntax. Needs to be changed.

◆ linkEcEntryToObject()

int linkEcEntryToObject ( char * ecPath,
char * objPath )

Links an EtherCAT entry to an object.

Parameters
[in]ecPathEtherCAT entry path in the following format:
ec<masterId>.s<slaveId>.<alias>.<bitId> ec<masterId>.s<slaveId>.<alias>
[in]axPathAxis parameter path in the following format:
ax<id>.enc.actpos
ax<id>.drv.enable
ax<id>.drv.velocity
ax<id>.drv.enabled
ax<id>.drv.break
ax<id>.drv.reducetorque
ax<id>.mon.lowlim
ax<id>.mon.highlim
ax<id>.mon.homesensor
ax<id>.mon.extinterlock
ax<id>.health
ec<masterId>.health
Returns
0 if success or otherwise an error code.
Note
Example: Link an EtherCAT entry configured as "POSITION_ACT" in slave 1 as actual position for the encoder of axis 5.
"Cfg.LinkEcEntryToObject(ec0.s1.POSITION_ACT,ax5.enc.actpos)" //Command string to ecmcCmdParser.c

◆ setEnableFunctionCallDiag()

int setEnableFunctionCallDiag ( int value)

Enable printouts of which functions in hw_motor.cpp are being called.
.

Parameters
[in]enableEnable printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable function call diagnostics.
"Cfg.SetEnableFuncCallDiag(1)" //Command string to ecmcCmdParser.c

◆ setEnableTimeDiag()

int setEnableTimeDiag ( int value)

Enable printouts of timing information related to the realtime thread.
.

Parameters
[in]enableEnable printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable printout time diagnostics.
"Cfg.SetEnableTimeDiag(1)" //Command string to ecmcCmdParser.c

◆ validateConfig()

int validateConfig ( )

Validates the current configuration)".

Returns
0 if the current configuration is valid for runtime otherwise an error code.
Note
Example: Validate configuration.
"Cfg.ValidateConfig()" //Command string to ecmcCmdParser.c