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
Macros | Functions
ecmcMisc.h File Reference

Misc. commands. More...

Go to the source code of this file.

Macros

#define CHECK_COMMAND_LIST_RETURN_IF_ERROR(commandListIndex)
 
#define CHECK_EVENT_RETURN_IF_ERROR(indexEvent)
 
#define CHECK_STORAGE_RETURN_IF_ERROR(indexStorage)
 
#define CHECK_RECORDER_RETURN_IF_ERROR(indexRecorder)
 

Functions

int createEvent (int index)
 Create an event object.
 
int linkEcEntryToEvent (int indexEvent, int eventEntryIndex, int slaveBusPosition, char *entryIDString, int bitIndex)
 Links an EtherCAT entry to an event object.
.
 
int setEventType (int indexEvent, int type)
 Set event type.
.
 
int setEventSampleTime (int indexEvent, int sampleTime)
 Set event sampling time (cycle counts).
.
 
int setEventTriggerEdge (int indexEvent, int triggerEdge)
 Set event trigger edge.
.
 
int setEventEnable (int indexEvent, int enable)
 Enable event.
.
 
int getEventEnabled (int indexEvent, int *enabled)
 Get event enabled.
.
 
int setEventEnableArmSequence (int indexEvent, int enable)
 Enable arm sequence.
.
 
int setEventEnablePrintouts (int indexEvent, int enable)
 Enable diagnostic printouts from event object.
.
 
int triggerEvent (int indexEvent)
 Force trigger event.
.
 
int armEvent (int indexEvent)
 Arm event.
.
 
int createDataStorage (int index, int elements, int bufferType)
 Create a data storage object.
 
int clearStorage (int indexStorage)
 Clear data storage buffer.
 
int getStorageDataIndex (int indexStorage, int *index)
 Get current index of data in storage buffer.
.
 
int setStorageEnablePrintouts (int indexStorage, int enable)
 Enable diagnostic printouts from data storage object.
.
 
int printStorageBuffer (int indexStorage)
 Print contents of buffer.
.
 
int readStorageBuffer (int indexStorage, double **data, int *size)
 Reads contents of storage buffer.
.
 
int writeStorageBuffer (int indexStorage, double *data, int size)
 Writes data to storage buffer.
.
 
int appendStorageBuffer (int indexStorage, double *data, int size)
 Appends data to the end of storage buffer.
.
 
int setDataStorageCurrentDataIndex (int indexStorage, int position)
 Set current data index of storage buffer.
.
 
int createRecorder (int indexRecorder)
 Create recorder object.
 
int linkStorageToRecorder (int indexStorage, int indexRecorder)
 Link storage object to recorder object.
 
int linkEcEntryToRecorder (int indexRecorder, int recorderEntryIndex, int slaveBusPosition, char *entryIDString, int bitIndex)
 Links an EtherCAT entry to a recorder object.
.
 
int linkAxisDataToRecorder (int indexRecorder, int axisIndex, int dataToStore)
 Links an axis data source to a recorder object.
.
 
int setRecorderEnable (int indexRecorder, int enable)
 Enable recorder.
.
 
int getRecorderEnabled (int indexRecorder, int *enabled)
 Get recorder enabled.
.
 
int setRecorderEnablePrintouts (int indexRecorder, int enable)
 Enable diagnostic printouts from recorder object.
.
 
int linkRecorderToEvent (int indexRecorder, int indexEvent, int consumerIndex)
 Link recorder object to event object.
.
 
int triggerRecorder (int indexRecorder)
 Force trigger recorder.
.
 
int createCommandList (int indexCommandList)
 Create a command list object.
 
int linkCommandListToEvent (int indexCommandList, int indexEvent, int consumerIndex)
 Link command list object to event object.
.
 
int setCommandListEnable (int indexCommandList, int enable)
 Enable command list.
.
 
int setCommandListEnablePrintouts (int indexCommandList, int enable)
 Enable diagnostic printouts from command list object.
.
 
