Bläddra i källkod

根据最新提供的错误码增加对应的错误解析!

lwk 3 dagar sedan
förälder
incheckning
0ed2d70a37
1 ändrade filer med 123 tillägg och 174 borttagningar
  1. 123 174
      Generator/PSG/CCOS.Dev.Generator.PSG_HR/CCOS.Dev.Generator.PSG_HR.cpp

+ 123 - 174
Generator/PSG/CCOS.Dev.Generator.PSG_HR/CCOS.Dev.Generator.PSG_HR.cpp

@@ -1636,82 +1636,47 @@ void nsGEN::PSGHRDevice::OnCallBack()
 		if (nValue != 0)
 		{
 			std::unordered_map<std::string, std::string> errorMessages = {
-	            {"100", "AEC Back-up Timer - Exposure Terminated"},
-	            {"101", "AEC mAs Exceeded - Exposure Terminated"},
-	            {"102", "Door Interlock FERROR"},
-	            {"103", "Calibration Data Corrupt FERROR"},
-	            {"104", "AEC Data Corrupt FERROR"},
-	            {"105", "Receptor Data Corrupt FERROR"},
-	            {"106", "Tube Data Corrupt FERROR"},
-	            {"107", "Generator Limit Data Corrupt FERROR"},
-	            {"108", "mA Correction Data Corrupt FERROR"},
-	            {"109", "Not Enabled FERROR"},
-	            {"110", "AEC Feedback FERROR - No Feedback Signal Detected"},
-	            {"111", "EXP_SW Signal Active in Standby State"},
-	            {"112", "Calibration FERROR - No mA"},
-	            {"113", "Calibration FERROR - Maximum Filament Current Exceeded"},
-	            {"114", "MA During Exposure too High"},
-	            {"115", "MA During Exposure too Low"},
-	            {"116", "Generator KW Limit"},
-	            {"117", "Generator KV Limit"},
-	            {"118", "Generator MA Limit"},
-	            {"119", "Generator MS Limit"},
-	            {"120", "Generator MAS Limit"},
-	            {"121", "Tube KW Limit"},
-	            {"122", "Tube KV Limit"},
-	            {"123", "Tube MA Limit"},
-	            {"124", "Tube MAS Limit"},
-	            {"125", "Parameter Limit"},
-	            {"126", "Manually Terminated Exposure"},
-	            {"127", "Preparation Time-out FERROR prep time is over 30s or 60s"},
-	            {"128", "Prep Input Active During Initialization Phase"},
-	            {"129", "X-ray Input Active During Initialization Phase"},
-	            {"130", "No Fields Selected in AEC mode"},
-	            {"131", "Generator AEC Density Limit"},
-	            {"132", "Calibration FERROR - Manually Terminated"},
-	            {"133", "EEPROM Communication FERROR"},
-	            {"134", "RTC Communication FERROR"},
-	            {"135", "AEC Channel FERROR"},
-	            {"136", "Anode Communication FERROR"},
-	            {"137", "EXP_OK TimeOut"},
-	            {"138", "KV TimeOut"},
-	            {"139", "Mosfet Temperature Limit Exceeded"},
-	            {"140", "HU Power Limit"},
-	            {"141", "HU Power Warning"},
-	            {"142", "Small Focus Disable"},
-	            {"143", "Large Focus Disable"},
-	            {"144", "Low Speed Disable"},
-	            {"145", "High Speed Disable"},
-	            {"146", "Anode Heat Warning Exceeded"},
-	            {"147", "Anode Heat Limit Exceeded"},
-	            {"148", "KV Unbalance"},
-	            {"149", "Thermal Switch Interlock FERROR"},
-	            {"150", "Emergency FERROR"},
-	            {"151", "KV Correction Data Corrupt FERROR"},
-				{"152", "Generator Tank Power Limit"},
-				{"153", "AEC Standby Signal FERROR"},
-				{"154", "DCBUS Calibration Data Corrupt FERROR"},
-				{"155", "Fluoro Timer Terminated "},
-				{"156", "Fluoro Timer Terminated "},
-				{"157", "Power Off In X - Ray State"},
-				{"158", "DAP Data Corrupt  "},
-				{"159", "Auto APR TimeOut "},
-				{"160", "ERR_FLUORO_ABSFDBNONE"},
-	            {"200", "FLASH LOCK"},
-	            {"201", "FLASH REVID_INVALID"},
-	            {"202", "FLASH ADDR_INVALID"},
-	            {"203", "FLASH INCORRECT_PARTID"},
-	            {"204", "FLASH API_SILICON_MISMATCH"},
-	            {"205", "FLASH ERASE ERROR"},
-	            {"206", "FLASH FAIL_PROGRAM"},
-	            {"207", "FLASH FAIL_ZERO_BIT_ERROR"},
-	            {"208", "FLASH FAIL_VERIFY"},
-	            {"209", "FLASH BUSY"},
-	            {"210", "FLASH_PROGRM_ADDR_ERROR"},
-	            {"211", "UPDATA_VERSION_ERROR"},
-	            {"212", "UPDATA SN_ERROR"},
-	            {"213", "UPDATA_BYTE_COUNT_ERROR"},
-	            {"214", "UPDATA_CHECKSUM_ERROR"}
+	            // ER001-ER075: Rotating Anode Errors
+	            {"001", "Rotating Anode Not Sampled on Time"},
+	            {"002", "Rotating Anode Sampled on Fault"},
+	            {"003", "Rotating Anode Communication Fault"},
+	            {"004", "Rotating Anode Missing Fault"},
+	            {"016", "Rotating Anode Total Calibration Flag"},
+	            {"017", "Rotating Anode A Phase Over Current"},
+	            {"018", "Rotating Anode B Phase Over Current"},
+	            {"019", "Rotating Anode C Phase Over Current"},
+	            {"020", "Rotating Anode Capacitor Voltage Average Over Voltage"},
+	            {"021", "Rotating Anode Capacitor Voltage Average Under Voltage"},
+	            {"022", "Rotating Anode IGBT Over Temperature"},
+	            {"023", "Rotating Anode Bypass Over Temperature"},
+	            {"024", "Rotating Anode Heat Sink Over Temperature"},
+	            {"027", "Rotating Anode A Phase Over Current"},
+	            {"028", "Rotating Anode B Phase Over Current"},
+	            {"029", "Rotating Anode C Phase Over Current"},
+	            {"030", "Rotating Anode Capacitor Instant Over Voltage"},
+	            {"031", "Rotating Anode Capacitor Instant Under Voltage"},
+	            {"032", "Rotating Anode Over Current"},
+	            {"033", "Bus Current 1 Over Limit, Exposure Interrupted"},
+	            {"034", "Bus Current 2 Over Limit, Exposure Interrupted"},
+	            {"035", "Filament Power Board Not Connected"},
+	            {"036", "Filament Current 1 Over Limit"},
+	            {"037", "Filament Current 2 Over Limit"},
+	            {"038", "Anode mA Over Limit, Exposure Interrupted"},
+	            {"039", "Cathode mA Over Limit, Exposure Interrupted"},
+	            {"040", "Anode kV Over Limit, Exposure Interrupted"},
+	            {"041", "Cathode kV Over Limit, Exposure Interrupted"},
+	            {"042", "High Voltage Arc or Ball Gap Fire, Exposure Interrupted"},
+	            {"044", "Bus Current 1 Over Limit, Exposure Ended"},
+	            {"046", "Bus Current 2 Over Limit, Exposure Ended"},
+	            {"048", "High Voltage Oil Tank Not Connected"},
+	            {"065", "High Voltage Oil Tank Start-up Error, No Line Voltage"},
+	            {"066", "High Voltage Oil Tank No Line Voltage Interrupt Low"},
+	            {"067", "Filament Parameter Breach"},
+	            {"068", "Filament Parameter Short or Filament Calibration Data Exception"},
+	            {"069", "Filament Preheating, Filament Current Low"},
+	            {"070", "Bus Voltage Low 2"},
+	            {"074", "Hardware Total Fault"},
+	            {"075", "Door Interlock"}
 			};
 
 			char ErrorCode[20];
@@ -1754,24 +1719,10 @@ void nsGEN::PSGHRDevice::OnCallBack()
 		if (nValue != 0)
 		{
 			std::unordered_map<std::string, std::string> errorMessages = {
-				{"001", "Generator CPU Real Time Clock FERROR"},
-				{"002", "Main Contactor FERROR"},
-				{"003", "Rotor Fault"},
-				{"004", "DC Bus Voltage too Low"},
-				{"005", "DC Bus Voltage too High"},
-				{"006", "Filament Adjust FERROR"},
-				{"007", "Filament PowerBoard Not Connected"},
-				{"008", "Filament Short Circuit"},
-				{"019", "Filament Overcurrent"},
-				{"010", "Anode Overcurrent"},
-				{"011", "Cathode Overcurrent"},
-				{"012", "Anode Overvoltage"},
-				{"013", "Cathode Overvoltage"},
-				{"014", "ARC"},
-				{"015", "Short Current 1"},
-				{"016", "Short Current 2"},
-				{"017", "Short Current A"},
-				{"018", "Short Current B"}
+				// EL001-EL003: Critical Errors
+				{"001", "Contactor Fault"},
+				{"002", "Charging Circuit Abnormal"},
+				{"003", "Storage Chip Damaged"}
 			};
 
 
@@ -1866,84 +1817,84 @@ void nsGEN::PSGHRDevice::OnCallBack()
 		if (nValue != 0)
 		{
 			std::unordered_map<std::string, std::string> errorMessages = {
-				{"001", "Rotating anode protection parameters are incorrectly configured"},
-				{"002", "Press emergency stop of high voltage generator"},
-				{"003", "The first level hand brake is not triggered, and the second level hand brake is triggered"},
-				{"004", "The first level hand brake is pressed during the wake - up or startup process of the high - voltage generator."},
-                {"005", "The second level hand brake is pressed during the wake - up or startup process of the high - voltage generator."},
-                {"006", "Low battery power of the high - voltage generator, please recharge."},
-                {"007", "Anode thermal capacity exceeds the warning value."},
-                {"008", "Exposure time interval is too short, please wait for exposure."},
-                {"009", "Parameter adjustment is prohibited during exposure."},
-                {"010", "High - voltage generator is not ready, please confirm the status."},
-                {"011", "The oil tank temperature of the high - voltage generator exceeds the warning value."},
-                {"012", "Training cannot be conducted in this state."},
-                {"013", "The tube current of the high voltage generator is low."},
-                {"014", "The PFC module of the high voltage generator works abnormally."},
-                {"015", "Battery output power limits for high voltage generators."},
-                {"016", "The battery of the high voltage generator is charging."},
-                {"017", "The mA parameter of the high voltage generator exceeds the maximum tube value."},
-                {"018", "The kV parameter of the high voltage generator exceeds the limit value."},
-                {"019", "The mA parameter of the high voltage generator exceeds the limit value."},
-                {"020", "The ms parameter of the high voltage generator exceeds the limit value."},
-                {"021", "The mAs parameter of the high voltage generator exceeds the limit value."},
-                {"022", "Filament selection parameter exceeds the limit."},
-                {"023", "Anode rotation speed selection parameter exceeds the limit."},
-                {"024", "The exposure technical parameters of the high voltage generator exceed the limits."},
-                {"025", "AEC density parameter exceeds the limit."},
-                {"026", "AEC field selection parameter exceeds the limit."},
-                {"027", "AEC channel parameter exceeds the limit."},
-                {"028", "AEC sensitivity parameter exceeds the limit."},
-                {"029", "High - voltage generator power exceeds the limit."},
-                {"030", "Tube power exceeds the limit."},
-                {"031", "The frame rate parameter of the high voltage generator exceeds the limit value."},
-                {"032", "Exposure parameter exceeds the high - voltage generator energy storage limit."},
-                {"033", "High voltage generator battery pack alarm."},
-                {"035", "Foot brake signal is pressed during the wake - up or startup process of the high - voltage generator."},
-                {"036", "Cumulative fluoroscopy time alarm."},
-                {"037", "The console of the high voltage generator is not connected, please open the console."},
-                {"038", "Tube sleeve thermal capacity exceeds the warning value."},
-                {"049", "Bus voltage of the high - voltage generator exceeds the limit."},
-                {"050", "High - voltage generator does not support this exposure mode."},
-                {"051", "The rotation speed of the rotating anode does not meet the exposure requirements."},
-                {"052", "The second level hand brake is not pressed within the specified time."},
-                {"053", "Interlock 1 is effective during the exposure process of the high - voltage generator."},
-                {"054", "Timeout for feedback signal in flat panel mode."},
-                {"055", "The kV establishment timeout of the high voltage generator."},
-                {"056", "Anode thermal capacity exceeds the limit."},
-                {"057", "Filament calibration data abnormality."},
-                {"058", "Tube current is too low during training."},
-                {"059", "Release hand brake prematurely during exposure."},
-                {"060", "AEC feedback abnormality."},
-                {"061", "Inverter temperature of the high - voltage generator exceeds the limit."},
-                {"062", "kV is too low during exposure, exposure abnormality aborted."},
-                {"063", "kV is too high during exposure, exposure abnormality aborted."},
-                {"064", "Oil temperature of the high - voltage generator exceeds the limit."},
-                {"065", "Tube sleeve thermal capacity exceeds the limit."},
-                {"066", "The current exposure parameters of the high voltage generator exceed the heat capacity limit."},
-                {"068", "mA is too high during exposure, exposure abnormality aborted."},
-                {"069", "The DRVEN enable of the high voltage generator to establish a timeout."},
-                {"070", "Interruption in communication with the rotating anode."},
-                {"071", "Emergency stop is pressed during exposure."},
-                {"072", "The battery pack of the high voltage generator is faulty."},
-                {"073", "Resonant current exceeds the limit, exposure abnormality aborted(software)."},
-                {"074", "Anode kV exceeds the limit, exposure abnormality aborted(software)."},
-                {"075", "Cathode kV exceeds the limit, exposure abnormality aborted(software)."},
-                {"076", "Filament current exceeds the limit(software)."},
-                {"078", "Oil tank power limit of the high - voltage generator."},
-                {"080", "Deviation of anode kV and cathode kV exceeds the limit, exposure abnormality aborted."},
-                {"081", "Power exceeds the limit during exposure, exposure abnormality aborted."},
-                {"082", "The external synchronization signal of the high voltage generator has timed out."},
-                {"083", "Fan fault in high voltage generator."},
-                {"084", "High voltage generator InterLock1 effective."},
-                {"085", "High voltage generator InterLock2 effective."},
-                {"087", "Release foot brake prematurely during exposure."},
-                {"088", "Foot brake signal abnormality."},
-                {"089", "The DA chip of the high voltage generator is abnormal."},
-                {"090", "Timeout for cumulative fluoroscopy time."},
-                {"091", "The external discharge line of the high voltage generator enables the signal to timeout."},
-                {"092", "XRAYReady invalid."},
-                {"093", "High voltage generator during exposure interlock 2 effective."}
+				{"001", "Rotating Anode Protection Parameters Incorrectly Configured"},
+				{"002", "Emergency Stop Pressed"},
+				{"003", "First Level Hand Brake Not Triggered, Second Level Hand Brake Triggered"},
+				{"004", "High Voltage Generator First Level Hand Brake Pressed During Startup"},
+				{"005", "High Voltage Generator Second Level Hand Brake Pressed During Startup"},
+				{"006", "High Voltage Generator Low Battery, Please Recharge"},
+				{"007", "Anode Thermal Capacity Warning Exceeded"},
+				{"008", "Exposure Time Interval Too Short, Please Wait"},
+				{"009", "Parameter Adjustment Prohibited During Exposure"},
+				{"010", "High Voltage Generator Not Ready, Please Confirm Status"},
+				{"011", "High Voltage Generator Oil Tank Temperature Warning Exceeded"},
+				{"012", "Training Cannot Be Conducted In This State"},
+				{"013", "Tube Current Low"},
+				{"014", "PFC Module Works Abnormally"},
+				{"015", "Battery Output Power Limit"},
+				{"016", "Battery Charging"},
+				{"017", "mA Parameter Exceeds Maximum Tube Value"},
+				{"018", "kV Parameter Exceeds Limit"},
+				{"019", "mA Parameter Exceeds Limit"},
+				{"020", "ms Parameter Exceeds Limit"},
+				{"021", "mAs Parameter Exceeds Limit"},
+				{"022", "Filament Selection Parameter Exceeds Limit"},
+				{"023", "Anode Rotation Speed Selection Parameter Exceeds Limit"},
+				{"024", "Exposure Technical Parameters Exceed Limits"},
+				{"025", "AEC Density Parameter Exceeds Limit"},
+				{"026", "AEC Field Selection Parameter Exceeds Limit"},
+				{"027", "AEC Channel Parameter Exceeds Limit"},
+				{"028", "AEC Sensitivity Parameter Exceeds Limit"},
+				{"029", "High Voltage Generator Power Exceeds Limit"},
+				{"030", "Tube Power Exceeds Limit"},
+				{"031", "Frame Rate Parameter Exceeds Limit"},
+				{"032", "Exposure Parameter Exceeds Energy Storage Limit"},
+				{"033", "Battery Pack Alarm"},
+				{"035", "High Voltage Generator Foot Brake Pressed During Startup"},
+				{"036", "Cumulative Fluoroscopy Time Alarm"},
+				{"037", "Console Not Connected, Please Open Console"},
+				{"038", "Tube Sleeve Thermal Capacity Warning Exceeded"},
+				{"049", "Bus Voltage Exceeds Limit"},
+				{"050", "High Voltage Generator Does Not Support This Exposure Mode"},
+				{"051", "Rotating Anode Speed Does Not Meet Exposure Requirements"},
+				{"052", "Second Level Hand Brake Not Pressed Within Specified Time"},
+				{"053", "High Voltage Generator Interlock 1 Effective During Exposure"},
+				{"054", "Flat Panel Mode Feedback Signal Timeout"},
+				{"055", "kV Establishment Timeout"},
+				{"056", "Anode Thermal Capacity Limit Exceeded"},
+				{"057", "Filament Calibration Data Abnormality"},
+				{"058", "Tube Current Too Low During Training"},
+				{"059", "Hand Brake Released Prematurely During Exposure"},
+				{"060", "AEC Feedback Abnormality"},
+				{"061", "Inverter Temperature Exceeds Limit"},
+				{"062", "kV Too Low During Exposure, Exposure Aborted"},
+				{"063", "kV Too High During Exposure, Exposure Aborted"},
+				{"064", "Oil Temperature Exceeds Limit"},
+				{"065", "Tube Sleeve Thermal Capacity Limit Exceeded"},
+				{"066", "Current Exposure Parameters Exceed Heat Capacity Limit"},
+				{"068", "mA Too High During Exposure, Exposure Aborted"},
+				{"069", "DRVEN Enable Timeout"},
+				{"070", "Rotating Anode Communication Interrupted"},
+				{"071", "Emergency Stop Pressed During Exposure"},
+				{"072", "Battery Pack Fault"},
+				{"073", "Resonant Current Exceeds Limit, Exposure Aborted (Software)"},
+				{"074", "Anode kV Exceeds Limit, Exposure Aborted (Software)"},
+				{"075", "Cathode kV Exceeds Limit, Exposure Aborted (Software)"},
+				{"076", "Filament Current Exceeds Limit (Software)"},
+				{"078", "Oil Tank Power Limit"},
+				{"080", "Anode kV and Cathode kV Deviation Exceeds Limit, Exposure Aborted"},
+				{"081", "Power Exceeds Limit During Exposure, Exposure Aborted"},
+				{"082", "External Synchronization Signal Timeout"},
+				{"083", "Fan Fault"},
+				{"084", "InterLock1 Effective"},
+				{"085", "InterLock2 Effective"},
+				{"087", "Foot Brake Released Prematurely During Exposure"},
+				{"088", "Foot Brake Signal Abnormality"},
+				{"089", "DA Chip Abnormal"},
+				{"090", "Cumulative Fluoroscopy Time Timeout"},
+				{"091", "External Discharge Line Enable Signal Timeout"},
+				{"092", "X-RAY Ready Invalid"},
+				{"093", "Interlock 2 Effective During Exposure"}
 			};		
 
 			char ErrorCode[20];
@@ -2479,12 +2430,10 @@ bool nsGEN::PSGHRDriver::ReConnection()
 	if (erCode == SCF_SUCCEED)
 	{
 		Sleep(1000);
-		// �����������ݽ��ջص�
 		m_scfWrapper->SetDataReceivedCallback([this](const char* data, uint32_t length) {
 			this->Dequeue(data, length);
 			});
 
-		// �����Զ�����
 		m_scfWrapper->StartAutoReceive();
 		return true;
 	}