パラメータ調整

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers petbottleLoading.h Source File

petbottleLoading.h

00001 #ifndef PETBOTTLE_LOADING_H
00002 #define PETBOTTLE_LOADING_H
00003 #include "ikarashiMDC.h"
00004 #include "PID.h"
00005 #include "QEI.h"
00006 #include "pin_config.h"
00007 //#include "controller.h"
00008 
00009 #define loadingKP 29.0
00010 #define loadingKI 0
00011 #define loadingKD 0.0
00012 #define RATE 0.01
00013 /**
00014  * 装填・発射機構用クラス
00015  */
00016 class petbottleLoading
00017 {
00018 public:
00019     /**
00020     * デフォルトコンストラクタ
00021     */
00022     petbottleLoading();
00023 
00024     /**
00025      *
00026      * @0:最初の位置
00027      * @1:発射機構1まで移動モード
00028      * @2:発射機構2まで移動モード
00029      * @3:装填して原点に戻りボトルを落とすモード
00030      */
00031     void petbottlemode(int loadingmode);
00032 
00033     /**
00034      *装填機構状態表示
00035      * @0 : 装填中~~
00036      * @1 : 装填完了!
00037      */
00038     int state();
00039     int LoadingEncoder();
00040 
00041 private:
00042     /*装填機構*/
00043     void loadingasenble();
00044     ikarashiMDC* petbottledrop;
00045     ikarashiMDC* petbotleslider;
00046     ikarashiMDC* petbottleIn;
00047     Serial RS485;
00048     DigitalOut RS485control;
00049 
00050     double petbottledropPwm, petbotlesliderPwm, petbottleInPwm;
00051     PID loadingPid;
00052     QEI loadingencoder;
00053     InterruptIn limitSW1_,limitSW2_,limitSW3_;
00054     int limitSW1,limitSW2,limitSW3;
00055     bool limitSwFlag[3],limitSwFlag2[3], limitStatus[3];
00056     int nowPals, loadingDistance, pullDistanceOfset;
00057     double Output_PID;
00058     int loadingmode;
00059     bool sw5flag;
00060     
00061     /*受信系*/
00062 //    Controller con;
00063     bool receiveSuccessed;
00064     Serial debug;
00065     Timer pt;
00066     float pdt;
00067 
00068 
00069 };
00070 
00071 
00072 
00073 #endif