int addCommandListCommand (int indexCommandList, char *expr)
 Add command to command list.
.
 
int triggerCommandList (int indexCommandList)
 Force trigger command list.
.
 
int createShm ()
 Create SHM Object.
.
 

Detailed Description

Misc. commands.

Macro Definition Documentation

◆ CHECK_COMMAND_LIST_RETURN_IF_ERROR

#define CHECK_COMMAND_LIST_RETURN_IF_ERROR ( commandListIndex)
Value:
{\
if (indexCommandList >= ECMC_MAX_COMMANDS_LISTS ||\
indexCommandList < 0) {\
LOGERR("ERROR: Command list index out of range.\n");\
return ERROR_COMMAND_LIST_INDEX_OUT_OF_RANGE;\
}\
if (commandLists[indexCommandList] == NULL) {\
LOGERR("ERROR: Command list object NULL.\n");\
return ERROR_COMMAND_LIST_NULL;\
}\
}\

◆ CHECK_EVENT_RETURN_IF_ERROR

#define CHECK_EVENT_RETURN_IF_ERROR ( indexEvent)
Value:
{\
if (indexEvent >= ECMC_MAX_EVENT_OBJECTS || indexEvent < 0) {\
LOGERR("ERROR: Event index out of range.\n");\
return ERROR_MAIN_EVENT_INDEX_OUT_OF_RANGE;\
}\
if (events[indexEvent] == NULL) {\
LOGERR("ERROR: Event object NULL.\n");\
return ERROR_MAIN_EVENT_NULL;\
}\
}\

◆ CHECK_RECORDER_RETURN_IF_ERROR

#define CHECK_RECORDER_RETURN_IF_ERROR ( indexRecorder)
Value:
{\
if (indexRecorder >= ECMC_MAX_DATA_RECORDERS_OBJECTS ||\
indexRecorder < 0) {\
LOGERR("ERROR: Data recorder index out of range.\n");\
return ERROR_MAIN_DATA_RECORDER_INDEX_OUT_OF_RANGE;\
}\
if (dataRecorders[indexRecorder] == NULL) {\
LOGERR("ERROR: Data recorder object NULL.\n");\
return ERROR_MAIN_DATA_RECORDER_NULL;\
}\
}\

◆ CHECK_STORAGE_RETURN_IF_ERROR

#define CHECK_STORAGE_RETURN_IF_ERROR ( indexStorage)
Value:
{\
if (indexStorage >= ECMC_MAX_DATA_STORAGE_OBJECTS ||\
indexStorage < 0) {\
LOGERR("ERROR: Data storage index out of range.\n");\
return ERROR_MAIN_DATA_STORAGE_INDEX_OUT_OF_RANGE;\
}\
if (dataStorages[indexStorage] == NULL) {\
LOGERR("ERROR: Data storage object NULL.\n");\
return ERROR_MAIN_DATA_STORAGE_NULL;\
}\
}\

Function Documentation

◆ addCommandListCommand()

int addCommandListCommand ( int indexCommandList,
char * expr )

Add command to command list.
.

Parameters
[in]indexCommandListIndex of command list object to address.
[in]exprCommand string.
Returns
0 if success or otherwise an error code.
Note
Example: Add "Main.M1.bExecute=1" to command list 1.
"Cfg.AddCommandToCommandList(1)=Main.M1.bExecute=1" //Command string to ecmcCmdParser.c

◆ appendStorageBuffer()

int appendStorageBuffer ( int indexStorage,
double * data,
int size )

Appends data to the end of storage buffer.
.

Parameters
[in]indexStorageIndex of data storage object to address.
[in]dataPointer to data.
[in]sizeNumber of data elements to write.
Returns
0 if success or otherwise an error code.
Note
Example: Append data to data storage object 3 .
"AppendDataStorage(3)=0,0,0,0,0,0....." //Command string to ecmcCmdParser.c

◆ armEvent()

int armEvent ( int indexEvent)

Arm event.
.

Manually execute arm sequence, see command setEventEnableArmSequence().

