diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-06-14 17:26:35 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-06-14 17:26:35 +0300 |
| commit | 2a307f7c34e33a02fb605cd6bb4fa913cc17b805 (patch) | |
| tree | a348b1f8968ff4b3765ccc01572aea5c822eadaa /Software/Embedded_SW | |
| parent | 1b5906087017b5092dd51cc1a639a95e7f41701d (diff) | |
| download | Tango-2a307f7c34e33a02fb605cd6bb4fa913cc17b805.tar.gz Tango-2a307f7c34e33a02fb605cd6bb4fa913cc17b805.zip | |
new powerstep parameters, better handling of FPGA loading and tension parameters
Diffstat (limited to 'Software/Embedded_SW')
7 files changed, 53 insertions, 40 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c index 8454415b5..84f078b9f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -936,19 +936,11 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) } - if(input_value != 0) - { - temp |= input_value<<16;; - if( MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback) < 0 ) - return ERROR; + temp |= input_value<<16;; + if( MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback) < 0 ) + return ERROR; - break; - } - else - { - LOG_ERROR (_motorId,"fnslpacc / tonmin is Zero"); - AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,ON); - } + break; case MOTOR_CONFIG_FN_SLP_DEC_TOFF_MIN: ConfigStages[_motorId]++; @@ -967,19 +959,11 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) } - if(input_value != 0) - { - temp |= input_value<<16;; - if( MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback) < 0 ) - return ERROR; + temp |= input_value<<16;; + if( MillisecWriteToMotor(_motorId, temp, 4, FPGA_MotorConfig_callback) < 0 ) + return ERROR; - break; - } - else - { - LOG_ERROR (_motorId,"fnslpdec / toffmin is Zero"); - AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,ON); - } + break; case MOTOR_CONFIG_OCD_TH: ConfigStages[_motorId]++; diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 0dc70efaa..f3ac52a7b 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -24,6 +24,7 @@ #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "drivers/FPGA/FPGA.h" +#include "drivers/FPGA/Full_Vme/FPGA_Programming_Up.h" #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" #include "drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h" #include <Drivers/I2C_Communication/WHS_Card/D_EMC2302_Fan/WHS_Fan.h> @@ -1636,6 +1637,8 @@ void SendEventNotifications(void) LargeMessagesAH++; return; } + if (FPGABurningActive==true) + return; EventsResponse.n_events = 0; //UInt Key = Task_disable(); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index 42739f20f..60b9cba9e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -28,6 +28,7 @@ #include "drivers/I2C_Communication/DAC/blower.h" #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" #include "Drivers/I2C_Communication/Head_Card/Fan/Head_Fan.h" +#include <Drivers/I2C_Communication/WHS_Card/D_EMC2302_Fan/WHS_Fan.h> #include "drivers/Valves/Valve.h" #include "drivers/Heater/Heater.h" #include "modules/waste/waste.h" @@ -390,6 +391,16 @@ uint32_t SetBlowerStateRequestFunc(MessageContainer* requestContainer) else status = NOT_SUPPORTED; break; + case HARDWARE_BLOWER_TYPE__WHSSmallFans: + Trigger_SetWHSFanSpeed(FAN1, request->voltage); + Trigger_SetWHSFanSpeed(FAN2, request->voltage); + Trigger_SetWHSFanSpeed(FAN3, request->voltage); + Trigger_SetWHSFanSpeed(FAN4, request->voltage); + break; + case HARDWARE_BLOWER_TYPE__WHSLargeFans: + Trigger_SetWHSFanSpeed(FAN5, request->voltage); + Trigger_SetWHSFanSpeed(FAN6, request->voltage); + break; default: status = NOT_SUPPORTED; break; diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c index 7bf72ba8c..59264e1cf 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/process.c +++ b/Software/Embedded_SW/Embedded/Modules/General/process.c @@ -31,8 +31,8 @@ double dyeingspeed = 0; double dryerbufferlength = 0; double mininkuptake = 0; double feedertension = 0; -double pullertension = 5000; -double windertension = 5000; +double pullertension = 0; +double windertension = 0; double headairflow = 5.0; double dryerairflow = 5.0; double pressurebuildup = 0; @@ -128,6 +128,9 @@ uint32_t HandleProcessParameters(ProcessParameters* ProcessParams,bool saveData) else { ProcessParams->headairflow = headairflow; + ProcessParams->feedertension = feedertension; + ProcessParams->windertension = windertension; + ProcessParams->pullertension = pullertension; ReportWithPackageFilter(InitFilter,"HandleProcessParameters temp off blower on",__FILE__,(int)__LINE__,(int)ProcessParams->headairflow,RpWarning,(int)ProcessParametersKeep.headairflow,0); } } @@ -381,7 +384,7 @@ uint32_t LoadProcessParamsFromFile(void) } uint32_t ProcessParamsInit(void) { - FRESULT Fresult = FR_OK; + FRESULT Fresult = FR_NOT_READY; uint32_t Bytes; memcpy(&Bytes,(void *)PROCESS_PARAMETERS_MAP_IN_FLASH,sizeof(Bytes)); @@ -406,6 +409,13 @@ uint32_t ProcessParamsInit(void) } } } + if (Fresult == FR_NOT_READY) //process params not ready + { + MCU_E2PromProgram(EEPROM_WINDER_TENSION_POSITION,&Bytes); + windertension = Bytes; + MCU_E2PromProgram(EEPROM_PULLER_TENSION_POSITION,&Bytes); + pullertension = Bytes; + } return Fresult; } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 31c9be4ff..965ea30da 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -35,6 +35,7 @@ #include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h> #include <Drivers/I2C_Communication/I2C_Task.h> #include "drivers/FPGA/FPGA_SPI_Comm.h" +#include "drivers/FPGA/Full_Vme/FPGA_Programming_Up.h" #include "PMR/Stubs/StubHeatingTestRequest.pb-c.h" #include "PMR/Stubs/StubHeatingTestResponse.pb-c.h" @@ -1066,7 +1067,7 @@ } uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue) { - if (JobIsActive()||(MachineReadyForHeating == false)) + if (JobIsActive()||(MachineReadyForHeating == false)||(FPGABurningActive==true)) { Report("ThreadLoadButton called on job",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0); return ERROR; diff --git a/Software/Embedded_SW/Embedded/Software Release Notes.txt b/Software/Embedded_SW/Embedded/Software Release Notes.txt index 9c45cad82..ac4f813eb 100644 --- a/Software/Embedded_SW/Embedded/Software Release Notes.txt +++ b/Software/Embedded_SW/Embedded/Software Release Notes.txt @@ -1,18 +1,19 @@ Embedded SW Release note - Version 1.4.6.31 - Pack 2+ ============================================================= -fix bug in SW update -fix firmware update when no files +fix bug in SW update - test many short jobs. +fix firmware update when no files remove ADC interrupt - polling only -fix head identification on head hw failure -improve WHS air flow control +fix head identification on head hw failure +improve WHS air flow control - test - change RML settings. check time of change until stable fix FlashInitAndLoad() (although not in use) -########### NOT FIXED ### dryer heating. lots of logs added, -VAC control - hysteresis added; use saved Z1 current and not on going current. -start blower increase a bit later to solve the temperature alarms preventing jobs +########### NOT FIXED ### dryer heating. lots of logs added, please report whenever temperature goes too high +VAC control - hysteresis added; +use saved Z1 current and not on going current. +start blower increase a bit later to solve the temperature alarms preventing jobs - test bugs #2611, #2613, #2902 -IDS pressure check reinstalled -maximal pressure buildup 2.5 -no cleaning if not on RML +IDS pressure check reinstalled +maximal pressure buildup 2.5 instead of 1.5 +no cleaning if not on RML allow midtank filling if less than 0.6 (PP machine) @@ -24,7 +25,7 @@ thread load: - support "try" message from PPC on problem - improve error handling - improve error messages -improve thec board load arm homing +improve the tech board loading arm homing allow dancer spring motors to move during a job drivers: @@ -32,8 +33,10 @@ drivers: new dispenser pressure sensors (based on EEPROM) EMC support - external clock / internal clock in motors read air flow in arc head + system: load/store MCU EEprom data using a special command +print MCU serial number INITIALIZATION Failure: if the SW crashes 4 times -initialization will stop. solution : retart 4 more times, update software, stub read serial number of main CPU to the logs diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index f22d09d9d..b5715ca0a 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -71,6 +71,7 @@ #include "drivers/Motors/Motor.h" #include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h> +#include "drivers/FPGA/Full_Vme/FPGA_Programming_Up.h" #include "./printingSTM.h" #include "modules/thread/thread_ex.h" @@ -372,7 +373,7 @@ uint32_t ThreadJoggingFunc(int speed) { ProcessParameters ProcessParametersCopy; uint32_t status = OK; - if ((JobIsActive() == true)||(JoggingJobActive == true)||(MachineReadyForHeating == false)) + if ((JobIsActive() == true)||(JoggingJobActive == true)||(MachineReadyForHeating == false)||(FPGABurningActive==true)) { status = ERROR; Report("Jog JobIsActive", __FILE__, __LINE__, JobIsActive(), RpWarning, JoggingJobActive, 0); |
