aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-01-09 10:42:14 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-01-09 10:42:14 +0200
commitd50d729a2b7d45ca4b22df7ff0d8823825c479b6 (patch)
treeb6ac5a0813c4b76d43ad3af1d56ac8a44361dd7f /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
parentaeebb8d47e1d78b50d9ae5afd9df6eaf9765ed87 (diff)
downloadTango-d50d729a2b7d45ca4b22df7ff0d8823825c479b6.tar.gz
Tango-d50d729a2b7d45ca4b22df7ff0d8823825c479b6.zip
Version 1.3.1.1 changes
Communication tx traces (reports, diagnostics, alarms, job reports) File system file download support – not tested! Communication tx with pre-allocated memory (improve and add areas) Winder Screw – send messages in regular mode Preparation for motor actions timeouts Preparations for control debug Heaters: bug fix, enlarge PID start region IDS: • Dispenser time out between motor operation and valve operation (start->open. Close->stop). • Dispenser homing backlash – to pressure above limit (currently 0.1 for machines without mixer) or timeout (10 seconds). State machine – Suspend Large Messages cancelled.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c70
1 files changed, 1 insertions, 69 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 1ab3a21e9..aaa4b1228 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -212,53 +212,6 @@ int32_t MillisecReadFromTempSensor(uint32_t TempSensorId, MSecFptr Callback)
//typedef uint32_t (* MSecFptr)(uint32_t deviceID, uint32_t ReadValue);
uint32_t MotorActivity = 0;
-int32_t MillisecMoveScrew(unsigned long Data, int Length, MSecFptr Callback)
-{
- //==========================
- /*MSBacklog[MsecLogindex]=Data;
- Motor_Id[MsecLogindex]=HARDWARE_MOTOR_TYPE__MOTO_SCREW;
- MSTick[MsecLogindex]=msec_millisecondCounter;
- MsecLogindex++;
- if (MsecLogindex>=LOG_SIZE)
- MsecLogindex = 0;*/
-
- //==========================
-
- ScrewMovePending.Callback = Callback;
- ScrewMovePending.Data = Data;
- ScrewMovePending.Length = Length;
- ScrewMovePending.DataRequired = false;
- if (ScrewMovePending.Active == false)
- {
- MotorActivity++;
- ScrewMovePending.Active = true;
- }
-
- return OK;
-}
-
-int32_t MillisecSetScrewSpeed(unsigned long Data, int Length, MSecFptr Callback)
-{
- //==========================
-/* MSBacklog[MsecLogindex]=Data;
- Motor_Id[MsecLogindex]=HARDWARE_MOTOR_TYPE__MOTO_SCREW;
- MsecLogindex++;
- if (MsecLogindex>=LOG_SIZE)
- MsecLogindex = 0;
- */ //==========================
-
- ScrewSetMaxSpeedPending.Callback = Callback;
- ScrewSetMaxSpeedPending.Data = Data;
- ScrewSetMaxSpeedPending.Length = Length;
- ScrewSetMaxSpeedPending.DataRequired = false;
- if (ScrewSetMaxSpeedPending.Active == false)
- {
- MotorActivity++;
- ScrewSetMaxSpeedPending.Active = true;
- }
-
- return OK;
-}
int32_t MillisecSetMotorSpeed(TimerMotors_t MotorId, unsigned long Data, int Length, MSecFptr Callback)
{
if (MotorId >= NUM_OF_MOTORS) return -1;
@@ -402,27 +355,6 @@ uint32_t MillisecLoop(uint32_t tick)
}
MotorActivity--;
}
- if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW)
- {
- if (ScrewSetMaxSpeedPending.Active == true)
- {
- MotorSendFPGARequest(HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSetMaxSpeedPending.Data,ScrewSetMaxSpeedPending.Length);
- MotorActivity--;
- ScrewSetMaxSpeedPending.Active = false;
- if (ScrewSetMaxSpeedPending.Callback)
- ScrewSetMaxSpeedPending.Callback(Motor_i,0);
- continue;
- }
- else if (ScrewMovePending.Active == true)
- {
- MotorSendFPGARequest(HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewMovePending.Data,ScrewMovePending.Length);
- MotorActivity--;
- ScrewMovePending.Active = false;
- if (ScrewMovePending.Callback)
- ScrewMovePending.Callback(Motor_i,0);
- continue;
- }
- }
if (SpeedSetPending[Motor_i].Active == true)
{
MotorSendFPGARequest((HardwareMotorType)Motor_i,SpeedSetPending[Motor_i].Data,SpeedSetPending[Motor_i].Length);
@@ -492,7 +424,7 @@ uint32_t MillisecLoop(uint32_t tick)
}
uint32_t MillisecLowLoop(uint32_t tick)
{
- uint8_t Disp_i;
+ uint8_t Motor_i,Disp_i;
TEMPERATURE_SENSOR_ID_ENUM Sensor_i;
static int temp=0;