stepRocker servo Open Source TMCL
1.00
|
Mini TMCL interpreter. More...
#include <stdlib.h>
#include <stddef.h>
#include "derivative.h"
#include "bits.h"
#include "stepRocker.h"
#include "Commands.h"
#include "Globals.h"
#include "RS485.h"
#include "SysTick.h"
#include "TMC429.h"
#include "TMC262.h"
#include "Eeprom.h"
#include "IO.h"
#include "Can.h"
#include "USB.h"
Functions | |
static void | RotateRight (void) |
Command ROR (see TMCL manual) More... | |
static void | RotateLeft (void) |
Command ROL. More... | |
static void | MotorStop (void) |
Command MST. More... | |
static void | MoveToPosition (void) |
Command MVP. More... | |
static void | SetAxisParameter (void) |
Command SAP. More... | |
static void | GetAxisParameter (void) |
Command GAP. More... | |
static void | GetVersion (void) |
Command 136 (get version) More... | |
static void | Boot (void) |
Enter bootloader mode. More... | |
static void | SoftwareReset (void) |
TMCL software reset command. More... | |
static void | ExecuteActualCommand (void) |
Execute actual TMCL command. More... | |
void | InitTMCL (void) |
Initialize TMCL interpreter. More... | |
void | ProcessCommand (void) |
Fetch and execute TMCL commands. More... | |
Variables | |
static UCHAR | UARTCmd [9] |
RS485 command buffer. | |
static UCHAR | UARTCount |
RS485 commnd byte counter. | |
static UCHAR | TMCLCommandState |
State of the interpreter. | |
static TTMCLCommand | ActualCommand |
TMCL command to be executed (with all parameters) | |
static TTMCLReply | ActualReply |
Reply of last executed TMCL command. | |
static UCHAR | TMCLReplyFormat |
format of next reply (RF_NORMAL or RF_SPECIAL) | |
static UCHAR | SpecialReply [9] |
buffer for special replies | |
static UCHAR | SpeedChangedFlag [N_O_MOTORS] |
TRUE when motor max. speed has been changed by ROL/ROR command. | |
static UCHAR | ResetRequested |
TRUE after executing the software reset command. | |
static UCHAR | ExtendedCANFrame |
TRUE when extended CAN frame used. | |
char | VersionString [] |
Imported version string. | |
Mini TMCL interpreter.
This file all functions necessary to implement a small TMCL interpreter.
|
static |
Enter bootloader mode.
Special command for exiting TMCL and calling the boot loader.
|
static |
Execute actual TMCL command.
Execute the TMCL command that must have been written to the global variable "ActualCommand" before.
|
static |
Command GAP.
GAP (Get Axis Parameter) command (see TMCL manual).
|
static |
Command 136 (get version)
Get the version number (when type==0) or the version string (when type==1).
InitTMCL | ( | void | ) |
Initialize TMCL interpreter.
Intialise the TMCL interpreter. Must be called once at startup.
|
static |
Command MST.
MST (Motor StoP) command (see TMCL manual).
|
static |
Command MVP.
MVP (Move To Position) command (see TMCL manual).
ProcessCommand | ( | void | ) |
Fetch and execute TMCL commands.
This is the main function for fetching and executing TMCL commands and has to be called periodically from the main loop.
|
static |
Command ROL.
ROL (ROtate Left) command (see TMCL manual).
|
static |
Command ROR (see TMCL manual)
ROR (ROtate Right) command (see TMCL manual).
|
static |
Command SAP.
SAP (Set Axis Parameter) command (see TMCL manual).
|
static |
TMCL software reset command.
Issue a TMCL software reset.