diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-10-26 17:33:41 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-10-26 17:33:41 +0200 |
| commit | 6a1dff8d05740d86d8fbcfc582818f802d62b13c (patch) | |
| tree | cd4d8f3389abcd9249df8aca9e2e09bb5d50b9e2 /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | |
| parent | b87aee2720cd71594b8cb68849d18b42cd0905bb (diff) | |
| download | Tango-6a1dff8d05740d86d8fbcfc582818f802d62b13c.tar.gz Tango-6a1dff8d05740d86d8fbcfc582818f802d62b13c.zip | |
Update Shinko
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index d668657b5..ddbda4bca 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(); @@ -845,7 +830,6 @@ uint32_t MillisecLowLoop(uint32_t tick) } #endif - Shinko_Read = true;//start cycle of R/W setup or value every 10Sec } if (OneMinute_Tick) { @@ -876,7 +860,10 @@ uint32_t MillisecLowLoop(uint32_t tick) { waste_seq_step1();// include 1Sec delay <- to open !!!! }*/ - + if (WHS_Type == WHS_TYPE_NEW) + { + Shinko_Cycle_Comm(); + } } if (OneHourTick) { |
