aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-10-26 17:33:41 +0200
committerAvi Levkovich <avi@twine-s.com>2020-10-26 17:33:41 +0200
commit6a1dff8d05740d86d8fbcfc582818f802d62b13c (patch)
treecd4d8f3389abcd9249df8aca9e2e09bb5d50b9e2 /Software/Embedded_SW/Embedded/Modules/Control
parentb87aee2720cd71594b8cb68849d18b42cd0905bb (diff)
downloadTango-6a1dff8d05740d86d8fbcfc582818f802d62b13c.tar.gz
Tango-6a1dff8d05740d86d8fbcfc582818f802d62b13c.zip
Update Shinko
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c33
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
2 files changed, 10 insertions, 24 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)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index f7351d0b1..0d7c42ad6 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -50,7 +50,6 @@ void MillisecLogClose(void);
#endif
-extern bool Shinko_Read;
extern bool watchdogCriticalAlarm;
extern Task_Handle Millisecond_Task_Handle;