aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-12-10 19:38:53 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-12-10 19:38:53 +0200
commita1a5b23fa3ae710e5c3d741fe59e0b6cc3fbcd5b (patch)
tree8d0eb02e8f0ae1a4878b98531fa39cf309166954 /Software
parentafaee9a1cc07c5578aa9630963d895380d64f51b (diff)
downloadTango-a1a5b23fa3ae710e5c3d741fe59e0b6cc3fbcd5b.tar.gz
Tango-a1a5b23fa3ae710e5c3d741fe59e0b6cc3fbcd5b.zip
version 1.5.3.4
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Common/report/reportInit.c17
-rw-r--r--Software/Embedded_SW/Embedded/DataDef.h4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c45
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c4
-rw-r--r--Software/Embedded_SW/Embedded/Software Release Notes.txt11
-rw-r--r--Software/Stubs Collection/Procedures/Set_Head_Type_With_DB.pproj1
-rw-r--r--Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs2
8 files changed, 55 insertions, 31 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index e27127c56..5392a415e 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,5,3,3};
+TangoVersion_t _gTangoVersion = {1,5,3,4};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
diff --git a/Software/Embedded_SW/Embedded/Common/report/reportInit.c b/Software/Embedded_SW/Embedded/Common/report/reportInit.c
index d80db5d73..2850f666e 100644
--- a/Software/Embedded_SW/Embedded/Common/report/reportInit.c
+++ b/Software/Embedded_SW/Embedded/Common/report/reportInit.c
@@ -85,7 +85,8 @@ bool isReportActive(void)
}
uint32_t OpenLogFile(void)
{
- /*int len;
+#ifdef STORE_DEBUG_LOGS
+ int len;
uint32_t Bytes = 0;
LogFileHandle = my_malloc(sizeof(FIL));
if (LogFileHandle)
@@ -105,19 +106,22 @@ uint32_t OpenLogFile(void)
else
LogFresult = FR_INT_ERR;
- return LogFresult;*/
+ return LogFresult;
+#endif
return OK;
}
uint32_t CloseLogFile(void)
{
/* perform default error output */
- /*int len;
+#ifdef STORE_DEBUG_LOGS
+ int len;
uint32_t Bytes = 0;
len = usnprintf(RepMessage, 80, "Closing Log File %s %s",__DATE__, __TIME__);
LogFresult = f_write(LogFileHandle,RepMessage,len,&Bytes );
LogFresult = f_close(LogFileHandle);
LogFileHandle = NULL;
- return LogFresult;*/
+ return LogFresult;
+#endif
return OK;
}
@@ -130,7 +134,8 @@ uint32_t LogToFile(char *message, /* The formatted message
{
/* print user supplied error code */
-/* uint32_t Bytes = 0;
+#ifdef STORE_DEBUG_LOGS
+ uint32_t Bytes = 0;
int len;
if (LogFileHandle == NULL)
return OK;
@@ -141,7 +146,7 @@ uint32_t LogToFile(char *message, /* The formatted message
f_lseek(LogFileHandle, 0);
return LogFresult;
- */
+#endif
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h
index 7b0c4c215..291c94e9d 100644
--- a/Software/Embedded_SW/Embedded/DataDef.h
+++ b/Software/Embedded_SW/Embedded/DataDef.h
@@ -24,6 +24,10 @@
//#define DISPESER_TEST
//#define FPGA_WATCHDOG_DISABLE
+#ifndef WATCHDOG
+#define STORE_DEBUG_LOGS
+#endif
+//#define STORE_DEBUG_LOGS
//#define FOUR_WINDERS
#ifdef FOUR_WINDERS
#define BTSR_NO_FEEDER_TFU
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index 160c3a0b5..db4535e06 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -1006,30 +1006,33 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob)
}
}
}
- if ((AlarmState[Alarm_i].Status == true)&&(FoundReason == JOB_OK))
+ for (Alarm_i = 0;Alarm_i<NumOfSystemAlarms;Alarm_i++)
{
- if(AlarmItem[Alarm_i].Severity>=DEBUG_LOG_CATEGORY__Error)
+ if ((AlarmState[Alarm_i].Status == true)&&(FoundReason == JOB_OK))
{
- ReportWithPackageFilter(AlarmFilter,"an alarm existing before job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
- switch (AlarmItem[Alarm_i].EventType )
+ if(AlarmItem[Alarm_i].Severity>=DEBUG_LOG_CATEGORY__Error)
{
- case EVENT_TYPE__INSUFFICIENT_AIR_FLOW:
- case EVENT_TYPE__VOC_SENSOR_ALARM_TIME:
-#warning unmark to prevent job on voc alarm//case EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE:
- //case EVENT_TYPE__POWER_UP_BIT_FAILURE:
- FoundReason = JOB_WASTE_HANDLING_PROBLEM;
- AlarmId = Alarm_i;
- ReportWithPackageFilter(AlarmFilter,"an alarm preventing job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
- break;
- case EVENT_TYPE__ELECTRICAL_CABINET_OVERTEMPERATURE:
- case EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE:
- case EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE_2:
- FoundReason = JOB_TEMPERATURE_ALARM;
- AlarmId = Alarm_i;
- ReportWithPackageFilter(AlarmFilter,"machine internal over-temperature is preventing job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
- break;
- default:
- break;
+ ReportWithPackageFilter(AlarmFilter,"an alarm existing before job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
+ switch (AlarmItem[Alarm_i].EventType )
+ {
+ case EVENT_TYPE__INSUFFICIENT_AIR_FLOW:
+ case EVENT_TYPE__VOC_SENSOR_ALARM_TIME:
+ //case EVENT_TYPE__VOC_SENSOR_ALARM_SLOPE:
+ //case EVENT_TYPE__POWER_UP_BIT_FAILURE:
+ FoundReason = JOB_WASTE_HANDLING_PROBLEM;
+ AlarmId = Alarm_i;
+ ReportWithPackageFilter(AlarmFilter,"an alarm preventing job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
+ break;
+ case EVENT_TYPE__ELECTRICAL_CABINET_OVERTEMPERATURE:
+ case EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE:
+ case EVENT_TYPE__MACHINE_INTERNAL_OVERTEMPERATURE_2:
+ FoundReason = JOB_TEMPERATURE_ALARM;
+ AlarmId = Alarm_i;
+ ReportWithPackageFilter(AlarmFilter,"machine internal over-temperature is preventing job", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, AlarmItem[Alarm_i].Severity, AlarmItem[Alarm_i].DeviceId, 0);
+ break;
+ default:
+ break;
+ }
}
}
}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 879aa84a6..c196ea031 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -693,8 +693,6 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl
for (Dispenser_i = 0; Dispenser_i < n_dispensers; Dispenser_i++)
{
DispenserId = Dispensers[Dispenser_i]->index;
- if (DispenserId!=Dispenser_i)
- ReportWithPackageFilter(IDSFilter,"DispenserId!=Dispenser_i",__FILE__,__LINE__,DispenserId,RpWarning,(int)Dispenser_i,0);
HW_Motor_Id = DispenserIdToMotorId[DispenserId];
if (MotorsCfg[HW_Motor_Id].hardwaremotortype
!= DispenserIdToMotorId[DispenserId])
@@ -703,6 +701,8 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl
{
continue;
}
+ if (DispenserId!=Dispenser_i)
+ ReportWithPackageFilter(IDSFilter,"DispenserId!=Dispenser_i",__FILE__,__LINE__,DispenserId,RpWarning,(int)Dispenser_i,0);
//(Speed*uStep*PPR)/((2*PI*Dispenser_Radius)
segmentfirst_speed = Dispensers[Dispenser_i]->nanolitterpersecond
/ Dispensers[Dispenser_i]->nanoliterperpulse;
diff --git a/Software/Embedded_SW/Embedded/Software Release Notes.txt b/Software/Embedded_SW/Embedded/Software Release Notes.txt
index e0475b1cf..402a40e2e 100644
--- a/Software/Embedded_SW/Embedded/Software Release Notes.txt
+++ b/Software/Embedded_SW/Embedded/Software Release Notes.txt
@@ -1,3 +1,14 @@
+Embedded SW Release note - Version 1.5.3(4) - Pack 3
+=============================================================
+remove ErrFile.txt handling (storing logs while report is disconnected) - from release version
+add logs and indications for file handling
+fix idle problem (#4269)
+improve timing (QA - notice the COMM led blinking rate)
+add parameters setting (B,C) for head air flow calculation.
+remove low flow alarm during head flow recalibration
+fix screw going back at the end of job time
+bug #4240 (and others) - restart at the beginning of a job - resolved!
+
Embedded SW Release note - Version 1.5.3(3) - Pack 3
=============================================================
for QA
diff --git a/Software/Stubs Collection/Procedures/Set_Head_Type_With_DB.pproj b/Software/Stubs Collection/Procedures/Set_Head_Type_With_DB.pproj
new file mode 100644
index 000000000..2a8d146ca
--- /dev/null
+++ b/Software/Stubs Collection/Procedures/Set_Head_Type_With_DB.pproj
@@ -0,0 +1 @@
+{"$id":"1","Name":"Set_Head_Type","Visibility":"Public","Description":null,"Scripts":{"$id":"2","$values":[{"$id":"3","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Diagnostics;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\nusing System.IO;\r\nusing Tango.FSE.Common.SQL;\r\nusing Tango.PPC.Shared.SQL;\r\nusing Tango.FSE.Common.RemoteActions;\r\n\r\n\r\npublic class Program\r\n{\r\n private IProcedureContext context;\r\n private const Int32 I2C_ID = 3; //MCU_I2C3 \r\n private const Int32 TCA9548A_address = 0xE2;\r\n private const Int32 I2C_Slave_Add = 0xA0; //eeprom address - 32kByte \r\n private int Head_Mux_Channel_ID = 4; //Head MUX channel\r\n private const Int32 SerialNum = 0x01;\r\n\r\n public void OnExecute(IProcedureContext context)\r\n {\r\n this.context = context;\r\n\r\n int headType = context.GetInput<int>(\"headType\"); //0 flate ; 1 Arc\r\n Byte HeadTtpe = (byte)(headType == 0 ? 3 : 4); //3 flate ; 4 Arc\r\n context.WriteLine(HeadTtpe);\r\n\r\n\t\t//Firmware -------------------------------------------------------------------------------------------------------------\r\n context.UpdateProgress(\"Updating machine EEPROM entry...\");\r\n\r\n //enable_all_channel();\r\n enable_channel(Head_Mux_Channel_ID); // Chanel 0-7 => Disp0enser 0-7 \r\n\r\n\r\n adc_write(I2C_Slave_Add, 0x00, HeadTtpe);\r\n context.Sleep(10); //Sleep for 5 milli. - must! otherwise read 0xff (See data sheet )\r\n\r\n context.Write(\"\\nPage 0x00 #\");\r\n context.Write(0);\r\n context.Write(\"\\t- The Buffer is: \");\r\n adc_set_for_read_ch(I2C_Slave_Add, 0x00);\r\n //Thread.Sleep(1); //Sleep for 10 milli.\r\n adc_read_ch(I2C_Slave_Add);\r\n\r\n context.Sleep(1000);\r\n\r\n\r\n\t\t//Software -------------------------------------------------------------------------------------------------------------\r\n context.UpdateProgress(\"Updating machine global and local database entries...\");\r\n\r\n //Create the SQL command and direct it to affect both the local machine's database and the global Twine's database.\r\n IRemoteSqlProvider sql = context.GetService<IRemoteSqlProvider>();\r\n RemoteSqlCommand command = new RemoteSqlCommand();\r\n command.Mode = RemoteSqlCommandMode.Both;\r\n command.SQL = \"UPDATE MACHINES SET HEAD_TYPE = \" + headType + \" WHERE SERIAL_NUMBER = '\" + context.ConnectedMachine.SerialNumber + \"'\";\r\n RemoteSqlCommandResult result = sql.ExecuteSqlCommand(command);\r\n\r\n if (result.HasGlobalError || result.HasLocalError)\r\n {\r\n context.Fail(\"Could not update the machine's global or local entry.\\n\" + result.GlobalError + \"\\n\" + result.LocalError);\r\n }\r\n\r\n context.ShowInfo(\"The machine head type was updated successfully. Changes will take effect after system restart.\");\r\n }\r\n\r\n private int enable_channel(int Channel_ID)\r\n {\r\n uint Const_temp = 0x01;\r\n\r\n StubI2CWriteBytesRequest stubI2CWriteBytesRequest = new StubI2CWriteBytesRequest();\r\n stubI2CWriteBytesRequest.I2CId = I2C_ID;\r\n stubI2CWriteBytesRequest.SlaveAddress = TCA9548A_address;\r\n\r\n Const_temp = Const_temp << Channel_ID;\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(Const_temp);\r\n\r\n var response = context.Send<StubI2CWriteBytesResponse>(stubI2CWriteBytesRequest);\r\n\r\n return 1;\r\n }\r\n\r\n\r\n private int adc_write(uint I2C_Slave_Add, uint Page, Byte HeadTtpe)\r\n {\r\n StubI2CWriteBytesRequest stubI2CWriteBytesRequest = new StubI2CWriteBytesRequest();\r\n stubI2CWriteBytesRequest.I2CId = I2C_ID;\r\n stubI2CWriteBytesRequest.SlaveAddress = I2C_Slave_Add;\r\n\r\n UInt32 uInt32 = new UInt32();\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(0);//Byte 0 to write\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(Page);//Byte 0 to write\r\n //--------------------------------------------------------------\r\n\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(SerialNum);//S/N\r\n //stubI2CWriteBytesRequest.BytesTWrite.Add(0x03);//HEAD_TYPE_FLAT\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(HeadTtpe);//HEAD_TYPE_ARC\r\n\r\n var response = context.Send<StubI2CWriteBytesResponse>(stubI2CWriteBytesRequest);\r\n\r\n return 1;\r\n }\r\n\r\n private int adc_set_for_read_ch(uint I2C_Slave_Add, uint Page)\r\n {\r\n StubI2CWriteBytesRequest stubI2CWriteBytesRequest = new StubI2CWriteBytesRequest();\r\n stubI2CWriteBytesRequest.I2CId = I2C_ID;\r\n stubI2CWriteBytesRequest.SlaveAddress = I2C_Slave_Add;\r\n\r\n\r\n UInt32 uInt32 = new UInt32();\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(0);//Byte 0 to write\r\n stubI2CWriteBytesRequest.BytesTWrite.Add(Page);//Byte 0 to write\r\n\r\n var response = context.Send<StubI2CWriteBytesResponse>(stubI2CWriteBytesRequest);\r\n\r\n return 1;\r\n }\r\n\r\n private int adc_read_ch(uint I2C_Slave_Add)\r\n {\r\n StubI2CReadBytesRequest stubI2CReadBytesRequest = new StubI2CReadBytesRequest();\r\n stubI2CReadBytesRequest.I2CId = I2C_ID;\r\n stubI2CReadBytesRequest.SlaveAddress = I2C_Slave_Add + 1;\r\n stubI2CReadBytesRequest.NumberOfBytesToRead = 10; // Number of bytes to read\r\n\r\n var response1 = context.Send<StubI2CReadBytesResponse>(stubI2CReadBytesRequest);\r\n uint temph = 0;\r\n\r\n for (int i = 0; i < stubI2CReadBytesRequest.NumberOfBytesToRead; i++)\r\n {\r\n temph = response1.ReadBytes[i];\r\n context.WriteHex(temph, 2);\r\n }\r\n\r\n return 1;\r\n }\r\n\r\n}\r\n","Name":"Program.csx","IsEntryPoint":true},{"$id":"4","Code":"using System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading;\r\nusing System.Threading.Tasks;\r\nusing System.Drawing;\r\nusing Google.Protobuf;\r\nusing Tango.BL.Entities;\r\nusing Tango.BL.Enumerations;\r\nusing Tango.PMR.Stubs;\r\nusing Tango.PMR.Diagnostics;\r\nusing Tango.FSE.Common.Connection;\r\nusing Tango.FSE.Common.Diagnostics;\r\nusing Tango.FSE.Procedures;\r\n\r\npublic class Service\r\n{\r\n public double Calc(double a, double b)\r\n {\r\n return a + b;\r\n }\r\n}","Name":"Service.csx","IsEntryPoint":false}]},"Inputs":{"$id":"5","$values":[{"$id":"6","Type":"Selection","SelectionInputs":{"$id":"7","$values":[{"$id":"8","Name":"Flat","Value":"0"},{"$id":"9","Name":"Arc","Value":"1"}]},"DisplayName":"Head Type","Description":"Select the new machine head type","Key":"headType","Value":"0"}]},"Variables":{"$id":"10","$values":[]},"ReferenceAssemblies":{"$id":"11","$values":[{"$id":"12","File":"Tango.BL.dll","HintType":null},{"$id":"13","File":"Tango.FSE.Common.dll","HintType":null},{"$id":"14","File":"Tango.FSE.Procedures.dll","HintType":null},{"$id":"15","File":"Tango.Integration.dll","HintType":null},{"$id":"16","File":"Tango.PMR.dll","HintType":null},{"$id":"17","File":"Tango.Transport.dll","HintType":null},{"$id":"18","File":"mscorlib.dll","HintType":null},{"$id":"19","File":"System.Core.dll","HintType":null},{"$id":"20","File":"System.Drawing.dll","HintType":null},{"$id":"21","File":"System.Windows.Forms.dll","HintType":null},{"$id":"22","File":"Tango.PPC.Shared.dll","HintType":null}]},"Resources":{"$id":"23","$values":[]},"Dialogs":{"$id":"24","$values":[]},"ID":"85cac11e-4694-43f9-adfb-b010967ff32b","ApartmentState":"STA"} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs b/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
index 403967569..57501cc0f 100644
--- a/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
+++ b/Software/Stubs Collection/stubs/embeddedparametersbuild_w_cleaning.cs
@@ -21,7 +21,7 @@ public void OnExecute(StubManager stubManager)
string description = "";
ConfigurationParameters configurationParameters = new ConfigurationParameters();
-description += "Version 1.5.3.3";
+description += "Version 1.5.3.4";
configurationParameters.BreakSensorLimit = 10;
//how many samples to collect in diagnostics before sending