MDX-15,20の制御用library
Diff: MDX20.h
- Revision:
- 6:b61356230acf
- Parent:
- 5:bd414d8e483f
- Child:
- 8:e65e532d1933
diff -r bd414d8e483f -r b61356230acf MDX20.h --- a/MDX20.h Sat Nov 26 06:41:51 2016 +0000 +++ b/MDX20.h Sun Nov 27 12:14:47 2016 +0000 @@ -3,7 +3,7 @@ #include "mbed.h" #include "BufferedSerial.h" -#include "float.h" +#include "limits.h" class MDX20 { public: @@ -15,6 +15,7 @@ void answerPositon(int16_t *position); void answerPositonMillimeter(float *position); void integralPosition(char *str); + void userOriginPositionInitial(void); uint8_t xyOrigin(void); uint8_t zOrigin(void); @@ -26,21 +27,33 @@ int putc(int c); uint8_t initial(void); uint8_t motorOff(void); + uint8_t motorOn(void); + uint8_t userOriginInitial(void); uint8_t final(void); // uint8_t zeroSetting(void); uint8_t XYZMove(int16_t x, int16_t y, int16_t z); + void offsetXAxisAdjustment(int16_t axisData); + void offsetYAxisAdjustment(int16_t axisData); + void offsetZAxisAdjustment(int16_t axisData); + + int32_t motorStateCheck(void); + private: BufferedSerial _serial; // tx, rx(NC) DigitalIn _cts; + void translationToControlerAxisMoveDataFromRMLAxisMoveData(char *str); + + char B_masterTx[0xff]; - double D_position[3]; //[0]:x, [1]:y, [2]:z - double D_userOriginPosition[3]; //[0]:x, [1]:y, [2]:z + int16_t D_position[3]; //[0]:x, [1]:y, [2]:z + int16_t D_userOriginPosition[3]; //[0]:x, [1]:y, [2]:z + int32_t motorState; // true:ON false:OFF #define countToMillimeter (0.025) #define Z_x (0)