Parameters
[in]indexEventIndex of event to address.
Returns
0 if success or otherwise an error code.
Note
Example: Run arm sequence for event 7.
"Cfg.ArmEvent(7)" //Command string to ecmcCmdParser.c

◆ clearStorage()

int clearStorage ( int indexStorage)

Clear data storage buffer.

Erases all data within a data storage object.

Parameters
[in]indexIndex of data storage object to clear.
Returns
0 if success or otherwise an error code.
Note
Example: Clear data storage object with index 4.
"Cfg.ClearStorage(4)" //Command string to ecmcCmdParser.c

◆ createCommandList()

int createCommandList ( int indexCommandList)

Create a command list object.

The command list object consists of a list of commands that can be executed. Currently any command can be added to the command list. The execution of the command list can be triggered by an event or by the command triggerCommandList().

Note
If the command list is triggered by a hardware event. The command list will be executed from the realtime thread. In this case special consideration needs to be taken so that the jitter of realtime thread is not worsen. Normal motion commands are normally no issue to use but commands that creates new axis or takes long time to return should be avoided.
Parameters
[in]indexIndex of command list object to create.
Returns
0 if success or otherwise an error code.
Note
Example: Create a command list object at index 1.
"Cfg.CreateCommandList(1)" //Command string to ecmcCmdParser.c

◆ createDataStorage()

int createDataStorage ( int index,
int elements,
int bufferType )

Create a data storage object.

The data storage object is a data buffer.

Currently only the recorder object utilizes the data storage object. However, it's foreseen that it will also be useful to store trajectory array data in
.

Todo
A method to copy the data to an EPICS waveform needs to be implemented.
Parameters
[in]indexIndex of data storage object to create.
[in]elementsSize of data buffer.
[in]bufferTypeData buffer type.
bufferType = 0: Normal buffer (fill from beginning stop when full).
bufferType = 1: Ring buffer (fill from beginning start over when full).
bufferType = 2: FIFO buffer (fill from end. old values shifted out).
Returns
0 if success or otherwise an error code.
Note
Example: Create a LIFO data storage object with 1000 elements at index 1.
"Cfg.CreateStorage(1,1000,0)" //Command string to ecmcCmdParser.c

◆ createEvent()

int createEvent ( int index)

Create an event object.

An event can be trigger actions based on hardware related events (changes of values on the EtherCAT bus (entries)).
The events needs to be configured with atleast a subset of the below commands:

  1. linkEcEntryToEvent()
  2. setEventType()
  3. setEventSampleTime()
  4. setEventTriggerEdge()
  5. setEventEnableArmSequence()

Currently two kinds of objects can be linked to an event:

  1. Data recorder object (records data at a triggered event), see command createRecorder().
  2. Command list object (executes a series of commands at a triggered event), see command createCommandList().
    Parameters
    [in]indexIndex of event to create.
    Returns
    0 if success or otherwise an error code.
    Note
    Example: Create a event object at index 1.
    "Cfg.CreateEvent(1)" //Command string to ecmcCmdParser.c

◆ createRecorder()

int createRecorder ( int indexRecorder)

Create recorder object.

The recorder object stores data, from an EtherCAT entry, in a data storage object. The recording of a data point can be triggered by an event or by the command triggerRecorder().
An EtherCAT data entry needs to be linked to the object with the command linkEcEntryToRecorder().
The data recorder object needs a data storage object to store data in. The data storage object needs to be linked to the recorder object with the command linkStorageToRecorder().

Parameters
[in]indexIndex of recorder object to create.
Returns
0 if success or otherwise an error code.
Note
Example: Create a recorder object at index 1.
"Cfg.CreateRecorder(1)" //Command string to ecmcCmdParser.c

◆ createShm()

int createShm ( )

Create SHM Object.
.

Creates a shared memory object for master 2 master communication

Returns
0 if success or otherwise an error code.

◆ getEventEnabled()

int getEventEnabled ( int indexEvent,
int * enabled )

Get event enabled.
.

