Command library for the Roboteq SDC21XX serie of DC Motor drivers, using CANopen Interface. This library replicates the CANopen commands detailled in the User's Manual for the SDC21XX Serie, Section 14 CANopen Interface. Please refer to this document for more details about the use of any of the commands.

Dependents:   SDC21XX_Motor

Fork of Roboteq_SDC_serie by Pierre David

Committer:
kkoichy
Date:
Wed Jun 01 11:49:26 2016 +0000
Revision:
4:2e3f45b81f23
Parent:
0:783afa2e2461
Child:
5:95b0238d75a3
V1.1.1; Changed the name of the CANopen library, so there it is with the updated library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kkoichy 0:783afa2e2461 1 #ifndef ROBOTEQ_H
kkoichy 0:783afa2e2461 2 #define ROBOTEQ_H
kkoichy 0:783afa2e2461 3
kkoichy 4:2e3f45b81f23 4 #include "CANopen_Node.h"
kkoichy 0:783afa2e2461 5
kkoichy 0:783afa2e2461 6
kkoichy 0:783afa2e2461 7 namespace mbed {
kkoichy 0:783afa2e2461 8
kkoichy 0:783afa2e2461 9 class Roboteq : public CANopen{
kkoichy 0:783afa2e2461 10
kkoichy 0:783afa2e2461 11 public :
kkoichy 0:783afa2e2461 12 Roboteq(short _node_id, CAN * _can);
kkoichy 0:783afa2e2461 13 short GetNodeID(void);
kkoichy 0:783afa2e2461 14 void SetNodeID(short _id);
kkoichy 0:783afa2e2461 15 void SetPosition(long _position, uint8_t _channel);
kkoichy 0:783afa2e2461 16 void SetVelocity(uint16_t _speed, uint8_t _channel);
kkoichy 0:783afa2e2461 17 void SetEncoderCounter(long _counter, uint8_t _channel);
kkoichy 0:783afa2e2461 18 void SetBrushlessCounter(long _counter, uint8_t _channel);
kkoichy 0:783afa2e2461 19 void SetUserIntVariable(long _var, uint8_t _nb_var);
kkoichy 0:783afa2e2461 20 void SetAcceleration(long _accel, uint8_t _channel);
kkoichy 0:783afa2e2461 21 void SetDeceleration(long _decel, uint8_t _channel);
kkoichy 0:783afa2e2461 22 void SetAllDigitalOutBits(uint8_t _out_bits);
kkoichy 0:783afa2e2461 23 void SetIndividualDigitalOutBits(uint8_t _out_bits);
kkoichy 0:783afa2e2461 24 void ResetIndividualOutBits(uint8_t _out_bits);
kkoichy 0:783afa2e2461 25 void LoadHomeCounter(uint8_t _channel);
kkoichy 0:783afa2e2461 26 void EmergencyShutdown(uint8_t _param);
kkoichy 0:783afa2e2461 27 void ReleaseShutdown(uint8_t _param);
kkoichy 0:783afa2e2461 28 void StopInAllModes(uint8_t _channel);
kkoichy 0:783afa2e2461 29 void SetPosRelative(long _position, uint8_t _channel);
kkoichy 0:783afa2e2461 30 void SetNextPosAbsolute(long _position, uint8_t _channel);
kkoichy 0:783afa2e2461 31 void SetNextPosRelative(long _position, uint8_t _channel);
kkoichy 0:783afa2e2461 32 void SetNextAcceleration(long _accel, uint8_t _channel);
kkoichy 0:783afa2e2461 33 void SetNextDeceleration(long _decel, uint8_t _channel);
kkoichy 0:783afa2e2461 34 void SetNextVelocity(uint16_t _speed, uint8_t _channel);
kkoichy 0:783afa2e2461 35 void SetUserBoolVariable(long _var, uint8_t _nb_var);
kkoichy 0:783afa2e2461 36 void SaveConfigToFlash(void);
kkoichy 0:783afa2e2461 37
kkoichy 0:783afa2e2461 38 int16_t ReadMotorAmps(uint8_t _channel);
kkoichy 0:783afa2e2461 39 int16_t ReadActualMotorCommand(uint8_t _channel);
kkoichy 0:783afa2e2461 40 int16_t ReadAppliedPowerLevel(uint8_t _channel);
kkoichy 0:783afa2e2461 41 int16_t ReadEncoderMotorSpeed(uint8_t _channel);
kkoichy 0:783afa2e2461 42 int16_t ReadAbsoluteEncoderCount(uint8_t _channel);
kkoichy 0:783afa2e2461 43 int16_t ReadAbsoluteBrushlessCounter(uint8_t _channel);
kkoichy 0:783afa2e2461 44 int16_t ReadUserIntegerVariable(uint8_t _nb_var);
kkoichy 0:783afa2e2461 45 int16_t ReadEncoderMotorSpeedRelativeToMaxSpeed(uint8_t _channel);
kkoichy 0:783afa2e2461 46 int16_t ReadEncoderCountRelative(uint8_t _channel);
kkoichy 0:783afa2e2461 47 int16_t ReadBrushlessCountRelative(uint8_t _channel);
kkoichy 0:783afa2e2461 48 int16_t ReadBrushlessMotorSpeed(uint8_t _channel);
kkoichy 0:783afa2e2461 49 int16_t ReadBrushlessMotorSpeedRelativeToMaxSpeed(uint8_t _channel);
kkoichy 0:783afa2e2461 50 int16_t ReadBatteryAmps(uint8_t _channel);
kkoichy 0:783afa2e2461 51 uint16_t ReadInternalVoltages(uint8_t _param);
kkoichy 0:783afa2e2461 52 uint32_t ReadAllDigitalInputs(void);
kkoichy 0:783afa2e2461 53 int8_t ReadCaseAndInternalTemperatures(uint8_t _param);
kkoichy 0:783afa2e2461 54 int16_t ReadFeedback(uint8_t _channel);
kkoichy 0:783afa2e2461 55 uint8_t ReadStatusFlags(void);
kkoichy 0:783afa2e2461 56 uint8_t ReadFaultFlags(void);
kkoichy 0:783afa2e2461 57 uint8_t ReadCurrentDigitalOutputs(void);
kkoichy 0:783afa2e2461 58 int32_t ReadClosedLoopError(uint8_t _channel);
kkoichy 0:783afa2e2461 59 int32_t ReadUserBooleanVariable(uint8_t _nb_var);
kkoichy 0:783afa2e2461 60 int32_t ReadInternalSerialCommand(uint8_t _channel);
kkoichy 0:783afa2e2461 61 int32_t ReadInternalAnalogCommand(uint8_t _channel);
kkoichy 0:783afa2e2461 62 int32_t ReadInternalPulseCommand(uint8_t _channel);
kkoichy 0:783afa2e2461 63 uint32_t ReadTime(void);
kkoichy 0:783afa2e2461 64 uint16_t ReadSpektrumRadioCapture(uint8_t _nb_capture);
kkoichy 0:783afa2e2461 65 uint8_t ReadDestinationPositionReachedFlag(uint8_t _channel);
kkoichy 0:783afa2e2461 66 int32_t ReadMEMSAccelerometerAxis(uint8_t _axis);
kkoichy 0:783afa2e2461 67 uint16_t ReadMagsensorTrackDetect(void);
kkoichy 0:783afa2e2461 68 uint8_t ReadMagsensorTrackPosition(void);
kkoichy 0:783afa2e2461 69 uint8_t ReadMagsensorMarkers(void);
kkoichy 0:783afa2e2461 70 uint8_t ReadMagsensorStatus(void);
kkoichy 0:783afa2e2461 71 uint8_t ReadMotorStatusFlags(void);
kkoichy 0:783afa2e2461 72 int32_t ReadIndividualDigitalInputs(uint8_t _input);
kkoichy 0:783afa2e2461 73 int16_t ReadAnalogInputs(uint8_t _input);
kkoichy 0:783afa2e2461 74 int16_t ReadAnalogInputsConverted(uint8_t _input);
kkoichy 0:783afa2e2461 75 int16_t ReadPulseInputs(uint8_t _input);
kkoichy 0:783afa2e2461 76 int16_t ReadPulseInputsConverted(uint8_t _input);
kkoichy 0:783afa2e2461 77
kkoichy 0:783afa2e2461 78
kkoichy 0:783afa2e2461 79
kkoichy 0:783afa2e2461 80
kkoichy 0:783afa2e2461 81
kkoichy 0:783afa2e2461 82
kkoichy 0:783afa2e2461 83
kkoichy 0:783afa2e2461 84 private :
kkoichy 0:783afa2e2461 85
kkoichy 0:783afa2e2461 86
kkoichy 0:783afa2e2461 87 protected :
kkoichy 0:783afa2e2461 88
kkoichy 0:783afa2e2461 89
kkoichy 0:783afa2e2461 90
kkoichy 0:783afa2e2461 91 };
kkoichy 0:783afa2e2461 92
kkoichy 0:783afa2e2461 93
kkoichy 0:783afa2e2461 94 }//end namespace
kkoichy 0:783afa2e2461 95
kkoichy 0:783afa2e2461 96
kkoichy 0:783afa2e2461 97 #endif