blob: 4d07cac71ccb1dcf187c4b9542b4d21b1f8f5ed6 (
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
|
using System;
using System.Text;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Tango.PMR.Stubs;
using Tango.Stubs;
public void OnExecute(StubManager stubManager)
{
stubHeatingTestRequest.DryerZone1Temp = 0;
stubHeatingTestRequest.DryerZone2Temp = 0;
HardwarePidControl hardwarePidControl = new HardwarePidControl();
hardwarePidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.FeederMotor;
hardwarePidControl.OutputProportionalPowerLimit = 0.5; //Maximal additional power
hardwarePidControl.OutputProportionalBand = 5;
hardwarePidControl.IntegralTime = 7000; //Ki
hardwarePidControl.DerivativeTime = 0; //Kd
hardwarePidControl.SensorCorrectionAdjustment = 0;
hardwarePidControl.SensorMinValue = 0;
hardwarePidControl.SensorMaxValue = 0;
hardwarePidControl.SetPointRampRateorSoftStartRamp = 100; //Ki divider
hardwarePidControl.SetPointControlOutputRate = 0;
hardwarePidControl.ControlOutputType = 0.001; ////Dt
hardwarePidControl.SsrControlOutputType = 0;
hardwarePidControl.OutputOnOffHysteresisValue = 100; //Kp divider
hardwarePidControl.ProcessVariableSamplingRate = 0;
hardwarePidControl.PvInputFilterFactorMode = 6; //averaging the readouts / number of samples
hardwarePidControl.OutputProportionalCycleTime = 0;
hardwarePidControl.AcHeatersHalfCycleTime = 0;
hardwarePidControl.ProportionalGain = 5000; //Kp
hardwarePidControl.PidActive = false;
hardwarePidControl.Epsilon = 0;
stubHeatingTestRequest.HardwarePidControl1 = hardwarePidControl1;
StubHeatingTestPollRequest stubHeatingTestPollRequest = new StubHeatingTestPollRequest();
var response = stubManager.Run<StubHeatingTestResponse>(stubHeatingTestRequest);
}
|