Event evaluation and triggering is only active when the enable bit is high.

Parameters
[in]indexEventIndex of event to address.
[out]enabledEnabled.
Returns
0 if success or otherwise an error code.
Note
Example: Get Enabled for event 2 .
"GetEventEnabled(2)" //Command string to ecmcCmdParser.c

◆ getRecorderEnabled()

int getRecorderEnabled ( int indexRecorder,
int * enabled )

Get recorder enabled.
.

Recording of data is only active when the enable bit is high.

Parameters
[in]indexRecorderIndex of recorder to address.
[out]enabledEnabled.
Returns
0 if success or otherwise an error code.
Note
Example: Get recorder object 4 enabled.
"GetRecorderEnabled(4)" //Command string to ecmcCmdParser.c

◆ getStorageDataIndex()

int getStorageDataIndex ( int indexStorage,
int * index )

Get current index of data in storage buffer.
.

Parameters
[in]indexIndex of data storage object to clear.
[out]indexCurrent data element index.
Returns
0 if success or otherwise an error code.
Note
Example: Get current data element index for data storage object with index 4.
"GetStorageDataIndex(4)" //Command string to ecmcCmdParser.c

◆ linkAxisDataToRecorder()

int linkAxisDataToRecorder ( int indexRecorder,
int axisIndex,
int dataToStore )

Links an axis data source to a recorder object.
.

Parameters
[in]indexRecorderIndex of recorder object to link to.
[in]axisIndexIndex of axis to get data from.
[in]dataToStoredata to record from axis object.
dataToStore = 0 : No data choosen.
dataToStore = 1 : Position Setpoint (from trajectory generator).
dataToStore = 2 : Position Actual (scaled).
dataToStore = 3 : Position Error.
dataToStore = 4 : Position Target.
dataToStore = 5 : Controller Error.
dataToStore = 6 : Controller Output.
dataToStore = 7 : Velocity Setpoint.
dataToStore = 8 : Velocity Actual.
dataToStore = 9 : Velocity Setpoint Raw.
dataToStore = 10: Velocity Setpoint Feed Forward Raw.
dataToStore = 11: Error Code.
dataToStore = 12: Enable (command).
dataToStore = 13: Enabled (status).
dataToStore = 14: Execute (command).
dataToStore = 15: Busy (status).
dataToStore = 16: Sequence state.
dataToStore = 17: At Target (status).
dataToStore = 18: Interlock type.
dataToStore = 19: Limit Switch forward.
dataToStore = 20: Limit Switch backward.
dataToStore = 21: Home switch.
dataToStore = 22: Command.
dataToStore = 23: Command Data (cmdData).
dataToStore = 24: Trajectory setpoint source.
0 = Internal Source.
>0 = External Source.
dataToStore = 25: Encoder setpoint source.
0 = Internal Source.
>0 = External Source.
dataToStore = 26: Axis Id.
dataToStore = 27: Cycle counter.
dataToStore = 28: Position Raw.
dataToStore = 29: Encoder homed.
Returns
0 if success or otherwise an error code.
Note
Example 1: Link Actual position of axis 4 to recorder 1:.
in slave 1 as data for recorder object 7.
"Cfg.LinkAxisDataToRecorder(1,4,2)" //Command string to ecmcCmdParser.c

◆ linkCommandListToEvent()

int linkCommandListToEvent ( int indexCommandList,
int indexEvent,
int consumerIndex )

Link command list object to event object.
.

Parameters
[in]indexCommandListIndex of command list object to address.
[in]indexEventIndex of event object to address.
[in]consumerIndexEvent consumer index (one event can have a list with consumers).
Returns
0 if success or otherwise an error code.
Note
Example: Link coommand list object 3 with event object 4, event consumer index 0.
"Cfg.LinkCommandListToEvent(3,4,0)" //Command string to ecmcCmdParser.c

◆ linkEcEntryToEvent()

int linkEcEntryToEvent ( int indexEvent,
int eventEntryIndex,
int slaveBusPosition,
char * entryIDString,
int bitIndex )

