Messa in campo 4 file - 26/06/2020 Francia
Dependencies: mbed X_NUCLEO_IHM03A1_for
Fork of FORIGO_Modula_V7_3_VdcStep_maggio2020 by
parameters.hpp@3:a469bbd294b5, 2019-02-13 (annotated)
- Committer:
- nerit
- Date:
- Wed Feb 13 07:18:01 2019 +0000
- Revision:
- 3:a469bbd294b5
- Child:
- 5:2a3a64b52f54
a1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nerit | 3:a469bbd294b5 | 1 | // define constants |
nerit | 3:a469bbd294b5 | 2 | const double Pi = 3.141592654f; |
nerit | 3:a469bbd294b5 | 3 | |
nerit | 3:a469bbd294b5 | 4 | // define logic UI variables which NEED TO BE SET FROM UI |
nerit | 3:a469bbd294b5 | 5 | // *** speed wheel |
nerit | 3:a469bbd294b5 | 6 | double speedWheelDiameter = 0.300f; // variable for tractor speed calculation (need to be set from UI) ( Unit= meters ) |
nerit | 3:a469bbd294b5 | 7 | double speedWheelPulse = 18.0f; // variable which define the number of pulse each turn of tractor speed wheel (need to be set from UI) |
nerit | 3:a469bbd294b5 | 8 | // *** seeding wheel |
nerit | 3:a469bbd294b5 | 9 | double seedWheelDiameter = 0.75f; // seed wheel diameter setting |
nerit | 3:a469bbd294b5 | 10 | double seedWheelMotorSteps = 3200.0f; // seed wheel motor steps without reduction (defined from driver) |
nerit | 3:a469bbd294b5 | 11 | double seedWheelRPM=0.0f; // number of turn per minute of seed wheel |
nerit | 3:a469bbd294b5 | 12 | double seedWhellFrequency=0.0f; // seed wheel frequency which is function of tractor speed |
nerit | 3:a469bbd294b5 | 13 | double seedWheelPeriod=0.0f; // seed wheel pulse period |
nerit | 3:a469bbd294b5 | 14 | |
nerit | 3:a469bbd294b5 | 15 | double deepOfSeed=0.00f; // deep of seeding |
nerit | 3:a469bbd294b5 | 16 | double oldSeedWheelPeriod=0.0f; |
nerit | 3:a469bbd294b5 | 17 | double pickNumber = 20.0f; // numero di becchi installati sulla ruota di semina |
nerit | 3:a469bbd294b5 | 18 | double cellsNumber = 20.0f; // numero di celle del tamburo |
nerit | 3:a469bbd294b5 | 19 | |
nerit | 3:a469bbd294b5 | 20 | double TBmotorSteps = 1600.0f; // TB wheel motor steps without reduction (defined from driver) |
nerit | 3:a469bbd294b5 | 21 | //double TBreductionRatio = 1.65625f; // TB mechanical reduction ratio |
nerit | 3:a469bbd294b5 | 22 | #if defined(Zucca) |
nerit | 3:a469bbd294b5 | 23 | double TBreductionRatio = 3.00f; // TB mechanical reduction ratio |
nerit | 3:a469bbd294b5 | 24 | #else |
nerit | 3:a469bbd294b5 | 25 | double TBreductionRatio = 1.65625f; // TB mechanical reduction ratio |
nerit | 3:a469bbd294b5 | 26 | #endif |
nerit | 3:a469bbd294b5 | 27 | double SDreductionRatio =2.5714f; // seed wheel machanical reduction ratio |
nerit | 3:a469bbd294b5 | 28 | double TBdeltaStep = 0.0f; // steps of advance for manage tb motor respect sd motor |
nerit | 3:a469bbd294b5 | 29 | double K_WheelRPM =0.0f; |
nerit | 3:a469bbd294b5 | 30 | double K_WhellFrequency=0.0f; |
nerit | 3:a469bbd294b5 | 31 | double K_TBfrequency = 0.0f; |
nerit | 3:a469bbd294b5 | 32 | double K_percentuale = 0.0f; |
nerit | 3:a469bbd294b5 | 33 | double timeIntraPick = 0.0f; |
nerit | 3:a469bbd294b5 | 34 | double teoryTimeIntraPick = 0.0f; |
nerit | 3:a469bbd294b5 | 35 | double intraPickDistance = 0.0f; |
nerit | 3:a469bbd294b5 | 36 | |
nerit | 3:a469bbd294b5 | 37 | uint16_t periodoSD = 1000; |
nerit | 3:a469bbd294b5 | 38 | double dcStopDuty = 0.0f; |
nerit | 3:a469bbd294b5 | 39 | double dcMinDuty = 0.0f; // definisce il duty cycle minimo alla partenza (corrisponde alla tensione minima di rotazione) |
nerit | 3:a469bbd294b5 | 40 | double dcMaxDuty = 1.0f; // definisce il duty cycle al massimo della velocità |
nerit | 3:a469bbd294b5 | 41 | double dcMinSpeed = 0.65f; |
nerit | 3:a469bbd294b5 | 42 | double dcMaxSpeed = 1.00f; |
nerit | 3:a469bbd294b5 | 43 | double dcStarting = 0.30f; |
nerit | 3:a469bbd294b5 | 44 | double fixedStepGiroSD = 9000.0f; // numero di suddivisioni angolo giro della ruota di semina |
nerit | 3:a469bbd294b5 | 45 | double minWorkSpeed=0.138888f; //metri al secondo pari a 0,5Kmh |
nerit | 3:a469bbd294b5 | 46 | double maxWorkSpeed=1.277777f; //metri al secondo pari a 4.6Kmh |
nerit | 3:a469bbd294b5 | 47 | double tabComan[22]={0.25,0.255,0.260,0.265,0.27,0.28,0.3107,0.314,0.34,0.3655,0.391,0.4165,0.4335,0.459,0.51,0.5525,0.595}; |
nerit | 3:a469bbd294b5 | 48 | double tabSpeed[22]={0.10,0.14,0.19,0.22,0.25,0.28,0.33,0.36,0.41,0.45,0.49,0.55,0.59,0.62,0.75,0.80,0.82}; |
nerit | 3:a469bbd294b5 | 49 | |
nerit | 3:a469bbd294b5 | 50 | //double minPosSpeed=0.20f; // metri/secondo (0,20 = 0,72KmH) |
nerit | 3:a469bbd294b5 | 51 | double minSeedSpeed=0.22f; // attiva il LowSpeed mt/s (0,28 = 1,0KmH) |
nerit | 3:a469bbd294b5 | 52 | double speedForCorrection=0.25f; |
nerit | 3:a469bbd294b5 | 53 | int cicliAspettaStart = 2; |
nerit | 3:a469bbd294b5 | 54 | double avvioGradi=5.0f; |
nerit | 3:a469bbd294b5 | 55 | double angoloFase = 3.0f; |