![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
1st Fork
Dependencies: mbed QEI DmTftLibrary
SWPos/SWPos.h@27:654100855f5c, 2022-02-15 (annotated)
- Committer:
- lex9296
- Date:
- Tue Feb 15 07:22:09 2022 +0000
- Revision:
- 27:654100855f5c
- Parent:
- 23:b9d23a2f390e
Release "Stabile"
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lex9296 | 23:b9d23a2f390e | 1 | #include "mbed.h" |
lex9296 | 23:b9d23a2f390e | 2 | |
lex9296 | 23:b9d23a2f390e | 3 | struct in_sPosizionatoreSW { |
lex9296 | 23:b9d23a2f390e | 4 | bool b_AxisPowered; |
lex9296 | 23:b9d23a2f390e | 5 | bool b_ACPos_Homed; |
lex9296 | 23:b9d23a2f390e | 6 | int32_t i32_Max_Speed; |
lex9296 | 23:b9d23a2f390e | 7 | int32_t i32_ZeroSpeed; |
lex9296 | 23:b9d23a2f390e | 8 | |
lex9296 | 23:b9d23a2f390e | 9 | bool b_JogMode; |
lex9296 | 23:b9d23a2f390e | 10 | bool b_JogFW; |
lex9296 | 23:b9d23a2f390e | 11 | bool b_JogBW; |
lex9296 | 23:b9d23a2f390e | 12 | // |
lex9296 | 23:b9d23a2f390e | 13 | int32_t i32_JogAccel_ms; |
lex9296 | 23:b9d23a2f390e | 14 | int32_t i32_JogDecel_ms; |
lex9296 | 23:b9d23a2f390e | 15 | // |
lex9296 | 23:b9d23a2f390e | 16 | float f_JogSpeed_x100_FW; // in_rJogSpeed%_FW |
lex9296 | 23:b9d23a2f390e | 17 | float f_JogSpeed_x100_BW; // in_rJogSpeed%_BW |
lex9296 | 23:b9d23a2f390e | 18 | |
lex9296 | 23:b9d23a2f390e | 19 | bool b_ServoLock; |
lex9296 | 23:b9d23a2f390e | 20 | bool rtServoLock_Q; |
lex9296 | 23:b9d23a2f390e | 21 | // |
lex9296 | 23:b9d23a2f390e | 22 | int64_t i64_TargetPosition; |
lex9296 | 23:b9d23a2f390e | 23 | int64_t i64_ActualPosition; |
lex9296 | 23:b9d23a2f390e | 24 | int64_t i64_AccelerationWindow; |
lex9296 | 23:b9d23a2f390e | 25 | int64_t i64_DecelerationWindow; |
lex9296 | 23:b9d23a2f390e | 26 | int64_t i64_diToleranceWindow; |
lex9296 | 23:b9d23a2f390e | 27 | // |
lex9296 | 23:b9d23a2f390e | 28 | float f_ServoLockSpeed_x100_FW; // in_rServoLockSpeed%_FW |
lex9296 | 23:b9d23a2f390e | 29 | float f_ServoLockSpeed_x100_BW; // in_rServoLockSpeed%_BW |
lex9296 | 23:b9d23a2f390e | 30 | float f_MaximumSpeed_x100_FW; // LA: in_rMaximumSpeed%_FW |
lex9296 | 23:b9d23a2f390e | 31 | float f_MaximumSpeed_x100_BW; // LA: in_rMaximumSpeed%_BW |
lex9296 | 23:b9d23a2f390e | 32 | }; |
lex9296 | 23:b9d23a2f390e | 33 | |
lex9296 | 23:b9d23a2f390e | 34 | struct out_sPosizionatoreSW { |
lex9296 | 23:b9d23a2f390e | 35 | int64_t i64_StartPosition; |
lex9296 | 23:b9d23a2f390e | 36 | int64_t i64_Distance; |
lex9296 | 23:b9d23a2f390e | 37 | |
lex9296 | 23:b9d23a2f390e | 38 | bool b_Accelerating; // LA: bACPos_Accelerating |
lex9296 | 23:b9d23a2f390e | 39 | bool b_MaxSpeedReached; |
lex9296 | 23:b9d23a2f390e | 40 | // |
lex9296 | 23:b9d23a2f390e | 41 | bool b_Decelerating; // bACPos_Decelerating |
lex9296 | 23:b9d23a2f390e | 42 | bool b_InPosition; |
lex9296 | 23:b9d23a2f390e | 43 | bool b_InToleranceFW; |
lex9296 | 23:b9d23a2f390e | 44 | bool b_InToleranceBW; |
lex9296 | 23:b9d23a2f390e | 45 | |
lex9296 | 23:b9d23a2f390e | 46 | int32_t i32_ATVSpeed; |
lex9296 | 23:b9d23a2f390e | 47 | bool b_ATVDirectionFW; |
lex9296 | 23:b9d23a2f390e | 48 | bool b_ATVDirectionBW; |
lex9296 | 23:b9d23a2f390e | 49 | // |
lex9296 | 23:b9d23a2f390e | 50 | bool b_STW1_On; |
lex9296 | 23:b9d23a2f390e | 51 | bool b_STW1_NoCStop; |
lex9296 | 23:b9d23a2f390e | 52 | bool b_STW1_NoQStop; |
lex9296 | 23:b9d23a2f390e | 53 | bool b_STW1_Enable; |
lex9296 | 23:b9d23a2f390e | 54 | |
lex9296 | 23:b9d23a2f390e | 55 | // LA: Disposizioni transitorie e finali |
lex9296 | 23:b9d23a2f390e | 56 | // |
lex9296 | 23:b9d23a2f390e | 57 | uint32_t ui32_PreviousStep_ms; |
lex9296 | 23:b9d23a2f390e | 58 | uint32_t ui32_ActualStepSampled_ms; |
lex9296 | 23:b9d23a2f390e | 59 | uint32_t ui32_PassedActual_ms; |
lex9296 | 23:b9d23a2f390e | 60 | }; |
lex9296 | 23:b9d23a2f390e | 61 | |
lex9296 | 23:b9d23a2f390e | 62 | void PosizionatoreSW (const in_sPosizionatoreSW &in, out_sPosizionatoreSW &out); |