Links an EtherCAT entry to an event object.
.

Parameters
[in]eventIndexIndex of event object to link to.
[in]eventEntryIndexIndex of event objects entry list.
eventEntryIndex = 0: Event trigger data input.
eventEntryIndex = 1: Arm output (to re-arm latching hardware).
[in]slaveBusPositionPosition of the EtherCAT slave on the bus.
slaveBusPosition = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1.
slaveBusPosition = 0..65535: Addressing of normal EtherCAT slaves.
[in]entryIdStringString for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information").
[in]entryBitIndexBit index of EtherCAT entry to use.
entryBitIndex = -1: All bits of the entry will be used.
entryBitIndex = 0..64: Only the selected bit will be used.
Returns
0 if success or otherwise an error code.
Note
Example 1: Link bit 0 of an EtherCAT entry configured as "INPUT_0" in slave 1 as "event trigger data" for event object 7.
"Cfg.LinkEcEntryToEvent(7,0,1,"INPUT_0",0)" //Command string to ecmcCmdParser.c
Todo
This function have not consistent parameter order with the other link functions as "linkEcEntryToAxisMon".

◆ linkEcEntryToRecorder()

int linkEcEntryToRecorder ( int indexRecorder,
int recorderEntryIndex,
int slaveBusPosition,
char * entryIDString,
int bitIndex )

Links an EtherCAT entry to a recorder object.
.

Parameters
[in]indexRecorderIndex of recorder object to link to.
[in]recorderEntryIndexIndex of recorder objects entry list.
recorderEntryIndex = 0: data input.
[in]slaveBusPositionPosition of the EtherCAT slave on the bus.
slaveBusPosition = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1.
slaveBusPosition = 0..65535: Addressing of normal EtherCAT slaves.
[in]entryIdStringString for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information").
[in]entryBitIndexBit index of EtherCAT entry to use.
entryBitIndex = -1: All bits of the entry will be used.
entryBitIndex = 0..64: Only the selected bit will be used.
Returns
0 if success or otherwise an error code.
Note
Example 1: Link bit 0 of an EtherCAT entry configured as "INPUT_0" in slave 1 as data for recorder object 7.
"Cfg.LinkEcEntryToRecorder(7,0,1,"INPUT_0",0)" //Command string to ecmcCmdParser.c
Todo
This function have not consistent parameter order with the other link functions as "linkEcEntryToAxisMon".

◆ linkRecorderToEvent()

int linkRecorderToEvent ( int indexRecorder,
int indexEvent,
int consumerIndex )

Link recorder object to event object.
.

Parameters
[in]indexRecorderIndex of recorder object to address.
[in]indexEventIndex of event object to address.
[in]consumerIndexEvent consumer index (one event can have a list with consumers).
Returns
0 if success or otherwise an error code.
Note
Example: Link recorder object 3 with event object 4, event consumer index 0.
"Cfg.LinkRecorderToEvent(3,4,0)" //Command string to ecmcCmdParser.c

◆ linkStorageToRecorder()

int linkStorageToRecorder ( int indexStorage,
int indexRecorder )

Link storage object to recorder object.

Parameters
[in]indexStorageIndex of storage object.
[in]indexRecorderIndex of recorder object.
Returns
0 if success or otherwise an error code.
Note
Example: Link storage object 5 to recorder object 3.
"Cfg.LinkStorageToRecorder(5,3)" //Command string to ecmcCmdParser.c

◆ printStorageBuffer()

int printStorageBuffer ( int indexStorage)

Print contents of buffer.
.

Parameters
[in]indexStroageIndex of data storage object to address.
Returns
0 if success or otherwise an error code.
Note
Example: Print contents of data storage object 3 .
"Cfg.PrintDataStorage(3)" //Command string to ecmcCmdParser.c

◆ readStorageBuffer()

int readStorageBuffer ( int indexStorage,
double ** data,
int * size )

Reads contents of storage buffer.
.

