diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-13 18:09:45 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-13 18:09:45 +0300 |
| commit | 3f6a1cf39932b49de12bdb996786d51bbc9e38d4 (patch) | |
| tree | 824fb080bfc764519867662f673bd664127d60e3 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | fe3e2ab49445060253492fcd8226378382331178 (diff) | |
| parent | 2f510ce9b99796ac95510980b9b8e8ea6ca57591 (diff) | |
| download | Tango-3f6a1cf39932b49de12bdb996786d51bbc9e38d4.tar.gz Tango-3f6a1cf39932b49de12bdb996786d51bbc9e38d4.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 0e68a6406..92939dfe4 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -216,7 +216,6 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) avreageSampleValue += MotorSamples[index][i]; avreageSampleValue = avreageSampleValue / MotorsControl[index].pvinputfilterfactormode; NormalizedError = avreageSampleValue*NormalizedErrorCoEfficient[index]; -if (index != 0) return OK; MotorControlConfig[index].m_mesuredParam = NormalizedError; MotorControlConfig[index].m_calculatedError = PIDAlgorithmCalculation((float)MotorControlConfig[index].m_SetParam , (float)MotorControlConfig[index].m_mesuredParam, &MotorControlConfig[index].m_params, &MotorControlConfig[index].m_preError, &MotorControlConfig[index].m_integral); @@ -282,7 +281,7 @@ bool InitialProcess = false; MotorSetDirection((TimerMotors_t)HW_Motor_Id,MotorsCfg[HW_Motor_Id].directionthreadwize); #ifdef DEBUG_TEST_FUNCTIONS - +/* if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled ControlIdtoMotorId[Motor_i] = AddControlCallback(ThreadLengthCBFunction, eOneMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToDancerId[Motor_i],Motor_i); if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled @@ -316,7 +315,7 @@ uint32_t ThreadPreSegmentState(void *JobDetails) int process_speed = JobTicket->processparameters->dyeingspeed; - process_speed = 10; //debug + process_speed = 50; //debug for (Motor_i = 0;Motor_i <= WINDER_MOTOR;Motor_i++) { @@ -329,6 +328,11 @@ uint32_t ThreadPreSegmentState(void *JobDetails) //ControlStart(); // set the new speed in the dryer motor to the speed of the new segment MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING, OriginalMotorSpd_2PPS[DRYER_MOTOR], MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING].microstep); + //only for testing - when control works, these motors will take their speed from the dryer + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LDRIVING, OriginalMotorSpd_2PPS[POOLER_MOTOR], MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LDRIVING].microstep); + //only for testing - when control works, these motors will take their speed from the dryer + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RDRIVING, OriginalMotorSpd_2PPS[FEEDER_MOTOR], MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].microstep); + MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 1, 1); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 1,1); |
