DCL Transient Capture Module (TCM) Functions
Module: Digital Control Library (DCL)
Types
Name |
|
|---|---|
enum |
DCL_tcm_states { TCM_INVALID = 0, TCM_IDLE = 1, TCM_ARMED = 2, TCM_CAPTURE = 3, TCM_COMPLETE = 4} |
typedef _DCL_VOLATILE struct |
DCL_TCM |
Functions
Name |
|
|---|---|
_DCL_CODE_ACCESS void |
DCL_initTCM(DCL_TCM * q, float32_t * addr, uint32_t size, uint32_t lead, float32_t tmin, float32_t tmax) |
_DCL_CODE_ACCESS void |
DCL_resetTCM(DCL_TCM * q) |
_DCL_CODE_ACCESS uint16_t |
DCL_armTCM(DCL_TCM * q) |
_DCL_CODE_ACCESS uint16_t |
DCL_runTCM(DCL_TCM * q, float32_t data) |
DCL_runITAE(DCL_FDLOG * elog, float32_t prd) |
|
DCL_runIAE(DCL_FDLOG * elog) |
|
DCL_runIES(DCL_FDLOG * elog) |
Defines
Name |
|
|---|---|
TCM_DEFAULTS |
Detailed Description
Defines the interface to the Transient Capture Module (TCM)
Types Documentation
enum DCL_tcm_states
Enumerator |
Value |
Description |
|---|---|---|
TCM_INVALID |
0 |
Buffer pointers not initialized. |
TCM_IDLE |
1 |
Memory initialized but module not armed. |
TCM_ARMED |
2 |
Armed: capturing monitor frame data and waiting for trigger. |
TCM_CAPTURE |
3 |
Triggered: logging data into capture frame and un-winding monitor frame. |
TCM_COMPLETE |
4 |
Full data frame captured and available for read-out. |
Enumerated TCM operating modes.
typedef DCL_TCM
typedef _DCL_VOLATILE struct DCL_TCM;
Defines the TCM structure.
Functions Documentation
function DCL_initTCM
_DCL_CODE_ACCESS void DCL_initTCM(
DCL_TCM * q,
float32_t * addr,
uint32_t size,
uint32_t lead,
float32_t tmin,
float32_t tmax
)
Resets the TCM module: clears buffers and sets idle mode.
Parameters:
q The TCM structure
addr The start address of the memory block
size The size of the memory block in 32-bit words
lead The length of the lead frame in samples
tmin The upper trigger threshold
tmax The lower trigger threshold
function DCL_resetTCM
_DCL_CODE_ACCESS void DCL_resetTCM(
DCL_TCM * q
)
Resets the TCM module: clears all frame buffers and sets idle mode.
Parameters:
q The TCM structure
function DCL_armTCM
_DCL_CODE_ACCESS uint16_t DCL_armTCM(
DCL_TCM * q
)
Changes the TCM mode to “TCM_ARMED”.
Parameters:
q The TCM structure
Return: The operating mode
Note: Only valid if current operating mode is “TCM_IDLE”
function DCL_runTCM
_DCL_CODE_ACCESS uint16_t DCL_runTCM(
DCL_TCM * q,
float32_t data
)
Runs the TCM module.
Parameters:
q The TCM structure
data The input data
Return: The operating mode
function DCL_runITAE
_DCL_CODE_ACCESSfloat32_t DCL_runITAE(
DCL_FDLOG * elog,
float32_t prd
)
Computes ITAE performance index from a log of servo error.
Parameters:
elog The servo error log
prd The sampling period in seconds
Return: The ITAE index
function DCL_runIAE
_DCL_CODE_ACCESSfloat32_t DCL_runIAE(
DCL_FDLOG * elog
)
Computes IAE performance index from a log of servo error.
Parameters:
elog The servo error log
Return: The IAE index
function DCL_runIES
_DCL_CODE_ACCESSfloat32_t DCL_runIES(
DCL_FDLOG * elog
)
Computes IES performance index from a log of servo error.
Parameters:
elog The servo error log
Return: The IES index
Macros Documentation
define TCM_DEFAULTS
#define TCM_DEFAULTS {FDLOG_DEFAULTS, FDLOG_DEFAULTS, FDLOG_DEFAULTS, 0.1f, -0.1f, 0, 10}
Defines default values to initialize the TCM structure.