diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-04 15:57:56 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-04 15:57:56 +0300 |
| commit | fdf45caba5c70e4a368ab5fc62398ac3cccc697c (patch) | |
| tree | c60b9c924b085ff8af3f614af22b852dd3b7c22a /Software/Stubs Collection/stubs/addedfiles | |
| parent | 1246a201b4600899b4e11243ffb9ff300674750d (diff) | |
| download | Tango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.tar.gz Tango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.zip | |
Stubs collection
Diffstat (limited to 'Software/Stubs Collection/stubs/addedfiles')
11 files changed, 2461 insertions, 0 deletions
diff --git a/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs new file mode 100644 index 000000000..f815c1cd4 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs @@ -0,0 +1,62 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + +HardwarePidControl DryerHeater1000 = new HardwarePidControl(); +DryerHeater1000.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W; +DryerHeater1000.OutputProportionalBand = 1; +DryerHeater1000.SensorCorrectionAdjustment = 2.0; +DryerHeater1000.IntegralTime = 0.01; +DryerHeater1000.OutputProportionalPowerLimit = 100; +DryerHeater1000.IntegralTime = 5; +DryerHeater1000.DerivativeTime = 0; +DryerHeater1000.SensorCorrectionAdjustment = 0; +DryerHeater1000.SensorMinValue = 2; +DryerHeater1000.SensorMaxValue = 250; +DryerHeater1000.SetPointRampRateorSoftStartRamp = 0; +DryerHeater1000.SetPointControlOutputRate = 4; +DryerHeater1000.ControlOutputType = 0; +DryerHeater1000.SsrControlOutputType = 0; +DryerHeater1000.OutputOnOffHysteresisValue = 0; +DryerHeater1000.ProcessVariableSamplingRate = 1000; +DryerHeater1000.PvInputFilterFactorMode = 4; +DryerHeater1000.OutputProportionalCycleTime = 0; +DryerHeater1000.AcHeatersHalfCycleTime = 0; +DryerHeater1000.ProportionalGain = 20.0; + +HardwarePidControl DryerHeater200w1 = new HardwarePidControl(); +DryerHeater200w1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1; +DryerHeater200w1.OutputProportionalPowerLimit = 0;//small heater is OFF after initial heating +DryerHeater200w1.OutputProportionalBand = 1; +DryerHeater200w1.SensorCorrectionAdjustment = 0.5; +DryerHeater200w1.IntegralTime = 0.1; +DryerHeater200w1.OutputProportionalPowerLimit = 0; +DryerHeater200w1.OutputProportionalBand = 5; +DryerHeater200w1.IntegralTime = 5; +DryerHeater200w1.DerivativeTime = 0; +DryerHeater200w1.SensorCorrectionAdjustment = 0; +DryerHeater200w1.SensorMinValue = 0; +DryerHeater200w1.SensorMaxValue = 0; +DryerHeater200w1.SetPointRampRateorSoftStartRamp = 0; +DryerHeater200w1.SetPointControlOutputRate = 4; +DryerHeater200w1.ControlOutputType = 0; +DryerHeater200w1.SsrControlOutputType = 0; +DryerHeater200w1.OutputOnOffHysteresisValue = 0; +DryerHeater200w1.ProcessVariableSamplingRate = 1000; +DryerHeater200w1.PvInputFilterFactorMode = 4; +DryerHeater200w1.OutputProportionalCycleTime = 0; +DryerHeater200w1.AcHeatersHalfCycleTime = 0; +DryerHeater200w1.ProportionalGain = 20.0; + +//hardwareConfiguration.PidControls.Add(DryerHeater1000); +//hardwareConfiguration.PidControls.Add(DryerHeater200w1); diff --git a/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs new file mode 100644 index 000000000..015dc7be6 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs @@ -0,0 +1,134 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + +HardwarePidControl HeadZ1Heater = new HardwarePidControl(); +HeadZ1Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1; +HeadZ1Heater.OutputProportionalBand = 1; +HeadZ1Heater.SensorCorrectionAdjustment = 2.0; +HeadZ1Heater.IntegralTime = 0.01; +HeadZ1Heater.OutputProportionalPowerLimit = 80; +HeadZ1Heater.IntegralTime = 5; +HeadZ1Heater.DerivativeTime = 0; +HeadZ1Heater.SensorCorrectionAdjustment = 0; +HeadZ1Heater.SensorMinValue = 0; +HeadZ1Heater.SensorMaxValue = 1.0; +HeadZ1Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ1Heater.SetPointControlOutputRate = 4; +HeadZ1Heater.ControlOutputType = 0; +HeadZ1Heater.SsrControlOutputType = 0; +HeadZ1Heater.OutputOnOffHysteresisValue = 0; +HeadZ1Heater.ProcessVariableSamplingRate = 1000; +HeadZ1Heater.PvInputFilterFactorMode = 4; +HeadZ1Heater.OutputProportionalCycleTime = 0; +HeadZ1Heater.AcHeatersHalfCycleTime = 0; +HeadZ1Heater.ProportionalGain = 20; + + +HardwarePidControl HeadZ2Heater = new HardwarePidControl(); +HeadZ2Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2; +HeadZ2Heater.OutputProportionalBand = 1; +HeadZ2Heater.SensorCorrectionAdjustment = 0.5; +HeadZ2Heater.IntegralTime = 0.1; +HeadZ2Heater.OutputProportionalPowerLimit = 80; +HeadZ2Heater.IntegralTime = 5; +HeadZ2Heater.DerivativeTime = 0; +HeadZ2Heater.SensorCorrectionAdjustment = 0; +HeadZ2Heater.SensorMinValue = 0.0; +HeadZ2Heater.SensorMaxValue = 1.0; +HeadZ2Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ2Heater.SetPointControlOutputRate = 4; +HeadZ2Heater.ControlOutputType = 0; +HeadZ2Heater.SsrControlOutputType = 0; +HeadZ2Heater.OutputOnOffHysteresisValue = 0; +HeadZ2Heater.ProcessVariableSamplingRate = 1000; +HeadZ2Heater.PvInputFilterFactorMode = 4; +HeadZ2Heater.OutputProportionalCycleTime = 0; +HeadZ2Heater.AcHeatersHalfCycleTime = 0; +HeadZ2Heater.ProportionalGain = 20; + +HardwarePidControl HeadZ3Heater = new HardwarePidControl(); +HeadZ3Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3; +HeadZ3Heater.OutputProportionalBand = 1; +HeadZ3Heater.SensorCorrectionAdjustment = 2.0; +HeadZ3Heater.IntegralTime = 0.01; +HeadZ3Heater.OutputProportionalPowerLimit = 80; +HeadZ3Heater.IntegralTime = 5; +HeadZ3Heater.DerivativeTime = 0; +HeadZ3Heater.SensorCorrectionAdjustment = 0; +HeadZ3Heater.SensorMinValue = 0; +HeadZ3Heater.SensorMaxValue = 1.0; +HeadZ3Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ3Heater.SetPointControlOutputRate = 4; +HeadZ3Heater.ControlOutputType = 0; +HeadZ3Heater.SsrControlOutputType = 0; +HeadZ3Heater.OutputOnOffHysteresisValue = 0; +HeadZ3Heater.ProcessVariableSamplingRate = 1000; +HeadZ3Heater.PvInputFilterFactorMode = 4; +HeadZ3Heater.OutputProportionalCycleTime = 0; +HeadZ3Heater.AcHeatersHalfCycleTime = 0; +HeadZ3Heater.ProportionalGain = 20; + +HardwarePidControl HeadZ4Heater = new HardwarePidControl(); +HeadZ4Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4; +HeadZ4Heater.OutputProportionalBand = 2; +HeadZ4Heater.SensorCorrectionAdjustment = 0.5; +HeadZ4Heater.IntegralTime = 0.1; +HeadZ4Heater.OutputProportionalPowerLimit = 80; +HeadZ4Heater.IntegralTime = 5; +HeadZ4Heater.DerivativeTime = 0; +HeadZ4Heater.SensorCorrectionAdjustment = 0; +HeadZ4Heater.SensorMinValue = 0; +HeadZ4Heater.SensorMaxValue = 1.0; +HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ4Heater.SetPointControlOutputRate = 4; +HeadZ4Heater.ControlOutputType = 0; +HeadZ4Heater.SsrControlOutputType = 0; +HeadZ4Heater.OutputOnOffHysteresisValue = 0; +HeadZ4Heater.ProcessVariableSamplingRate = 1000; +HeadZ4Heater.PvInputFilterFactorMode = 4; +HeadZ4Heater.OutputProportionalCycleTime = 0; +HeadZ4Heater.AcHeatersHalfCycleTime = 0; +HeadZ4Heater.ProportionalGain = 20; + +HardwarePidControl MixerHeater = new HardwarePidControl(); +MixerHeater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater; +MixerHeater.OutputProportionalBand = 2; +MixerHeater.SensorCorrectionAdjustment = 2.0; +MixerHeater.IntegralTime = 0.01; +HeadZ4Heater.OutputProportionalPowerLimit = 80; +HeadZ4Heater.IntegralTime = 5; +HeadZ4Heater.DerivativeTime = 0; +HeadZ4Heater.SensorCorrectionAdjustment = 0; +HeadZ4Heater.SensorMinValue = 0; +HeadZ4Heater.SensorMaxValue = 1.0; +HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ4Heater.SetPointControlOutputRate = 4; +HeadZ4Heater.ControlOutputType = 0; +HeadZ4Heater.SsrControlOutputType = 0; +HeadZ4Heater.OutputOnOffHysteresisValue = 0; +HeadZ4Heater.ProcessVariableSamplingRate = 1000; +HeadZ4Heater.PvInputFilterFactorMode = 4; +HeadZ4Heater.OutputProportionalCycleTime = 0; +HeadZ4Heater.AcHeatersHalfCycleTime = 0; +HeadZ4Heater.ProportionalGain = 20; + + +//hardwareConfiguration.PidControls.Add(HeadZ1Heater); +//hardwareConfiguration.PidControls.Add(HeadZ2Heater); +//rdwareConfiguration.PidControls.Add(HeadZ3Heater); +//hardwareConfiguration.PidControls.Add(HeadZ4Heater); +//hardwareConfiguration.PidControls.Add(MixerHeater); + + + diff --git a/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs new file mode 100644 index 000000000..0f4e5023f --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs @@ -0,0 +1,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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 20; +FeederDancer.ZeroPoint = 14182; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 20; +PoolerDancer.ZeroPoint = 13247; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 20; +WinderDancer.ZeroPoint = 11193; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + diff --git a/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs new file mode 100644 index 000000000..6eda1d60c --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs @@ -0,0 +1,382 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 5; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 11.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 20; +FeederDancer.ZeroPoint = 14182; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 20; +PoolerDancer.ZeroPoint = 13247; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 20; +WinderDancer.ZeroPoint = 11193; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 8; +FeederMotor.MaxChangeSlope = 4095; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 8; +DryerMotor.MaxChangeSlope = 4095; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 100000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 0x7ff; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 0.8; +WinderMotor.ConfigWord = 0x1CA0; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x08; +WinderMotor.KvalRun = 0x20; +WinderMotor.KvalAcc = 0x20; +WinderMotor.KvalDec = 0x20; +WinderMotor.OverCurrentThreshold = 0xF; +WinderMotor.StallThreshold = 0x7F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x7; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x15; +WinderMotor.FnSlpDec = 0x15; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 100000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 0x7FF; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.68; +ScrewMotor.ConfigWord = 0x1CA0; +ScrewMotor.DirectionThreadWize = true; +ScrewMotor.KvalHold = 0x1; +ScrewMotor.KvalRun = 0x20; +ScrewMotor.KvalAcc = 0x20; +ScrewMotor.KvalDec = 0x20; +ScrewMotor.OverCurrentThreshold = 0xF; +ScrewMotor.StallThreshold = 0x7F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x7; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x15; +ScrewMotor.FnSlpDec = 0x15; + + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 4095; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + +HardwareMotor Dispenser4Motor = new HardwareMotor(); +Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; +/*Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 1000000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 8; +Dispenser4Motor.MaxChangeSlope = 0x7FF; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 200; +Dispenser4Motor.PulleyRadius = 1.68; +Dispenser4Motor.ConfigWord = 0x1CA0; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x35; +Dispenser4Motor.KvalRun = 0x7f; +Dispenser4Motor.KvalAcc = 0x7f; +Dispenser4Motor.KvalDec = 0x7f; +Dispenser4Motor.OverCurrentThreshold = 0xF; +Dispenser4Motor.StallThreshold = 0x7F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 0x20; +Dispenser4Motor.IntSpd = 0x1A13; +Dispenser4Motor.FnSlpAcc = 0x50; +Dispenser4Motor.FnSlpDec = 0x50; +*/ +Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 1000000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 1; +Dispenser4Motor.MaxChangeSlope = 10000; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 200; +Dispenser4Motor.PulleyRadius = 1.25; +Dispenser4Motor.ConfigWord = 0x1C80; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x35; +Dispenser4Motor.KvalRun = 0x7f; +Dispenser4Motor.KvalAcc = 0x7f; +Dispenser4Motor.KvalDec = 0x7f; +Dispenser4Motor.OverCurrentThreshold = 7; +Dispenser4Motor.StallThreshold = 0x1F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 0x20; +Dispenser4Motor.IntSpd = 0x1A13; +Dispenser4Motor.FnSlpAcc = 0x50; +Dispenser4Motor.FnSlpDec = 0x50; + + + +HardwareDispenser hardwareDispenser = new HardwareDispenser(); +hardwareDispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardwareDispenser.Index = 6; +hardwareDispenser.NlPerPulse = 2.4; +hardwareDispenser.Capacity = 500; + +JobDispenser jobDispenser = new JobDispenser(); +jobDispenser.Index = 0; +jobDispenser.Volume = 0; +jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; +jobDispenser.NanolitterPerSecond = 0; +jobDispenser.NanoliterPerCentimeter = 0; +jobDispenser.PulsePerSecond = 0; +jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; +jobDispenser.LiquidMaxNanoliterPerCentimeter = 0; +jobDispenser.NanoliterPerPulse = 0; + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); diff --git a/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs new file mode 100644 index 000000000..09289b348 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs @@ -0,0 +1,62 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + + +HardwareDispenser hardware1Dispenser = new HardwareDispenser(); +hardware1Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware1Dispenser.Index = 0; +hardware1Dispenser.NlPerPulse = 2.4; +hardware1Dispenser.Capacity = 500; + +HardwareDispenser hardware2Dispenser = new HardwareDispenser(); +hardware2Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware2Dispenser.Index = 1; +hardware2Dispenser.NlPerPulse = 2.4; +hardware2Dispenser.Capacity = 500; + +HardwareDispenser hardware3Dispenser = new HardwareDispenser(); +hardware3Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware3Dispenser.Index = 2; +hardware3Dispenser.NlPerPulse = 2.4; +hardware3Dispenser.Capacity = 500; + +HardwareDispenser hardware4Dispenser = new HardwareDispenser(); +hardware4Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware4Dispenser.Index = 3; +hardware4Dispenser.NlPerPulse = 2.4; +hardware4Dispenser.Capacity = 500; + +HardwareDispenser hardware5Dispenser = new HardwareDispenser(); +hardware5Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware5Dispenser.Index = 4; +hardware5Dispenser.NlPerPulse = 2.4; +hardware5Dispenser.Capacity = 500; + +HardwareDispenser hardware6Dispenser = new HardwareDispenser(); +hardware6Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware6Dispenser.Index = 5; +hardware6Dispenser.NlPerPulse = 2.4; +hardware6Dispenser.Capacity = 500; + +HardwareDispenser hardware7Dispenser = new HardwareDispenser(); +hardware7Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware7Dispenser.Index = 6; +hardware7Dispenser.NlPerPulse = 2.4; +hardware7Dispenser.Capacity = 500; + +HardwareDispenser hardware8Dispenser = new HardwareDispenser(); +hardware8Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardware8Dispenser.Index = 7; +hardware8Dispenser.NlPerPulse = 2.4; +hardware8Dispenser.Capacity = 500; diff --git a/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs new file mode 100644 index 000000000..3ebf70b29 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs @@ -0,0 +1,317 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 8; +FeederMotor.MaxChangeSlope = 4095; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x8; +FeederMotor.KvalRun = 0x35; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x27; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; +FeederMotor.FsSpd = 0x27; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 8; +DryerMotor.MaxChangeSlope = 4095; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x8; +DryerMotor.KvalRun = 0x35; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x27; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; +DryerMotor.FsSpd = 0x27; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x8; +PoolerMotor.KvalRun = 0x35; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x27; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; +PoolerMotor.FsSpd = 0x27; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 100000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 0x7ff; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 0.8; +WinderMotor.ConfigWord = 0x1CA0; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x08; +WinderMotor.KvalRun = 0x20; +WinderMotor.KvalAcc = 0x20; +WinderMotor.KvalDec = 0x3ff; +WinderMotor.OverCurrentThreshold = 0xF; +WinderMotor.StallThreshold = 0x7F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x7; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x15; +WinderMotor.FnSlpDec = 0x15; +WinderMotor.FsSpd = 0x3ff; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 100000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 0x7FF; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.68; +ScrewMotor.ConfigWord = 0x1CA0; +ScrewMotor.DirectionThreadWize = true; +ScrewMotor.KvalHold = 0x1; +ScrewMotor.KvalRun = 0x20; +ScrewMotor.KvalAcc = 0x20; +ScrewMotor.KvalDec = 0x27; +ScrewMotor.OverCurrentThreshold = 0xF; +ScrewMotor.StallThreshold = 0x7F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x7; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x15; +ScrewMotor.FnSlpDec = 0x15; +ScrewMotor.FsSpd = 0x27; + + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x27; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; +LeftRockerMotor.FsSpd = 0x27; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 4095; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x27; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; +RightRockerMotor.FsSpd = 0x27; + +HardwareMotor Dispenser4Motor = new HardwareMotor(); +Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4; +Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 100000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 16; +Dispenser4Motor.MaxChangeSlope = 0x7FF; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 400; +Dispenser4Motor.PulleyRadius = 1.68; +Dispenser4Motor.ConfigWord = 0x1CA0; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x21; +Dispenser4Motor.KvalRun = 0xc0; +Dispenser4Motor.KvalAcc = 0x2e; +Dispenser4Motor.KvalDec = 0x3ff; +Dispenser4Motor.OverCurrentThreshold = 0xF; +Dispenser4Motor.StallThreshold = 0x1F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 0x9; +Dispenser4Motor.IntSpd = 0x1AD2; +Dispenser4Motor.FnSlpAcc = 0x26; +Dispenser4Motor.FnSlpDec = 0x26; +Dispenser4Motor.FsSpd = 0x3ff; + +HardwareMotor Dispenser7Motor = new HardwareMotor(); +Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; +Dispenser7Motor.MinFrequency = 0; +Dispenser7Motor.MaxFrequency = 100000; +Dispenser7Motor.SetMicroStep = 1; +Dispenser7Motor.MicroStep = 16; +Dispenser7Motor.MaxChangeSlope = 0x7FF; +Dispenser7Motor.HighLengthMicroSecond = 0; +Dispenser7Motor.SpeedMaster = false; +Dispenser7Motor.PulsePerRound = 400; +Dispenser7Motor.PulleyRadius = 1.68; +Dispenser7Motor.ConfigWord = 0x1CA0; +Dispenser7Motor.DirectionThreadWize = true; +Dispenser7Motor.KvalHold = 0x21; +Dispenser7Motor.KvalRun = 0xc0; +Dispenser7Motor.KvalAcc = 0x2e; +Dispenser7Motor.KvalDec = 0x3ff; +Dispenser7Motor.OverCurrentThreshold = 0xF; +Dispenser7Motor.StallThreshold = 0x1F; +Dispenser7Motor.ThermalCompensationFactor = 0; +Dispenser7Motor.LowSpeedOptimization = false; +Dispenser7Motor.StSlp = 0x9; +Dispenser7Motor.IntSpd = 0x1AD2; +Dispenser7Motor.FnSlpAcc = 0x26; +Dispenser7Motor.FnSlpDec = 0x26; +Dispenser7Motor.FsSpd = 0x3ff; + +HardwareMotor Dispenser8Motor = new HardwareMotor(); +Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8; +Dispenser8Motor.MinFrequency = 0; +Dispenser8Motor.MaxFrequency = 100000; +Dispenser8Motor.SetMicroStep = 1; +Dispenser8Motor.MicroStep = 16; +Dispenser8Motor.MaxChangeSlope = 0x7FF; +Dispenser8Motor.HighLengthMicroSecond = 0; +Dispenser8Motor.SpeedMaster = false; +Dispenser8Motor.PulsePerRound = 400; +Dispenser8Motor.PulleyRadius = 1.68; +Dispenser8Motor.ConfigWord = 0x1CA0; +Dispenser8Motor.DirectionThreadWize = true; +Dispenser8Motor.KvalHold = 0x21; +Dispenser8Motor.KvalRun = 0xc0; +Dispenser8Motor.KvalAcc = 0x2e; +Dispenser8Motor.KvalDec = 0x3ff; +Dispenser8Motor.OverCurrentThreshold = 0xF; +Dispenser8Motor.StallThreshold = 0x1F; +Dispenser8Motor.ThermalCompensationFactor = 0; +Dispenser8Motor.LowSpeedOptimization = false; +Dispenser8Motor.StSlp = 0x9; +Dispenser8Motor.IntSpd = 0x1AD2; +Dispenser8Motor.FnSlpAcc = 0x26; +Dispenser8Motor.FnSlpDec = 0x26; +Dispenser8Motor.FsSpd = 0x3ff; + +HardwareMotor DryerLoadarm = new HardwareMotor(); +DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm; +DryerLoadarm.MinFrequency = 0; +DryerLoadarm.MaxFrequency = 1000000; +DryerLoadarm.SetMicroStep = 1; +DryerLoadarm.MicroStep = 1; +DryerLoadarm.MaxChangeSlope = 10000; +DryerLoadarm.HighLengthMicroSecond = 0; +DryerLoadarm.SpeedMaster = false; +DryerLoadarm.PulsePerRound = 200; +DryerLoadarm.PulleyRadius = 1.25; +DryerLoadarm.ConfigWord = 0x1C80; +DryerLoadarm.DirectionThreadWize = false; +DryerLoadarm.KvalHold = 0x35; +DryerLoadarm.KvalRun = 0x7f; +DryerLoadarm.KvalAcc = 0x7f; +DryerLoadarm.KvalDec = 0x27; +DryerLoadarm.OverCurrentThreshold = 7; +DryerLoadarm.StallThreshold = 0x1F; +DryerLoadarm.ThermalCompensationFactor = 0; +DryerLoadarm.LowSpeedOptimization = false; +DryerLoadarm.StSlp = 0x20; +DryerLoadarm.IntSpd = 0x1A13; +DryerLoadarm.FnSlpAcc = 0x50; +DryerLoadarm.FnSlpDec = 0x50; +DryerLoadarm.FsSpd = 0x27; + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + diff --git a/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs new file mode 100644 index 000000000..984ed00e2 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs @@ -0,0 +1,76 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 7; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 12.0; + diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs new file mode 100644 index 000000000..84a29bc3d --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs @@ -0,0 +1,314 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 5; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 11.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 14170; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 13347; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 11320; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 1; +FeederMotor.MaxChangeSlope = 10000; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 1; +DryerMotor.MaxChangeSlope = 1000; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 1000000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 10000; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 1.68; +WinderMotor.ConfigWord = 0x1c80; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x0F; +WinderMotor.KvalRun = 0x15; +WinderMotor.KvalAcc = 0x15; +WinderMotor.KvalDec = 0x15; +WinderMotor.OverCurrentThreshold = 7; +WinderMotor.StallThreshold = 0x1F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x18; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x22; +WinderMotor.FnSlpDec = 0x22; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 1000000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 100; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.25; +ScrewMotor.ConfigWord = 0x1C80; +ScrewMotor.DirectionThreadWize = false; +ScrewMotor.KvalHold = 0x0F; +ScrewMotor.KvalRun = 0x15; +ScrewMotor.KvalAcc = 0x15; +ScrewMotor.KvalDec = 0x15; +ScrewMotor.OverCurrentThreshold = 7; +ScrewMotor.StallThreshold = 0x1F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x18; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x22; +ScrewMotor.FnSlpDec = 0x22; + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 10000; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + + + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs new file mode 100644 index 000000000..22e662930 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs @@ -0,0 +1,316 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 7; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 12.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 14170; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 13347; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 10900; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 1; +FeederMotor.MaxChangeSlope = 10000; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 1; +DryerMotor.MaxChangeSlope = 1000; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 1000000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 10000; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 1.68; +WinderMotor.ConfigWord = 0x1c80; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x0F; +WinderMotor.KvalRun = 0x15; +WinderMotor.KvalAcc = 0x15; +WinderMotor.KvalDec = 0x15; +WinderMotor.OverCurrentThreshold = 7; +WinderMotor.StallThreshold = 0x1F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x18; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x22; +WinderMotor.FnSlpDec = 0x22; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 1000000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 100; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.25; +ScrewMotor.ConfigWord = 0x1C80; +ScrewMotor.DirectionThreadWize = false; +ScrewMotor.KvalHold = 0x0F; +ScrewMotor.KvalRun = 0x15; +ScrewMotor.KvalAcc = 0x15; +ScrewMotor.KvalDec = 0x15; +ScrewMotor.OverCurrentThreshold = 7; +ScrewMotor.StallThreshold = 0x1F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x18; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x22; +ScrewMotor.FnSlpDec = 0x22; + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 20; +LeftRockerMotor.LowSpeedOptimization = true; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 20; +RightRockerMotor.LowSpeedOptimization = true; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 10000; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + + + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs new file mode 100644 index 000000000..a13aa92cf --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs @@ -0,0 +1,316 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 7; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 12.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 14170; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 13347; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 10900; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 4; +FeederMotor.MaxChangeSlope = 10000; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 4; +DryerMotor.MaxChangeSlope = 1000; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 3; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 1000000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 0x7ff; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 1.68; +WinderMotor.ConfigWord = 0x1CA0; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x0F; +WinderMotor.KvalRun = 0x15; +WinderMotor.KvalAcc = 0x15; +WinderMotor.KvalDec = 0x15; +WinderMotor.OverCurrentThreshold = 0xF0; +WinderMotor.StallThreshold = 0x7F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x18; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x22; +WinderMotor.FnSlpDec = 0x22; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 1000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 4; +ScrewMotor.MaxChangeSlope = 10000; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.25; +ScrewMotor.ConfigWord = 0x1C80; +ScrewMotor.DirectionThreadWize = false; +ScrewMotor.KvalHold = 0x0F; +ScrewMotor.KvalRun = 0x15; +ScrewMotor.KvalAcc = 0x15; +ScrewMotor.KvalDec = 0x15; +ScrewMotor.OverCurrentThreshold = 7; +ScrewMotor.StallThreshold = 0x1F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x18; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x22; +ScrewMotor.FnSlpDec = 0x22;// Request ---- + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 20; +LeftRockerMotor.LowSpeedOptimization = true; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 2; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 20; +RightRockerMotor.LowSpeedOptimization = true; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 10000; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + + + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); diff --git a/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs new file mode 100644 index 000000000..34008fd61 --- /dev/null +++ b/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs @@ -0,0 +1,434 @@ +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.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 1.0; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 1.0; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 1.0; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 5; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 11.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 20; +FeederDancer.ZeroPoint = 14182; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 20; +PoolerDancer.ZeroPoint = 13247; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 20; +WinderDancer.ZeroPoint = 11193; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 1; +FeederMotor.MaxChangeSlope = 10000; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x3Ff; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 1; +DryerMotor.MaxChangeSlope = 1000; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = false; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x3Ff; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x3ff; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 100000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 0x7ff; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 0.8; +WinderMotor.ConfigWord = 0x1CA0; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x08; +WinderMotor.KvalRun = 0x20; +WinderMotor.KvalAcc = 0x20; +WinderMotor.KvalDec = 0x3ff; +WinderMotor.OverCurrentThreshold = 0xF; +WinderMotor.StallThreshold = 0x7F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x7; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x15; +WinderMotor.FnSlpDec = 0x15; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 100000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 0x7FF; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.68; +ScrewMotor.ConfigWord = 0x1CA0; +ScrewMotor.DirectionThreadWize = true; +ScrewMotor.KvalHold = 0x1; +ScrewMotor.KvalRun = 0x20; +ScrewMotor.KvalAcc = 0x20; +ScrewMotor.KvalDec = 0x3ff; +ScrewMotor.OverCurrentThreshold = 0xF; +ScrewMotor.StallThreshold = 0x7F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x7; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x15; +ScrewMotor.FnSlpDec = 0x15; + + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x3ff; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 10000; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x3ff; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + +HardwareMotor Dispenser4Motor = new HardwareMotor(); +Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4; +Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 100000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 16; +Dispenser4Motor.MaxChangeSlope = 0x7FF; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 200; +Dispenser4Motor.PulleyRadius = 1.68; +Dispenser4Motor.ConfigWord = 0x1CA0; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x21; +Dispenser4Motor.KvalRun = 0xc0; +Dispenser4Motor.KvalAcc = 0x2e; +Dispenser4Motor.KvalDec = 0x3ff; +Dispenser4Motor.OverCurrentThreshold = 0xF; +Dispenser4Motor.StallThreshold = 0x1F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 0x9; +Dispenser4Motor.IntSpd = 0x1AD2; +Dispenser4Motor.FnSlpAcc = 0x26; +Dispenser4Motor.FnSlpDec = 0x26; + +HardwareMotor Dispenser7Motor = new HardwareMotor(); +Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; +Dispenser7Motor.MinFrequency = 0; +Dispenser7Motor.MaxFrequency = 100000; +Dispenser7Motor.SetMicroStep = 1; +Dispenser7Motor.MicroStep = 16; +Dispenser7Motor.MaxChangeSlope = 0x7FF; +Dispenser7Motor.HighLengthMicroSecond = 0; +Dispenser7Motor.SpeedMaster = false; +Dispenser7Motor.PulsePerRound = 200; +Dispenser7Motor.PulleyRadius = 1.68; +Dispenser7Motor.ConfigWord = 0x1CA0; +Dispenser7Motor.DirectionThreadWize = true; +Dispenser7Motor.KvalHold = 0x21; +Dispenser7Motor.KvalRun = 0xc0; +Dispenser7Motor.KvalAcc = 0x2e; +Dispenser7Motor.KvalDec = 0x3ff; +Dispenser7Motor.OverCurrentThreshold = 0xF; +Dispenser7Motor.StallThreshold = 0x1F; +Dispenser7Motor.ThermalCompensationFactor = 0; +Dispenser7Motor.LowSpeedOptimization = false; +Dispenser7Motor.StSlp = 0x9; +Dispenser7Motor.IntSpd = 0x1AD2; +Dispenser7Motor.FnSlpAcc = 0x26; +Dispenser7Motor.FnSlpDec = 0x26; + +HardwareMotor Dispenser8Motor = new HardwareMotor(); +Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8; +Dispenser8Motor.MinFrequency = 0; +Dispenser8Motor.MaxFrequency = 100000; +Dispenser8Motor.SetMicroStep = 1; +Dispenser8Motor.MicroStep = 16; +Dispenser8Motor.MaxChangeSlope = 0x7FF; +Dispenser8Motor.HighLengthMicroSecond = 0; +Dispenser8Motor.SpeedMaster = false; +Dispenser8Motor.PulsePerRound = 200; +Dispenser8Motor.PulleyRadius = 1.68; +Dispenser8Motor.ConfigWord = 0x1CA0; +Dispenser8Motor.DirectionThreadWize = true; +Dispenser8Motor.KvalHold = 0x21; +Dispenser8Motor.KvalRun = 0xc0; +Dispenser8Motor.KvalAcc = 0x2e; +Dispenser8Motor.KvalDec = 0x3ff; +Dispenser8Motor.OverCurrentThreshold = 0xF; +Dispenser8Motor.StallThreshold = 0x1F; +Dispenser8Motor.ThermalCompensationFactor = 0; +Dispenser8Motor.LowSpeedOptimization = false; +Dispenser8Motor.StSlp = 0x9; +Dispenser8Motor.IntSpd = 0x1AD2; +Dispenser8Motor.FnSlpAcc = 0x26; +Dispenser8Motor.FnSlpDec = 0x26; +HardwareMotor DryerLoadarm = new HardwareMotor(); +DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm; +DryerLoadarm.MinFrequency = 0; +DryerLoadarm.MaxFrequency = 1000000; +DryerLoadarm.SetMicroStep = 1; +DryerLoadarm.MicroStep = 1; +DryerLoadarm.MaxChangeSlope = 10000; +DryerLoadarm.HighLengthMicroSecond = 0; +DryerLoadarm.SpeedMaster = false; +DryerLoadarm.PulsePerRound = 200; +DryerLoadarm.PulleyRadius = 1.25; +DryerLoadarm.ConfigWord = 0x1C80; +DryerLoadarm.DirectionThreadWize = false; +DryerLoadarm.KvalHold = 0x35; +DryerLoadarm.KvalRun = 0x7f; +DryerLoadarm.KvalAcc = 0x7f; +DryerLoadarm.KvalDec = 0x7f; +DryerLoadarm.OverCurrentThreshold = 7; +DryerLoadarm.StallThreshold = 0x1F; +DryerLoadarm.ThermalCompensationFactor = 0; +DryerLoadarm.LowSpeedOptimization = false; +DryerLoadarm.StSlp = 0x20; +DryerLoadarm.IntSpd = 0x1A13; +DryerLoadarm.FnSlpAcc = 0x50; +DryerLoadarm.FnSlpDec = 0x50; + + +HardwareDispenser hardwareDispenser = new HardwareDispenser(); +hardwareDispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; +hardwareDispenser.Index = 7; +hardwareDispenser.NlPerPulse = 2.4; +hardwareDispenser.Capacity = 500; + +JobDispenser jobDispenser = new JobDispenser(); +jobDispenser.Index = 0; +jobDispenser.Volume = 0; +jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; +jobDispenser.NanolitterPerSecond = 0; +jobDispenser.NanoliterPerCentimeter = 0; +jobDispenser.PulsePerSecond = 0; +jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; +jobDispenser.LiquidMaxNanoliterPerCentimeter = 0; +jobDispenser.NanoliterPerPulse = 0; + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); |
