stepRocker Open Source TMCL  1.00
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
Functions
SysControl.h File Reference

Motor monitoring. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void SetStepDirMode (UCHAR Axis, UCHAR Mode)
 Switch to step/direction mode. More...
 
UCHAR GetClosedLoopInitFlag (UCHAR Axis)
 Check status of closed-loop initialization. More...
 
void StartTorqueMode (UCHAR Axis, int Torque)
 Run motor in torque mode. More...
 
void StopTorqueMode (UCHAR Axis)
 Turn off torque mode. More...
 
int GetTorqueModeCurrent (UCHAR Axis)
 Read actual torque mode current setting. More...
 
void SystemControl (void)
 Motor monitoring. More...
 

Detailed Description

Motor monitoring.

Author
Trinamic Motion Control GmbH & Co KG
Version
2.20

This file contains the definitions of the functions from the SysControl.c module.

Function Documentation

UCHAR GetClosedLoopInitFlag ( UCHAR  Axis)

Check status of closed-loop initialization.

Parameters
AxisAxis number (always 0 with the stepRocker)
Returns
TRUE: closed loop is initalized
FALSE: closed loop not initialized

Check if the closed loop function has been initialized.

Here is the caller graph for this function:

int GetTorqueModeCurrent ( UCHAR  Axis)

Read actual torque mode current setting.

Parameters
AxisAxis number (always 0 with the stepRocker)
Returns
-255..+255 when in torque mode
0 when not in torque mode

Read back the actual torque mode current setting.

Here is the caller graph for this function:

void SetStepDirMode ( UCHAR  Axis,
UCHAR  Mode 
)

Switch to step/direction mode.

Parameters
AxisAxis number (always 0 with the stepRocker)
ModeDesired mode

Switch to step/direction mode or back to normal ramp generator mode.
Possible Modes:
0: Ramp generator mode
1: step/direction mode, step pulse are high
2: step/direction mode, step pulse are low
3: step/direction mode, both edges of each step pulse (double speed)
Bit 2: direction signal polarity
Bit 3: indirect mode (ramp generator controlled by step pulses)

Here is the call graph for this function:

Here is the caller graph for this function:

void StartTorqueMode ( UCHAR  Axis,
int  Torque 
)

Run motor in torque mode.

Parameters
AxisAxis number (always 0 with stepRocker)
TorqueTorque mode direction and current (-255..+255)

Switch on torque mode and set the torque mode current to be used. This only works in closed loop mode.

Here is the call graph for this function:

Here is the caller graph for this function:

void StopTorqueMode ( UCHAR  Axis)

Turn off torque mode.

Parameters
AxisAxis number (alwaxs 0 with the stepRocker)

Switch off the torque mode. Afterwards the motr will be in velocity mode with velocity=0 (stopped).

Here is the call graph for this function:

Here is the caller graph for this function:

void SystemControl ( void  )

Motor monitoring.

This function must be called periodically from the main loop and does some monitoring tasks, e.g. lowering the current after the motor has not been moving for some time.

Here is the call graph for this function:

Here is the caller graph for this function: