diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded')
9 files changed, 84 insertions, 45 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.c index 555e4fe12..3f50da709 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.c @@ -7,9 +7,10 @@ #endif #include "InterfaceIOs.pb-c.h" -static const ProtobufCEnumValue interface_ios__enum_values_by_number[48] = +static const ProtobufCEnumValue interface_ios__enum_values_by_number[49] = { { "", "", 0 }, + { "", "", 17 }, { "", "", 19 }, { "", "", 20 }, { "", "", 21 }, @@ -59,42 +60,41 @@ static const ProtobufCEnumValue interface_ios__enum_values_by_number[48] = { "", "", 346 }, }; static const ProtobufCIntRange interface_ios__value_ranges[] = { -{0, 0},{19, 1},{43, 6},{54, 9},{64, 11},{163, 12},{214, 30},{224, 33},{270, 34},{296, 39},{318, 40},{341, 42},{0, 48} +{0, 0},{17, 1},{19, 2},{43, 7},{54, 10},{64, 12},{163, 13},{214, 31},{224, 34},{270, 35},{296, 40},{318, 41},{341, 43},{0, 49} }; -static const ProtobufCEnumValueIndex interface_ios__enum_values_by_name[48] = +static const ProtobufCEnumValueIndex interface_ios__enum_values_by_name[49] = { { "", 0 }, - { "", 31 }, { "", 32 }, - { "", 30 }, - { "", 42 }, + { "", 33 }, + { "", 31 }, { "", 43 }, { "", 44 }, - { "", 34 }, { "", 45 }, - { "", 12 }, - { "", 6 }, + { "", 35 }, + { "", 46 }, + { "", 13 }, { "", 7 }, { "", 8 }, - { "", 2 }, + { "", 9 }, { "", 3 }, { "", 4 }, { "", 5 }, - { "", 11 }, - { "", 35 }, + { "", 6 }, + { "", 12 }, { "", 36 }, { "", 37 }, { "", 38 }, - { "", 1 }, - { "", 40 }, + { "", 39 }, + { "", 2 }, { "", 41 }, - { "", 9 }, + { "", 42 }, { "", 10 }, - { "", 39 }, - { "", 13 }, - { "", 46 }, + { "", 11 }, + { "", 40 }, { "", 14 }, - { "", 22 }, + { "", 47 }, + { "", 1 }, { "", 15 }, { "", 23 }, { "", 16 }, @@ -109,8 +109,10 @@ static const ProtobufCEnumValueIndex interface_ios__enum_values_by_name[48] = { "", 28 }, { "", 21 }, { "", 29 }, - { "", 33 }, - { "", 47 }, + { "", 22 }, + { "", 30 }, + { "", 34 }, + { "", 48 }, }; const ProtobufCEnumDescriptor interface_ios__descriptor = { @@ -119,11 +121,11 @@ const ProtobufCEnumDescriptor interface_ios__descriptor = "", "", "", - 48, + 49, interface_ios__enum_values_by_number, - 48, + 49, interface_ios__enum_values_by_name, - 12, + 13, interface_ios__value_ranges, NULL,NULL,NULL,NULL /* reserved[1234] */ }; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.h index 8f2631c75..494df4af4 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/InterfaceIOs.pb-c.h @@ -21,6 +21,7 @@ PROTOBUF_C__BEGIN_DECLS typedef enum _InterfaceIOs { INTERFACE_IOS__ANALOG_MIXCHIP_TEMP = 0, + INTERFACE_IOS__LS_DH_LID_OPEN = 17, INTERFACE_IOS__GPO_MIXCHIP_SSR4_CTRL = 19, INTERFACE_IOS__GPO_DYEINGH_SSR5_CTRL = 20, INTERFACE_IOS__GPO_DYEINGH_SSR6_CTRL = 21, diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 5c2312c08..5a98b5ece 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -159,6 +159,7 @@ Void errHook(Error_Block *eb) //char File[50] = "";*/ char message[300]; int len; + updateresetreasonineeprom(); //STATUS_GREEN_LED_OFF; ACTIVITY_GREEN_LED_OFF; diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 11a48b587..9f7994629 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -135,7 +135,7 @@ DoubleArray DiagnosticsDispenserPressure[MAX_SYSTEM_DISPENSERS]; HeaterState **heatersstates; HeaterState HeaterInfo[HEATER_TYPE_MAX_HEATERS]; -#define NUM_OF_INTERFACE_IOS 26 +#define NUM_OF_INTERFACE_IOS 27 DigitalInterfaceState **digitalinterfacestates; DigitalInterfaceState DigitalOutputState[NUM_OF_INTERFACE_IOS]; /*double dispenser1motorfrequency[DIAGNOSTICS_LIMIT+1]; @@ -320,15 +320,12 @@ uint32_t DiagnosticsLoadDigitalValues(void) DigitalOutputState[index].interfaceio = INTERFACE_IOS__GPO_SPARE_SSR13_CTRL; DigitalOutputState[index++].value = ReadHeadMagnetBit(); - // indication of movement cause the switch in the tech board to change, also doesn't go through the task - /*if (Head_Type == HEAD_TYPE_SYLKO) //rapid/pp machines - { - DigitalOutputState[index].interfaceio = INTERFACE_IOS__GPO_LED3; - DigitalOutputState[index++].value = HeadCard_Actuators_Status(ACTIN); - DigitalOutputState[index].interfaceio = INTERFACE_IOS__GPO_LED4; - DigitalOutputState[index++].value = HeadCard_Actuators_Status(ACTOT); - }*/ + DigitalOutputState[index].interfaceio = INTERFACE_IOS__LS_DH_LID_OPEN; + if(Head_Type == HEAD_TYPE_ARC) + DigitalOutputState[index++].value = FPGA_Read_limit_Switches(I2C_HEADCARD_COVER_LS_ARC); + else + DigitalOutputState[index++].value = FPGA_Read_limit_Switches(GPI_LS_DH_LID_OPEN); #ifdef USE_VOC_BUZZER_ALARM if (WHS_Type == WHS_TYPE_NEW) diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c index 086525bc1..7e1424b8a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c @@ -51,7 +51,7 @@ void HomingStopReporting(void) int i; for (i = 0; i< NUM_OF_MOTORS;i++) { - HomingToken[i][0] == 0; + HomingToken[i][0] = 0; } LOG_ERROR(0,"HomingStopReporting"); } @@ -624,7 +624,7 @@ uint32_t Diagnostics_Dryer_Loading_Callback(uint32_t MotorId, uint32_t ReadValue if ((abs(angle)>14000 )&&(ReadValue == NOTBUSY)) // OK - take another round { D_DrierPrevLocation = temp; - //ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics_Dryer_Loading_Callback",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0); + ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics_Dryer_Loading_Callback",__FILE__,ReadValue,temp,RpMessage,angle,0); //ReportWithPackageFilter(DiagnosticsFilter,"Diagnostics_Dryer_Loading_Callback details",__FILE__,(int)(TotalLoadedLen),numberOfCycles,RpMessage,CallbackCounter,0); if (D_numberOfCycles<LoadArmRounds) { diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 0726225df..20efd6e8e 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -446,10 +446,10 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) LOG_ERROR (0, "Wrong Data Allocation"); return ERROR; } - if (InitFailures > REPEATED_INIT_FAILURE_LIMIT) + /*if (InitFailures > REPEATED_INIT_FAILURE_LIMIT) { Report("HWConfigurationInit repeated failure",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0); - AlarmHandlingSetAlarm (EVENT_TYPE__POWER_UP_BIT_FAILURE,ON); + //AlarmHandlingSetAlarm (EVENT_TYPE__POWER_UP_BIT_FAILURE,ON); //return ERROR; } else @@ -458,7 +458,7 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) { Report("HWConfigurationInit repeated failure going up",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0); } - } + }*/ HardwareConfiguration *request = UploadRequest->hardwareconfiguration; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 2f72c9cb0..f396d78d9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -1006,6 +1006,7 @@ uint32_t HeaterPrepareFailureCheckTemperatures[HEATER_TYPE_MAX_HEATERS] = {0,0,0 void HeaterPrepareFailureCheck(void) { int i; + int band = 200; if (GetHeatersPrepareWaiting() == false) { HeaterPrepareFailureCheckCounter = 0; @@ -1017,7 +1018,11 @@ void HeaterPrepareFailureCheck(void) { if(HeaterReady[i] == false) { - if (abs (HeaterPrepareFailureCheckTemperatures[i] - HeaterPreviousRead[i])<200) // no temperature move in the last 5 minutes + if ((i == HEATER_TYPE__DryerAirHeater)||(i == HEATER_TYPE__HeadCoverHeater1)||(i == HEATER_TYPE__HeadCoverHeater2)) + band = 50; + else + band = 200; + if (abs (HeaterPrepareFailureCheckTemperatures[i] - HeaterPreviousRead[i])<band) // no temperature move in the last 5 minutes { ReportWithPackageFilter(HeatersFilter,"HeaterPrepareFailureCheck",__FILE__,i,HeaterPrepareFailureCheckTemperatures[i],RpWarning,HeaterPreviousRead[i], 0); JobEndReason = JOB_TEMPERATURE_ALARM; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 284a43e41..3fef1f48b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -55,6 +55,7 @@ extern HeadBoardTempSensConfigStruc HeadTempSensConfig[MAX_HEAD_CARD_TEMP_SENS_ID]; extern float NumberOfRotationPerPassage; // how many rotations per spool passage extern void HeaterSafetyTestSetLimits(int limit); +extern uint32_t InitSequenceWHSAirFlowCalibration(void); //#include "graphics_adapter.h" extern uint8_t Input_Voltage; @@ -1327,6 +1328,35 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } #endif + else + if(request->amount == 0xD11) + { + REPORT_MSG(request->delay, "stop/start blower control and blower"); + if (request->delay == 0) + { + WHS_enable_control_loop(false); + Turn_the_Blower_On();//Turn on with the Default_Voltage + Control_Voltage_To_Blower(1); //stop the blower + } + else + { + Turn_the_Blower_On();//Turn on with the Default_Voltage + Control_Voltage_To_Blower(2400); //stop the blower + WHS_enable_control_loop(true); + } + + response.progress = request->delay; + response.has_progress = true; + } + else + if(request->amount == 0xD12) + { + REPORT_MSG(request->delay, "stop/start blower control and blower"); + InitSequenceWHSAirFlowCalibration(); + + response.progress = request->delay; + response.has_progress = true; + } else if((request->amount == 0xDF) && (request->delay == 0xDF)) //Power off { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 802ce81cc..0d3b5e2f0 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -83,7 +83,6 @@ uint32_t InitSequenceMachineReadyToDye(void); uint32_t InitSequenceStateMachine( INIT_SEQUENCE_STAGES_ENUM ReadValue); uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage); int InitFailures = 0; -extern uint32_t PressureSensorV0[2]; MACHINE_STATE_STAGES_ENUM GetMachineState(void) { @@ -112,19 +111,19 @@ uint32_t InitSequenceCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) MCU_E2PromProgram(EEPROM_INIT_FAILURE_COUNTER,InitFailures+1); - if (InitFailures >= REPEATED_INIT_FAILURE_LIMIT+3) + /*if (InitFailures >= REPEATED_INIT_FAILURE_LIMIT+3) { InitFailures = 0; MCU_E2PromProgram(EEPROM_INIT_FAILURE_COUNTER,0); - } - if (InitFailures > REPEATED_INIT_FAILURE_LIMIT) - { + }*/ + //if (InitFailures > REPEATED_INIT_FAILURE_LIMIT) + //{ Report("HWConfigurationInit repeated failure",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0); /*SetMachineState(MACHINE_STATE_HW_CONFIG_FAILED); AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,ON); SetMachineStatus(MACHINE_STATE__Error); return ERROR;*/ - } + //} status = (MACHINE_STATE_STAGES_ENUM)HWConfigurationInit(); if (status == OK) { @@ -834,6 +833,10 @@ uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage) calculate = (double)((MillisecGetTemperatures(TEMP_SENSE_ANALOG_DRYER_TEMP1)/100)/(dryerzone1temp))*70.0; if (calculate > 0) result = (int)calculate; + if (result > 70.00) + result = 70.0; + if (HeaterCheckReady()==false) + result-=2; response.progresspercentage = 30.0 + result; } //Report("Heating calculation",__FILE__,(int)dryerzone1temp,(int)response.progresspercentage,RpWarning,(int)result,0); |
