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 15:02:17 2016 +0000
Revision:
5:95b0238d75a3
Parent:
3:53d26a675eb3
Parent:
4:2e3f45b81f23
Child:
6:bd10b47f59d2
V1.2

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