Parameters
[in]indexStorageIndex of data storage object to address.
[out]dataPointer to data.
[out]sizeNumber of data elements.
Returns
0 if success or otherwise an error code.
Note
Example: Read contents of data storage object 3 .
"ReadDataStorage(3)" //Command string to ecmcCmdParser.c

◆ setCommandListEnable()

int setCommandListEnable ( int indexCommandList,
int enable )

Enable command list.
.

Command list will only be executed when the enable bit is high.

Parameters
[in]indexCommandListIndex of command list to address.
[in]enableEnable.
Returns
0 if success or otherwise an error code.
Note
Example: "Enable" command list execution for object 4.
"Cfg.SetCommandListEnable(4,1)" //Command string to ecmcCmdParser.c

◆ setCommandListEnablePrintouts()

int setCommandListEnablePrintouts ( int indexCommandList,
int enable )

Enable diagnostic printouts from command list object.
.

Parameters
[in]indexCommandListIndex of command list object to address.
[in]enableEnable diagnostic printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable diagnostic printouts for command list object 3 .
"Cfg.SetCommandListEnablePrintouts(3,1)" //Command string to ecmcCmdParser.c

◆ setDataStorageCurrentDataIndex()

int setDataStorageCurrentDataIndex ( int indexStorage,
int position )

Set current data index of storage buffer.
.

This function can be used to set teh current index of a data storage buffer. A subsequent append of data will start at this position index in the buffer array.

Parameters
[in]indexStorageIndex of data storage object to address.
[in]positionPosition index of data.
Returns
0 if success or otherwise an error code.
Note
Example: Set current index of data storage 0 to 10.
"Cfg.SetDataStorageCurrentDataIndex(0,10)" //Command string to ecmcCmdParser.c

◆ setEventEnable()

int setEventEnable ( int indexEvent,
int enable )

Enable event.
.

Event evaluation and triggering is only active when the enable bit is high.

Parameters
[in]indexEventIndex of event to address.
[in]enableEnable.
Returns
0 if success or otherwise an error code.
Note
Example: Start evaluation of events for event object 4 .
"Cfg.SetEventEnable(4,1)" //Command string to ecmcCmdParser.c

◆ setEventEnableArmSequence()

int setEventEnableArmSequence ( int indexEvent,
int enable )

Enable arm sequence.
.

Some hardware require that the input card is re-armed after each value have been collected (typically latched I/O). The arm sequence will, if enabled, write a 0 followed by a 1 the following cycle to the arm output entry, see command linkEcEntryToEvent().

Parameters
[in]indexEventIndex of event to address.
[in]enableEnable arm sequence.
Returns
0 if success or otherwise an error code.
Note
Example: Enable arm sequence for event 3 .
"Cfg.SetEventEnableArmSequence(3,1)" //Command string to ecmcCmdParser.c

◆ setEventEnablePrintouts()

int setEventEnablePrintouts ( int indexEvent,
int enable )

Enable diagnostic printouts from event object.
.

Parameters
[in]indexEventIndex of event to address.
[in]enableEnable diagnostic printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable diagnostic printouts for event 3 .
"Cfg.SetEventEnablePrintouts(3,1)" //Command string to ecmcCmdParser.c

◆ setEventSampleTime()

int setEventSampleTime ( int indexEvent,
int sampleTime )

Set event sampling time (cycle counts).
.

Sets the sample rate at which events will be triggered.

Note: This parameter is only valid for sample rate triggered event type (type = 0), see setEventType().

Parameters
[in]indexEventIndex of event to address.
[in]typeType of event.
type = 0: Sample rate triggered (see setEventSampleTime()).
type = 1: Trigger on data source edge (see setEventTriggerEdge()).
Returns
0 if success or otherwise an error code.
Note
Example: Set event sample time (cycle counts) to 10 for event 5.
"Cfg.SetEventSampleTime(5,10)" //Command string to ecmcCmdParser.c

◆ setEventTriggerEdge()

int setEventTriggerEdge ( int indexEvent,
int triggerEdge )

