diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-02 13:13:03 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-02 13:13:03 +0200 |
| commit | 2bfca4fac0ca1b3d489d20ce7c4799e05876ecb5 (patch) | |
| tree | 1dd9b88877101f62d9222cd6e6706c17ffe10cd9 /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | |
| parent | 78e42a1f21ce22e895a82628354aba64a0a2d66a (diff) | |
| parent | f83a99d14efab540c664a4bed826caf213e7074d (diff) | |
| download | Tango-2bfca4fac0ca1b3d489d20ce7c4799e05876ecb5.tar.gz Tango-2bfca4fac0ca1b3d489d20ce7c4799e05876ecb5.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 6ce453538..689219583 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -598,7 +598,6 @@ void setRapidPressureRead(bool value) if (GetDiagnosticMode() == Diagnostic_Extreme_Mode) RapidPressureRead = true; } -bool Shinko_Read = false; uint16_t PumpCounter = 0; uint16_t realtimetest[101]; uint32_t MillisecLowLoop(uint32_t tick) @@ -640,6 +639,7 @@ uint32_t MillisecLowLoop(uint32_t tick) //Screw_ENC_Velocity_to_DAC(); - for testing the screw enc if (Head_Type > HEAD_TYPE_FLAT_WITHOUT_CARD) StartPT100 = TEMP_SENSE_ANALOG_DRYER_TEMP1; + if (Ten_msTick) { //Speed_Data = Read_Speed_Sensor_TypeII(); @@ -738,26 +738,6 @@ uint32_t MillisecLowLoop(uint32_t tick) if (isMotorConfigured(Motor_i)) MotorGetStatusFromFPGA(Motor_i); } -#ifdef USE_SHINKO_AUTO_COMM - if ((WHS_Type == WHS_TYPE_NEW)&&(Shinko_Read == true)) - { - if(ShinkoTempDeg.Read_Setup == 0x00)//didn't read it yet - { - WHS_Shinko_Communication(R_SETUP); - } - else - /*if(0)//TBD - need stop condition to write only once (all the steps) , Read_Setup != setup, Read_Setup != 0, Read_Setup != Prev_Read_Setup - { - // option to wrte + read setup and stop when read = write - WHS_Shinko_Communication(W_SETUP); - } - else*/ - { - //finish reading the setup before start reading the value - WHS_Shinko_Communication(R_Value); // Reading every fourth cycle (Set HW, Request, Set HW, Response) - } - } -#endif } if ((O500Millisecond_Tick)&&(RapidPressureRead == false)) { @@ -820,6 +800,11 @@ uint32_t MillisecLowLoop(uint32_t tick) Whs_emptying_cycle++; } */ + + if(Shinko_first_read < 2)//read the two steps once and than in cycle every 10 minutes, also will be used to read after updating the temperature + { + Shinko_Cycle_Comm(); + } } if (Head_Type == HEAD_TYPE_ARC) { HeadBlowersControlLoop(); @@ -837,15 +822,6 @@ uint32_t MillisecLowLoop(uint32_t tick) } if (Tensecond_Tick) { - #ifndef RUN_AS_MAIN_JIG - //Trigger_MidTank_Pressure_Read(); - for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) - { - Read_MidTank_Pressure_Sensor(Disp_i); - } - #endif - - Shinko_Read = true;//start cycle of R/W setup or value every 10Sec } if (OneMinute_Tick) { @@ -876,6 +852,17 @@ uint32_t MillisecLowLoop(uint32_t tick) { waste_seq_step1();// include 1Sec delay <- to open !!!! }*/ + if (WHS_Type == WHS_TYPE_NEW) + { + Shinko_Cycle_Comm(); + } +#ifndef RUN_AS_MAIN_JIG + //Trigger_MidTank_Pressure_Read(); + for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) + { + Read_MidTank_Pressure_Sensor(Disp_i); + } +#endif } if (OneHourTick) |
