aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Properties/Resources.Designer.cs
blob: bb1ab2f73058abab0c838fd328fc933efab30daf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.MachineStudio.Statistics.Properties {
    
    
    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }
        
        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if ((resourceMan == null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.Statistics.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
    }
}
class="p">, MaxHeatersStates }HEATERS_STATES_ENUM; typedef enum { HeatersCold, HeatersAtPIDStrip, HeatersOverHeat, HeatersOnTest }HEATERS_EVENTS_ENUM; /******************** GLOBAL PARAMETERS ********************************************/ HeaterPIDControlConfig HeaterControl[MAX_HEATERS_NUM] = {0,0,0,0,0,0,0,0,0,0,0,0}; bool AcHeaterConfigured[MAX_AC_HEATERS] = {0,0,0}; int NumberOFSlicesInUse = 0; uint32_t MillisecondsPerChange = 0; bool FastHeating = 1; /******************** CODE ********************************************/ /* * HeatersInit * called by: General Hardware Init * initialized all global data */ uint32_t Heaters_Init(void) { int i; //ROM_TimerDisable(Heater_timerBase, TIMER_A); FPGA_SensorInitConfig(); memset(HeaterControl,0,sizeof(HeaterControl)); for (i = 0;i<MAX_HEATERS_NUM; i++) DeActivateHeater(i); return OK; } uint32_t HeaterConfigRequestMessage(HardwarePidControl* request) { //uint32_t status = OK; HardwarePidControlType HeaterId; HeaterId = request->hardwarepidcontroltype; //int ValidationError = 0; if (HeaterId< MAX_HEATERS_NUM) { HeaterControl[HeaterId].configured = true; HeaterControl[HeaterId].id = HeaterId; HeaterControl[HeaterId].outputproportionalpowerlimit = request->outputproportionalpowerlimit; HeaterControl[HeaterId].outputproportionalband = request->outputproportionalband; HeaterControl[HeaterId].IntegralErrorMultiplier = request->setpointramprateorsoftstartramp; HeaterControl[HeaterId].ProportionalErrorMultiplier = request->outputonoffhysteresisvalue; if (HeaterId == HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature) { HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain].sensormaxvalue = request->sensormaxvalue*100; HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain].sensorminvalue = request->sensorminvalue*100; HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary].sensormaxvalue = request->sensormaxvalue*100; HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary].sensorminvalue = request->sensorminvalue*100; } HeaterControl[HeaterId].sensormaxvalue = 0; HeaterControl[HeaterId].sensorminvalue = 0; HeaterControl[HeaterId].kp = request->proportionalgain; HeaterControl[HeaterId].ki = request->integraltime; HeaterControl[HeaterId].kd = request->derivativetime; HeaterControl[HeaterId].dt = request->controloutputtype; HeaterControl[HeaterId].epsilon = request->epsilon; HeaterControl[HeaterId].pidactive = request->pidactive; //HeaterControl[HeaterId].sensorcorrectionadjustment = request->sensorcorrectionadjustment; //sensorminvalue,sensormaxvalue are used for the dryer heater as internal heater control //HeaterControl[HeaterId].sensortypeandsetpointlimits = request->sensortypeandsetpointlimits; //HeaterControl[HeaterId].setpointramprateorsoftstartramp = request->setpointramprateorsoftstartramp; //HeaterControl[HeaterId].setpointcontroloutputrate = request->setpointcontroloutputrate; //HeaterControl[HeaterId].ssrcontroloutputtype = request->ssrcontroloutputtype; //HeaterControl[HeaterId].outputonoffhysteresisvalues = request->outputonoffhysteresisvalue; //HeaterControl[HeaterId].processvariablesamplingrate = request->processvariablesamplingrate; //HeaterControl[HeaterId].pvinputfilterfactormode = request->pvinputfilterfactormode; if (HeaterId < MAX_AC_HEATERS) AcHeaterConfigured[HeaterId] = true; return OK; } return ERROR; } /* * HeaterConfigSetSharedHeatersParams - prepare the time slices for A/C heaters co-ordinated operation * called by the general hardware HWConfigurationFunc * parameters - the cycle time for the coordinated operation, the size (in MCU cycles) of a single step. */ uint32_t HeaterConfigSetSharedHeatersParams(uint32_t outputproportionalcycletime, uint32_t outputproportionalsinglestep) { int Slice_i; int Heater1000Slices,Heater200aSlices /*,Heater200bSlices Currently both 200W heaters will work together*/; //A/C Heaters Cycle time in milliseconds - one for all heaters OutputProportionalCycleTime = outputproportionalcycletime; //A/C Heaters step size from one decision point to another - in cpu clocks. 120000 = 1 millisecod OutputProportionalSingleStep = outputproportionalsinglestep; // calculate how many milliseconds is in each operating cycle (should be an integer number) MillisecondsPerChange = OutputProportionalSingleStep/120000; // calculate how many time slices are used. the total cycle time / the length of one operating cycle. (one added to put a time gap??? TBD) NumberOFSlicesInUse = (OutputProportionalCycleTime/MillisecondsPerChange); if (NumberOFSlicesInUse > MAX_TIMESLICES ) { LOG_ERROR (NumberOFSlicesInUse, "NumberOFSlicesInUse too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } // all numbers are rounded down. better to have carefully calculated numbers Heater1000Slices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain].outputproportionalpowerlimit * NumberOFSlicesInUse / 100; Heater200aSlices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary].outputproportionalpowerlimit * NumberOFSlicesInUse / 100; if ((Heater1000Slices + Heater200aSlices +2)>NumberOFSlicesInUse) { LOG_ERROR (NumberOFSlicesInUse, "proportional time slices too high too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } //mark the time slices for heaters operation as empty / Heater1000 / Heater 200 memset (TimeSliceAllocation,0xFF,sizeof(TimeSliceAllocation)); for (Slice_i = 0; Slice_i < Heater1000Slices;Slice_i++ ) TimeSliceAllocation[Slice_i] = HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain; for (Slice_i = Heater1000Slices+1; Slice_i <= Heater1000Slices+Heater200aSlices;Slice_i++ ) TimeSliceAllocation[Slice_i] = HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary; return OK; } /* * HeaterRecalculateSharedHeatersParams - * * parameters - the cycle time for the coordinated operation, the size (in MCU cycles) of a single step. */ uint32_t HeaterRecalculateSharedHeatersParams(uint32_t deviceId, uint32_t new_outputproportionalpowerlimit) { int Slice_i; int Heater1000Slices,Heater200aSlices /*,Heater200bSlices Currently both 200W heaters will work together*/; if (NumberOFSlicesInUse > MAX_TIMESLICES ) { LOG_ERROR (NumberOFSlicesInUse, "NumberOFSlicesInUse too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } // all numbers are rounded down. better to have carefully calculated numbers HeaterControl[deviceId].outputproportionalpowerlimit = new_outputproportionalpowerlimit;///100; Heater1000Slices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain].outputproportionalpowerlimit * NumberOFSlicesInUse / 100; Heater200aSlices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary].outputproportionalpowerlimit * NumberOFSlicesInUse / 100; //#warning temporary disable time slice control as we are working with one heater in run time /* if ((Heater1000Slices + Heater200aSlices +2)>NumberOFSlicesInUse) { LOG_ERROR (NumberOFSlicesInUse, "proportional time slices too high too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } */ //mark the time slices for heaters operation as empty / Heater1000 / Heater 200 memset (TimeSliceAllocation,0xFF,sizeof(TimeSliceAllocation)); for (Slice_i = 0; Slice_i < Heater1000Slices;Slice_i++ ) TimeSliceAllocation[Slice_i] = HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain; for (Slice_i = Heater1000Slices+1; Slice_i <= Heater1000Slices+Heater200aSlices;Slice_i++ ) TimeSliceAllocation[Slice_i] = HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary; return OK; } /* * HeaterRecalculateHeaterParams - prepare the time slices for D/C heaters operation * called by the general hardware HWConfigurationFunc * parameters - the cycle time for the coordinated operation, the size (in MCU cycles) of a single step. */ uint32_t HeaterRecalculateHeaterParams(uint32_t deviceId, uint32_t new_outputproportionalpowerlimit) { // calculate how many milliseconds is in each operating cycle (should be an integer number) //uint32_t MillisecondsPerChange = OutputProportionalSingleStep/120000; // calculate how many time slices are used. the total cycle time / the length of one operating cycle. (one added to put a time gap??? TBD) //NumberOFSlicesInUse = (OutputProportionalCycleTime/MillisecondsPerChange); if (NumberOFSlicesInUse > MAX_TIMESLICES ) { LOG_ERROR (NumberOFSlicesInUse, "NumberOFSlicesInUse too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } // all numbers are rounded down. better to have carefully calculated numbers if (new_outputproportionalpowerlimit > HeaterControl[deviceId].outputproportionalpowerlimit) new_outputproportionalpowerlimit = HeaterControl[deviceId].outputproportionalpowerlimit; //mark the time slices for heaters operation as empty / Heater1000 / Heater 200 DCTimeSliceAllocation[deviceId] = (new_outputproportionalpowerlimit/*/100*/ * NumberOFSlicesInUse) / 100; return OK; }