Set event trigger edge.
.

Parameters
[in]indexEventIndex of event to address.
[in]triggerEdgeType of event.
triggerEdge = 0: Trigger event on positive edge.
triggerEdge = 1: Trigger event on negative edge.
triggerEdge = 2: Trigger event on on change.
Returns
0 if success or otherwise an error code.
Note
Example: Set event trigger edge to positive.
"Cfg.SetEventTriggerEdge(1,0)" //Command string to ecmcCmdParser.c

◆ setEventType()

int setEventType ( int indexEvent,
int type )

Set event type.
.

Parameters
[in]indexEventIndex of event to address.
[in]typeType of event.
type = 0: Sample rate triggered (see setEventSampleTime()).
type = 1: Trigger on data source edge (see setEventTriggerEdge()).
Returns
0 if success or otherwise an error code.
Note
Example: Set event type to edge triggered for event 5.
"Cfg.SetEventType(5,1)" //Command string to ecmcCmdParser.c

◆ setRecorderEnable()

int setRecorderEnable ( int indexRecorder,
int enable )

Enable recorder.
.

Recording of data is only active when the enable bit is high.

Parameters
[in]indexRecorderIndex of recorder to address.
[in]enableEnable.
Returns
0 if success or otherwise an error code.
Note
Example: Start data recording of recorder object 4.
"Cfg.SetRecorderEnable(4,1)" //Command string to ecmcCmdParser.c

◆ setRecorderEnablePrintouts()

int setRecorderEnablePrintouts ( int indexRecorder,
int enable )

Enable diagnostic printouts from recorder object.
.

Parameters
[in]indexRecorderIndex of recorder object to address.
[in]enableEnable diagnostic printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable diagnostic printouts for recorder object 3 .
"Cfg.SetRecorderEnablePrintouts(3,1)" //Command string to ecmcCmdParser.c

◆ setStorageEnablePrintouts()

int setStorageEnablePrintouts ( int indexStorage,
int enable )

Enable diagnostic printouts from data storage object.
.

Parameters
[in]indexStroageIndex of data storage object to address.
[in]enableEnable diagnostic printouts.
Returns
0 if success or otherwise an error code.
Note
Example: Enable diagnostic printouts for data storage object 3 .
"Cfg.SetStorageEnablePrintouts(3,1)" //Command string to ecmcCmdParser.c

◆ triggerCommandList()

int triggerCommandList ( int indexCommandList)

Force trigger command list.
.

All commands in the command list object will be executed.

Parameters
[in]indexCommandListIndex of command list to address.
Returns
0 if success or otherwise an error code.
Note
Example: Force trigger command list 1.
"Cfg.TriggerCommandList(1)" //Command string to ecmcCmdParser.c

◆ triggerEvent()

int triggerEvent ( int indexEvent)

Force trigger event.
.

Any subscriber functions to an event will be executed.

Parameters
[in]indexEventIndex of event to address.
Returns
0 if success or otherwise an error code.
Note
Example: Force trigger event 1.
"Cfg.TriggerEvent(1)" //Command string to ecmcCmdParser.c

◆ triggerRecorder()

int triggerRecorder ( int indexRecorder)

Force trigger recorder.
.

The recorder object will store data in the linked data storage object.

Parameters
[in]indexRecorderIndex of recorder to address.
Returns
0 if success or otherwise an error code.
Note
Example: Force trigger recorder 1.
"Cfg.TriggerRecorder(1)" //Command string to ecmcCmdParser.c

◆ writeStorageBuffer()

int writeStorageBuffer ( int indexStorage,
double * data,
int size )

Writes data to storage buffer.
.

Parameters
[in]indexStorageIndex of data storage object to address.
[in]dataPointer to data.
[in]sizeNumber of data elements to write.
Returns
0 if success or otherwise an error code.
Note
Example: Write contents of data storage object 3 .
"WriteDataStorage(3)=0,0,0,0,0,0...." //Command string to ecmcCmdParser.c