// hinf.h #define START_TASK 1 #define STOP_TASK 2 struct my_msg_struct { int command; int order; double sampling_period; }; #define BUF_LEN 5 // column number of time response record //#define RECORDING_SAMPLES 38000 // recording samples #define RECORDING_SAMPLES 24000 // recording samples //#define WAITING_SAMPLES 2000 // waiting samples without control #define WAITING_SAMPLES 0 // waiting samples without control 10/10/12 #define ORDER_MAX 20 // maximum number of controller order //#define NO_CONTROL // if defined, controller never operates //ここにはサ=ボパックで設定したパラメータを入力 実験前に確認すること //#define Pn212 65536 //1周何パルス出力するか? #define Pn212 262144 //1周何パルス出力するか? #define Pn400_1 20.0 #define Pn400_0 30.0 //#define RATED_TORQ 1.91 //定格トルク1.91[Nm] #define RATED_TORQ 0.637 // #define COM_ROT_SPEED 20 //指令速度[rad/s] #define PACK // if controller's matrices A, B, C and D are stored as [A, B; C, D] in cont.dat #define U_MAX (RATED_TORQ / 3.0) #define SPEED_MAX 60.0 // driving torque becomes zero when rotational speed is out of range from -60.0 rad/s to 60.0 rad/s in order to avoid shutting down the driving motor by the maximum speed excess alarm (2018.12.19)