diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-07-24 14:03:35 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-07-24 14:03:35 +0300 |
| commit | 1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7 (patch) | |
| tree | a211d3fdbe6dc8e98a14a50b4d7d2161bbc91a4f /Software/Embedded_SW/Embedded/Modules | |
| parent | 17a32af2a2500d6da0e59d3085ddfd43d0ee5270 (diff) | |
| download | Tango-1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7.tar.gz Tango-1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7.zip | |
Version 1.4.2.5 firmware upgrade works, improved thread load. (works????)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
3 files changed, 21 insertions, 25 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index c1fcd4030..e3955793d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -426,10 +426,8 @@ uint32_t MillisecLoop(uint32_t tick) { #ifdef Use_Head_Card HeadADCPT100_SendReadDataCommand(Sensor_i); - #else - TemperatureSensorReadFromFPGA_Res(Sensor_i); //got the data from the FPGA #endif - + TemperatureSensorReadFromFPGA_Res(Sensor_i); //got the data from the FPGA PT100Data[Sensor_i].WaitForData = false; PT100Data[Sensor_i].SyncRequired = true; if (PT100Data[Sensor_i].Callback) @@ -440,9 +438,8 @@ uint32_t MillisecLoop(uint32_t tick) { #ifdef Use_Head_Card HeadADCPT100_StartSync(Sensor_i); - #else - TemperatureSensorSync(Sensor_i); #endif + TemperatureSensorSync(Sensor_i); PT100Data[Sensor_i].SyncRequired = false; PT100Activity--; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c index faf6022d6..350236708 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c @@ -63,11 +63,10 @@ uint32_t Heaters_Init(void) int i; //ROM_TimerDisable(Heater_timerBase, TIMER_A); - #ifdef Use_Head_Card - HeadADCPT100_SensorInitConfig(); - #else - FPGA_SensorInitConfig(); - #endif +#ifdef Use_Head_Card + HeadADCPT100_SensorInitConfig(); +#endif + FPGA_SensorInitConfig(); memset(HeaterControl,0,sizeof(HeaterControl)); for (i = 0;i<MAX_HEATERS_NUM; i++) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index d2f6170cf..837221274 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -146,7 +146,7 @@ Control_Voltage_To_Blower(BlowerCfg.voltage-500); Control_Dryer_Fan(STOP,75);//use START or STOP, 0 - 100% LoadStages++; - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); } return OK; } @@ -167,7 +167,7 @@ //storeLoadArmParameters(); SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM); //set this point as the spool home LoadStages++; - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); } return OK; } @@ -198,7 +198,7 @@ LoadStages++; SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM); //set this point as the spool home - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); return OK; } uint32_t Thread_Load_Set_Load_Arm_To_Start_Position(void) @@ -258,7 +258,7 @@ } if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this stage we should wait for user call { - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); } } } @@ -379,7 +379,7 @@ { Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100% LoadStages++; - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); } return OK; } @@ -394,14 +394,7 @@ uint32_t Thread_Load_Dryer_MovetoEncoderPosition_Callback(uint32_t MotorId, uint32_t ReadValue) { - if(ControlId != 0xFF) - { - MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz); - RemoveControlCallback(ControlId, ThreadLoadControlCBFunction ); - MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround); - - ControlId = 0xFF; - } + MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, 200); if (CallbackCounter) { CallbackCounter--; @@ -410,7 +403,7 @@ LoadStages++; if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this satge we should wait for user call { - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); } } } @@ -421,6 +414,12 @@ uint32_t Thread_Load_Dryer_Loading_Callback(uint32_t MotorId, uint32_t ReadValue) { Report("Thread Load State Machine Callback.",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0); + if(ControlId != 0xFF) + { + MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz); + RemoveControlCallback(ControlId, ThreadLoadControlCBFunction ); + ControlId = 0xFF; + } //REPORT_MSG(MotorId, "Thread_Load_Dryer_Loading_Callback Motor Id"); MotorMovetoEncoderPosition(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Thread_Load_Dryer_MovetoEncoderPosition_Callback,10000); return OK; @@ -477,7 +476,7 @@ ControlId = 0xFF; ThreadAbortJoggingFunc(); LoadStages++; - //ThreadLoadStateMachine(LoadStages); + ThreadLoadStateMachine(LoadStages); return OK; } uint32_t Thread_Load_Jog_Thread(void) @@ -632,6 +631,7 @@ Thread_Load_Jog_Thread(); break; case THREAD_LOAD_END: + LoadStages = THREAD_LOAD_END; Thread_Load_End(); break; default: |
