diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-23 15:41:29 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-23 15:41:29 +0200 |
| commit | ffbe0df145c04bc9e39d5db162a49928ae205da3 (patch) | |
| tree | 7f91f111ed1a006cd15b2c8245b1807810c706e9 /Software/Embedded_SW | |
| parent | d84efaac07fb72baad39eda62b25c07ec7b28489 (diff) | |
| download | Tango-ffbe0df145c04bc9e39d5db162a49928ae205da3.tar.gz Tango-ffbe0df145c04bc9e39d5db162a49928ae205da3.zip | |
switch ADC line 16 and 17 (drier 1, drier 2). pt100 error is a BIT failure. dancer status, and use low dancer values and 0x3FFF (for dancer rollover)
Diffstat (limited to 'Software/Embedded_SW')
7 files changed, 19 insertions, 16 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h index 65064c837..2d5a95c2a 100644 --- a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h +++ b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h @@ -30,8 +30,8 @@ typedef enum ADC_LEFT_DANCER_1 ,//13 ADC_LEFT_DANCER_2 ,//14 ADC_RIGHT_DANCER ,//15 - ADC_DRYER_CURRENT_2 ,//16 - ADC_DRYER_CURRENT_1 ,//17 + ADC_DRYER_CURRENT_1 ,//16 + ADC_DRYER_CURRENT_2 ,//17 ADC_DRYER_CURRENT_3 ,//18 ADC_FPGA_3V3 ,//19 ADC_MAX_ADC_DEVICES ,//20 diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c index b2be0d407..749fad6b0 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c @@ -85,6 +85,10 @@ uint32_t Read_Dryer_ENC_Position () //REPORT_MSG(Dryer_ENC.Position,"Read_Dryer_ENC_Position"); return Dryer_ENC.Position; } +uint32_t Read_Dryer_Status(HardwareDancerType DancerId) +{ + return Dryer_ENC.Gen_status; +} uint32_t Control_Read_Dryer_Position(HardwareDancerType DancerId, uint32_t Parameter1) { return Dryer_ENC.Position; diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h index 33a961c58..8c9d8cfd7 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h @@ -13,6 +13,7 @@ uint32_t Read_Dancer_Position (HardwareDancerType DancerId); uint32_t Control_Read_Dancer_Position(HardwareDancerType DancerId, uint32_t Parameter1); uint32_t Read_Dryer_ENC_Position (); uint32_t Control_Read_Dryer_Position(uint32_t DryerID, uint32_t Parameter1); +uint32_t Read_Dryer_Status(HardwareDancerType DancerId); void Loop_SSI(); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 604fc73fb..845cd2ba8 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -122,12 +122,12 @@ bool UpdateFlag = false; /* ======== errHook ======== */ Void errHook(Error_Block *eb) { - FRESULT Fresult = FR_OK; + /*FRESULT Fresult = FR_OK; FIL *FileHandle = 0; //the system supports a single active file uint32_t Bytes = 0; char File[50] = ""; char message[300]; - int len; + int len;*/ STATUS_GREEN_LED_OFF; ACTIVITY_GREEN_LED_OFF; diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index ec59385ab..8e360cf6e 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -367,7 +367,7 @@ uint32_t EmbeddedParametersInit(void) return Fresult; } -uint32_t GenHWControlId; +/*uint32_t GenHWControlId; uint32_t GenHWInitCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { @@ -380,7 +380,7 @@ uint32_t GenHWInitCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) Disable_MidTank_Pressure_Reading(Dispenser_i); } return OK; -} +}*/ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) { diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 06da53823..5434765e1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -662,7 +662,7 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) DeActivateHeater(HeaterId); HeaterCmd[HeaterId].targettemperatue = 0; #warning PT100 error is misidentified as overheat in alarms - AlarmHandlingSetAlarm(HeaterEventType[HeaterId], true); + AlarmHandlingSetAlarm(EVENT_TYPE__POWER_UP_BIT_FAILURE, true); return; } @@ -738,7 +738,7 @@ int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) ControlIdtoHeaterId [HeaterId] = 0xFF; } DeActivateHeater(HeaterId); - AlarmHandlingSetAlarm(HeaterEventType[HeaterId], true); + AlarmHandlingSetAlarm(EVENT_TYPE__POWER_UP_BIT_FAILURE, true); HeaterCmd[HeaterId].targettemperatue = 0; return ERROR; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 1dd101f82..9e0a2ac7f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -442,7 +442,6 @@ void testDancersControl() ThreadControlActive = false; } #endif -bool dancerinvalid = false; int MotorFailedSample[MAX_THREAD_MOTORS_NUM] = {0,0,0,0,0}; char TMessage[150]; //char time[150]; @@ -481,21 +480,20 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) //if (MotorDriverResponse[ThreadMotorIdToMotorId[index]].Busy == true) // return OK; DancerId = ThreadMotorIdToDancerId[index]; - if (ReadValue < 10) +/* if (ReadValue < 10) { MotorFailedSample[index]++; ReportWithPackageFilter(ThreadFilter,"Dancer value read too small.",__FILE__,__LINE__,DancerId,RpError,ReadValue,0); return OK; - } + }*/ if (ReadValue == 0x3FFF) { - MotorFailedSample[index]++; - if (dancerinvalid == false) + if (Read_Dryer_Status(DancerId) != OK) { - dancerinvalid = true; - ReportWithPackageFilter(ThreadFilter,"Dancer value invalid.",__FILE__,__LINE__,(int)IfIndex,RpError,(int)ReadValue,0); + ReportWithPackageFilter(ThreadFilter,"Dancer value invalid.",__FILE__,ReadValue,(int)DancerId,RpError,(int)Read_Dryer_Status(DancerId),0); + MotorFailedSample[index]++; + return OK; } - return OK; } KeepReadValue = ReadValue; TranslatedReadValue = ReadValue - DancersCfg[DancerId].zeropoint; |
