iLLD_TC27xD
1.0
|
Standard interface: Position interface. More...
Go to the source code of this file.
Data Structures | |
union | IfxStdIf_Pos_Status |
Position sensor status definition. More... | |
struct | IfxStdIf_Pos_ |
Standard interface object. More... | |
struct | IfxStdIf_Pos_Config |
Position interface configuration. More... | |
struct | IfxStdIf_Pos_Status.B |
Enumerations | |
enum | IfxStdIf_Pos_MotionType { IfxStdIf_Pos_MotionType_rotating, IfxStdIf_Pos_MotionType_linear } |
Output event enable / disable. More... | |
enum | IfxStdIf_Pos_ResolutionFactor { IfxStdIf_Pos_ResolutionFactor_oneFold = 1, IfxStdIf_Pos_ResolutionFactor_twoFold = 2, IfxStdIf_Pos_ResolutionFactor_fourFold = 4 } |
Output event enable / disable. More... | |
enum | IfxStdIf_Pos_SensorType { IfxStdIf_Pos_SensorType_encoder, IfxStdIf_Pos_SensorType_hall, IfxStdIf_Pos_SensorType_resolver, IfxStdIf_Pos_SensorType_angletrk, IfxStdIf_Pos_SensorType_igmr, IfxStdIf_Pos_SensorType_virtual } |
Position sensor Types. More... | |
enum | IfxStdIf_Pos_Dir { IfxStdIf_Pos_Dir_forward, IfxStdIf_Pos_Dir_backward, IfxStdIf_Pos_Dir_unknown } |
Position sensor direction definition. More... | |
Standard interface: Position interface.
IMPORTANT NOTICE
Infineon Technologies AG (Infineon) is supplying this file for use exclusively with Infineon's microcontroller products. This file can be freely distributed within development tools that are supporting such microcontroller products.
THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Definition in file IfxStdIf_Pos.h.
union IfxStdIf_Pos_Status |
Position sensor status definition.
Definition at line 82 of file IfxStdIf_Pos.h.
Data Fields | ||
---|---|---|
struct IfxStdIf_Pos_Status | B | Bitfielf status access. |
uint32 | status | Global status access. |
struct IfxStdIf_Pos_ |
Standard interface object.
Definition at line 258 of file IfxStdIf_Pos.h.
struct IfxStdIf_Pos_Config |
Position interface configuration.
Definition at line 285 of file IfxStdIf_Pos.h.
Data Fields | ||
---|---|---|
float32 | maxSpeed | Absolute maximal allowed speed. Above speed is recognized as error. |
float32 | minSpeed | Absolute minimal allowed speed. below speed is recognized as 0rad/s. |
sint32 | offset | Position sensor offset. |
uint16 | periodPerRotation | Number of period per rotation. Is usually 1 for encoder. |
sint32 | resolution | Sensor resolution. For encoder with 1024 pulse per revolution, the value should be 1024. |
IfxStdIf_Pos_ResolutionFactor | resolutionFactor | Resolution multiplier for encoder interface, valid is 2, 4. |
boolean | reversed | If true, the sensor direction is reversed. |
float32 | speedFilerCutOffFrequency | Speed low pass filter cut off frequency. |
boolean | speedFilterEnabled | Enable / disable the speed low pass filter. |
float32 | speedModeThreshold | Speed threshold used for the speed calculation mode. For encoder, above the threshold the pulse count mode is used, below the threshold, the time delta is used. |
float32 | updatePeriod | period in seconds, at which the application calls IfxStdIf_Pos_update() |
struct IfxStdIf_Pos_Status.B |
typedef struct IfxStdIf_Pos_ IfxStdIf_Pos |
Forward declaration.
Definition at line 98 of file IfxStdIf_Pos.h.
typedef float32(* IfxStdIf_Pos_GetAbsolutePosition)(IfxStdIf_InterfaceDriver driver) |
Return the position, inclusive turns.
Return the sensor position in rad for rotating sensor inclusive turns, or in m for linear sensors. For linear sensor the effect is the same as IfxStdIf_Pos_GetPosition.
driver | Pointer to the interface driver object |
Definition at line 108 of file IfxStdIf_Pos.h.
typedef IfxStdIf_Pos_Dir(* IfxStdIf_Pos_GetDirection)(IfxStdIf_InterfaceDriver driver) |
Return the direction.
Return the sensor direction.
driver | Pointer to the interface driver object |
Definition at line 140 of file IfxStdIf_Pos.h.
typedef IfxStdIf_Pos_Status(* IfxStdIf_Pos_GetFault)(IfxStdIf_InterfaceDriver driver) |
Return the sensor status.
driver | Pointer to the interface driver object |
Definition at line 147 of file IfxStdIf_Pos.h.
typedef sint32(* IfxStdIf_Pos_GetOffset)(IfxStdIf_InterfaceDriver driver) |
Return the raw position sensor offset.
driver | Pointer to the interface driver object |
Definition at line 121 of file IfxStdIf_Pos.h.
typedef uint16(* IfxStdIf_Pos_GetPeriodPerRotation)(IfxStdIf_InterfaceDriver driver) |
Return the period per rotation setting.
driver | Pointer to the interface driver object |
Definition at line 154 of file IfxStdIf_Pos.h.
typedef float32(* IfxStdIf_Pos_GetPosition)(IfxStdIf_InterfaceDriver driver) |
Return the position.
Return the sensor position in rad for rotating sensor or in m for linear sensors. For rotating sensor, the position is always between 0 and 2*IFX_PI.
driver | Pointer to the interface driver object |
Definition at line 131 of file IfxStdIf_Pos.h.
typedef sint32(* IfxStdIf_Pos_GetRawPosition)(IfxStdIf_InterfaceDriver driver) |
Return the raw position in ticks.
Return the sensor raw position in ticks.
driver | Pointer to the interface driver object |
Definition at line 163 of file IfxStdIf_Pos.h.
typedef float32(* IfxStdIf_Pos_GetRefreshPeriod)(IfxStdIf_InterfaceDriver driver) |
Get the update period.
driver | Pointer to the interface driver object |
Definition at line 169 of file IfxStdIf_Pos.h.
typedef sint32(* IfxStdIf_Pos_GetResolution)(IfxStdIf_InterfaceDriver driver) |
Get the resolution.
driver | Pointer to the interface driver object |
Definition at line 175 of file IfxStdIf_Pos.h.
typedef IfxStdIf_Pos_SensorType(* IfxStdIf_Pos_GetSensorType)(IfxStdIf_InterfaceDriver driver) |
Get the sensor type.
driver | Pointer to the interface driver object |
Definition at line 181 of file IfxStdIf_Pos.h.
typedef float32(* IfxStdIf_Pos_GetSpeed)(IfxStdIf_InterfaceDriver driver) |
Return the speed.
driver | Pointer to the interface driver object |
Definition at line 187 of file IfxStdIf_Pos.h.
typedef sint32(* IfxStdIf_Pos_GetTurn)(IfxStdIf_InterfaceDriver driver) |
Return position in turn.
driver | Pointer to the interface driver object |
Definition at line 193 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_OnZeroIrq)(IfxStdIf_InterfaceDriver driver) |
Handles the zero interrupt.
driver | Pointer to the interface driver object |
Definition at line 114 of file IfxStdIf_Pos.h.
typedef sint32 IfxStdIf_Pos_RawAngle |
Definition at line 95 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_Reset)(IfxStdIf_InterfaceDriver driver) |
Reset the driver.
Clear faults, reset speed and position to 0
driver | Pointer to the interface driver object |
Definition at line 211 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_ResetFaults)(IfxStdIf_InterfaceDriver driver) |
Reset the driver fault.
Clear faults
driver | Pointer to the interface driver object |
Definition at line 220 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_SetOffset)(IfxStdIf_InterfaceDriver driver, sint32 offset) |
Set the sensor offset.
driver | Pointer to the interface driver object |
offset | Offset in sensor ticks |
Definition at line 227 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_SetPosition)(IfxStdIf_InterfaceDriver driver, float32 position) |
Set the sensor position (virtual sensor)
driver | Pointer to the interface driver object |
position | Position sensor rad |
Definition at line 234 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_SetRawPosition)(IfxStdIf_InterfaceDriver driver, sint32 position) |
Set the sensor position (virtual sensor)
driver | Pointer to the interface driver object |
position | Position sensor ticks |
Definition at line 240 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_SetRefreshPeriod)(IfxStdIf_InterfaceDriver driver, float32 updatePeriod) |
Set the update period.
driver | Pointer to the interface driver object |
updatePeriod | Refresh period in s |
Definition at line 254 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_SetSpeed)(IfxStdIf_InterfaceDriver driver, float32 speed) |
Set the sensor speed (virtual sensor)
driver | Pointer to the interface driver object |
speed | speed in rad/s |
Definition at line 247 of file IfxStdIf_Pos.h.
typedef void(* IfxStdIf_Pos_Update)(IfxStdIf_InterfaceDriver driver) |
Refresh the status.
Update the driver state like speed, position, status, taking into account the updatePeriod
driver | Pointer to the interface driver object |
Definition at line 202 of file IfxStdIf_Pos.h.
enum IfxStdIf_Pos_Dir |
Position sensor direction definition.
Definition at line 74 of file IfxStdIf_Pos.h.
Output event enable / disable.
Enumerator | |
---|---|
IfxStdIf_Pos_MotionType_rotating |
Rotating sensor. |
IfxStdIf_Pos_MotionType_linear |
Linear sensor. |
Definition at line 48 of file IfxStdIf_Pos.h.
Output event enable / disable.
Definition at line 55 of file IfxStdIf_Pos.h.
Position sensor Types.
Enumerator | |
---|---|
IfxStdIf_Pos_SensorType_encoder | |
IfxStdIf_Pos_SensorType_hall | |
IfxStdIf_Pos_SensorType_resolver | |
IfxStdIf_Pos_SensorType_angletrk | |
IfxStdIf_Pos_SensorType_igmr | |
IfxStdIf_Pos_SensorType_virtual |
Definition at line 63 of file IfxStdIf_Pos.h.
IFX_EXTERN void IfxStdIf_Pos_initConfig | ( | IfxStdIf_Pos_Config * | config) |
Initialize the configuration structure to default
config | Position interface configuration. This parameter is initialized by the function |
Definition at line 28 of file IfxStdIf_Pos.c.
Referenced by IfxGpt12_IncrEnc_initConfig().
IFX_INLINE float32 IfxStdIf_Pos_radsToRpm | ( | float32 | speed) |
Converts from rad/s to rpm.
speed | Specifies the speed in rad/s. |
Definition at line 466 of file IfxStdIf_Pos.h.
IFX_INLINE float32 IfxStdIf_Pos_rpmToRads | ( | float32 | speed) |
Converts from rpm to rad/s.
speed | Specifies the speed in rpm. |
Definition at line 479 of file IfxStdIf_Pos.h.