From c400fa026cdb2bc5c1c5c25f5bfae37461e87cab Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 11 Apr 2018 14:50:47 +0300 Subject: Added Disconnect & Connect requests. Fixed issue with Machine Connection View Scanning. Fixed issue with ShowModalDialog close event.. Added ConnectedMachineView. Added TransferRate for Adapters. --- .../Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index f3ae1002b..2a5dcb3a0 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -206,7 +206,7 @@ namespace Tango.MachineStudio.Common.EventLogging } LogManager.Log("Logging event " + machineEvent.EventType.Name + " - " + machineEvent.Description); - machineEvent.MachineGuid = _application.ConnectedMachine.Guid; + machineEvent.MachineGuid = _application.ConnectedMachine.Machine.Guid; machineEvent.UserGuid = _authentication.CurrentUser.Guid; machineEvent.User = _authentication.CurrentUser; _events.Enqueue(machineEvent); -- cgit v1.3.1 From 9c0bad738d47742f39f2b02b240591653da6bc12 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 12 Apr 2018 12:47:19 +0300 Subject: Added changes to PMR hardware. Implemented Start Job and Record. Fixed issue with logs timeline event width. Implemented 'Event Resolved' event to event logs. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes Software/PMR/Messages/Diagnostics/EventType.proto | 8 +- .../PMR/Messages/Hardware/HardwareDancer.proto | 8 + Software/PMR/Messages/Hardware/HardwareMotor.proto | 24 +- .../PMR/Messages/Hardware/HardwarePidControl.proto | 2 + .../Messages/Hardware/HardwarePidControlType.proto | 3 - Software/PMR/Messages/Printing/JobSpool.proto | 14 +- .../ViewModels/MainViewVM.cs | 4 +- .../Tango.MachineStudio.Developer.csproj | 4 + .../ViewModels/MainViewVM.cs | 40 ++- .../Views/JobView.xaml | 3 + .../Converters/StringToFirstLineConverter.cs | 23 ++ .../Tango.MachineStudio.Logging.csproj | 1 + .../Views/TimelineView.xaml | 3 +- .../Controls/HiveColorPickerControl.xaml.cs | 5 +- .../EventLogging/DefaultEventLogger.cs | 15 + .../Tango.BL/Entities/HardwareDancer.cs | 60 ++++ .../Tango.BL/Entities/HardwareMotor.cs | 168 +++------ .../Tango.BL/Entities/HardwarePidControl.cs | 20 ++ .../Tango.BL/Enumerations/ActionTypes.cs | 6 - .../Enumerations/HardwarePidControlTypes.cs | 6 - .../Visual_Studio/Tango.Core/ExtendedObject.cs | 8 + .../Tango.DAL.Remote/DB/HARDWARE_DANCERS.cs | 3 + .../Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs | 17 +- .../Tango.DAL.Remote/DB/HARDWARE_PID_CONTROLS.cs | 1 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 63 ++-- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 104 +++--- .../Tango.PMR/Diagnostics/EventType.cs | 17 +- .../Visual_Studio/Tango.PMR/ExtensionMethods.cs | 2 +- .../Tango.PMR/Hardware/HardwareDancer.cs | 122 ++++++- .../Tango.PMR/Hardware/HardwareMotor.cs | 389 ++++++++------------- .../Tango.PMR/Hardware/HardwarePidControl.cs | 36 +- .../Tango.PMR/Hardware/HardwarePidControlType.cs | 9 +- 34 files changed, 682 insertions(+), 506 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Converters/StringToFirstLineConverter.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 5712f04b8..70a049035 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 672af33ad..c563dabe9 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/Diagnostics/EventType.proto b/Software/PMR/Messages/Diagnostics/EventType.proto index 487310ff0..9c29f708e 100644 --- a/Software/PMR/Messages/Diagnostics/EventType.proto +++ b/Software/PMR/Messages/Diagnostics/EventType.proto @@ -16,7 +16,7 @@ option java_package = "com.twine.tango.pmr.diagnostics"; enum EventType { - //Dancer overshot / Thread break sensor (Group = Thread Feeding System, Category = Error, Actions = Soft Visual Notification, Abort Running Job, Prevent Job Execution) + //Dancer overshot / Thread break sensor (Group = Thread Feeding System, Category = Error, Actions = Abort Running Job, Prevent Job Execution, Soft Visual Notification) ThreadBreak = 0; //Dancer not stable or got down (Group = Thread Feeding System, Category = Error, Actions = Abort Running Job, Soft Visual Notification, Prevent Job Execution) @@ -124,4 +124,10 @@ enum EventType //Notifies about application termination (Group = Application, Category = Info, Actions = ) ApplicationTerminated = 35; + //Occures when a diagnostics recording has been started (Group = Application, Category = Info, Actions = ) + RecordingStarted = 36; + + //Occures when a diagnostics recording has been stopped (Group = Application, Category = Info, Actions = ) + RecordingStopped = 37; + } diff --git a/Software/PMR/Messages/Hardware/HardwareDancer.proto b/Software/PMR/Messages/Hardware/HardwareDancer.proto index 5933b7cb4..103b16e58 100644 --- a/Software/PMR/Messages/Hardware/HardwareDancer.proto +++ b/Software/PMR/Messages/Hardware/HardwareDancer.proto @@ -28,4 +28,12 @@ message HardwareDancer int32 PulsePerMmSpring = 5; + int32 MaximalMovementMm = 6; + + int32 ZeroPoint = 7; + + int32 ResolutionBits = 8; + + int32 ArmLength = 9; + } diff --git a/Software/PMR/Messages/Hardware/HardwareMotor.proto b/Software/PMR/Messages/Hardware/HardwareMotor.proto index dbce226c7..d0162a34f 100644 --- a/Software/PMR/Messages/Hardware/HardwareMotor.proto +++ b/Software/PMR/Messages/Hardware/HardwareMotor.proto @@ -24,28 +24,22 @@ message HardwareMotor int32 MaxFrequency = 3; - int32 MinMicroStep = 4; + int32 SetMicroStep = 4; - int32 MaxMicroStep = 5; + int32 MicroStep = 5; - double LinearRatio = 6; + double MaxChangeSlope = 6; - int32 MedianPosition = 7; + double HighLengthMicroSecond = 7; - double CorrectionGain = 8; + bool SpeedMaster = 8; - double RatioToDryerSpeed = 9; + int32 PulsePerRound = 9; - double Kp = 10; + double PulleyRadius = 10; - double Ki = 11; + int32 ConfigWord = 11; - double Kd = 12; - - double ChangeSlope = 13; - - double HighLengthMicroSecond = 14; - - bool SpeedMaster = 15; + bool DirectionThreadWize = 12; } diff --git a/Software/PMR/Messages/Hardware/HardwarePidControl.proto b/Software/PMR/Messages/Hardware/HardwarePidControl.proto index dc1907bd5..001b5d328 100644 --- a/Software/PMR/Messages/Hardware/HardwarePidControl.proto +++ b/Software/PMR/Messages/Hardware/HardwarePidControl.proto @@ -52,4 +52,6 @@ message HardwarePidControl int32 AcHeatersHalfCycleTime = 17; + double ProportionalGain = 18; + } diff --git a/Software/PMR/Messages/Hardware/HardwarePidControlType.proto b/Software/PMR/Messages/Hardware/HardwarePidControlType.proto index 38785e85b..ca8a70bee 100644 --- a/Software/PMR/Messages/Hardware/HardwarePidControlType.proto +++ b/Software/PMR/Messages/Hardware/HardwarePidControlType.proto @@ -55,7 +55,4 @@ enum HardwarePidControlType //Winder Motor MotorWinder = 12; - //Dryer Heater 400 - DryerHeater400 = 13; - } diff --git a/Software/PMR/Messages/Printing/JobSpool.proto b/Software/PMR/Messages/Printing/JobSpool.proto index 03958c894..ba140aaaa 100644 --- a/Software/PMR/Messages/Printing/JobSpool.proto +++ b/Software/PMR/Messages/Printing/JobSpool.proto @@ -20,20 +20,20 @@ message JobSpool JobSpoolType JobSpoolType = 1; - double Length = 2; // the spool winding initial length in mm + double Length = 2; double Weight = 3; - double Diameter = 4; // in mm initial data required for speed calculation + double Diameter = 4; - int32 StartOffsetPulses = 5; // distance between the limit switch and the initial spool home position + int32 StartOffsetPulses = 5; - int32 BackingRate = 6; // the angle of the top of the spool + int32 BackingRate = 6; - int32 SegmentOffsetPulses = 7; // the spool winding initial length in mm + int32 SegmentOffsetPulses = 7; - int32 SpoolBottomBackingRate = 8;// the angle of the bottom of the spool + int32 BottomBackingRate = 8; - double NumberOfRotationPerPassage = 9; // how many rotations per spool passage + double RotationsPerPassage = 9; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs index af65c1430..40a407093 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs @@ -372,7 +372,7 @@ namespace Tango.MachineStudio.DataCapture.ViewModels } } - private void StartDiagnosticsRecording() + public void StartDiagnosticsRecording() { using (_notification.PushTaskItem("Starting Recording...")) { @@ -384,7 +384,7 @@ namespace Tango.MachineStudio.DataCapture.ViewModels InvalidateRelayCommands(); } - private async void StopRecorderOrPlayer() + public async void StopRecorderOrPlayer() { if (Recorder.IsRecording) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index c165552d1..0459b3e24 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -267,6 +267,10 @@ {cb0b0aa2-bb24-4bca-a720-45e397684e12} Tango.MachineStudio.Common + + {fc337a7f-1214-41d8-9992-78092a3b961e} + Tango.MachineStudio.DataCapture + {94f7acf8-55e1-4a02-b9bc-a818413fdbbf} Tango.MachineStudio.DB diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index cdfeee54d..036b01e34 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -35,6 +35,7 @@ using System.Speech.Synthesis; using System.Media; using Tango.MachineStudio.Common.EventLogging; using Tango.MachineStudio.Common.Speech; +using Microsoft.Practices.ServiceLocation; namespace Tango.MachineStudio.Developer.ViewModels { @@ -58,6 +59,8 @@ namespace Tango.MachineStudio.Developer.ViewModels private ObservablesContext _activeJobDbContext; private IEventLogger _eventLogger; private ISpeechProvider _speech; + private DataCapture.ViewModels.MainViewVM _dataCaptureVM; + private bool _isRecording; #region Properties @@ -555,6 +558,11 @@ namespace Tango.MachineStudio.Developer.ViewModels /// public RelayCommand StartJobCommand { get; set; } + /// + /// Gets or sets the start job and record command. + /// + public RelayCommand StartJobAndRecordCommand { get; set; } + /// /// Gets or sets the stop job command. /// @@ -642,6 +650,9 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log("Initializing relay commands..."); + _dataCaptureVM = ServiceLocator.Current.GetInstance(); + _dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged(); + //Initialize Commands... EditMachineCommand = new RelayCommand(EditMachine, () => SelectedMachine != null); EditRMLCommand = new RelayCommand(EditRML, () => SelectedRML != null); @@ -656,6 +667,7 @@ namespace Tango.MachineStudio.Developer.ViewModels SaveJobCommand = new RelayCommand(SaveActiveJob, () => SelectedMachine != null); DiscardJobCommand = new RelayCommand(BackToJobs, () => SelectedMachine != null); StartJobCommand = new RelayCommand(StartJob, () => ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution))); + StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution))); StopJobCommand = new RelayCommand(StopJob, () => IsJobRunning); CloseJobCompletionStatusCommand = new RelayCommand(CloseJobCompletionStatusBar); LoadJobCommand = new RelayCommand(LoadSelectedJob, () => SelectedMachineJob != null); @@ -1053,7 +1065,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (segment.ID != -1) { _speech.SpeakInfo(String.Format("Segment {0} Started.", segment.SegmentIndex)); - _eventLogger.Log(String.Format("Segment {0} Started.", segment.SegmentIndex)); + _eventLogger.Log(String.Format("Segment {0} Started.", segment.SegmentIndex) + Environment.NewLine + segment.ToJsonString()); } else { @@ -1081,6 +1093,7 @@ namespace Tango.MachineStudio.Developer.ViewModels InvokeUI(() => { _notification.ShowError("Job failed. " + ex.Message); + StopRecordingIfInProgress(); }); }; @@ -1089,12 +1102,14 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log(String.Format("Job {0} has completed.", RunningJob.Name)); _eventLogger.Log(String.Format("Job {0} has completed.", RunningJob.Name)); SetJobCompleted(); + StopRecordingIfInProgress(); }; _jobHandler.Canceled += (x, y) => { LogManager.Log(String.Format("Job {0} has been canceled.", RunningJob.Name)); _eventLogger.Log(String.Format("Job {0} has been canceled.", RunningJob.Name)); + StopRecordingIfInProgress(); //Finally Canceled.. }; } @@ -1104,6 +1119,29 @@ namespace Tango.MachineStudio.Developer.ViewModels _eventLogger.Log(ex, "An error occurred while starting the job."); _notification.ShowError("An error occurred while starting the job. " + Environment.NewLine + ex.Message); SetJobFailed(); + StopRecordingIfInProgress(); + } + } + + /// + /// Starts the job and record using the data capture module. + /// + private void StartJobAndRecord() + { + _isRecording = true; + _dataCaptureVM.StartDiagnosticsRecording(); + StartJob(); + } + + /// + /// Stops the recording if in progress. + /// + private void StopRecordingIfInProgress() + { + if (_isRecording) + { + _isRecording = false; + InvokeUI(() => _dataCaptureVM.StopRecorderOrPlayer()); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 4c0784d1d..c575ef2a3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -1066,6 +1066,9 @@ START JOB + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Converters/StringToFirstLineConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Converters/StringToFirstLineConverter.cs new file mode 100644 index 000000000..2fa456054 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Converters/StringToFirstLineConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.MachineStudio.Logging.Converters +{ + public class StringToFirstLineConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value.ToString().ToLines().First(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj index 4b817a124..b893dcb53 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj @@ -87,6 +87,7 @@ + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml index 504514cbb..1046fa4e8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml @@ -20,6 +20,7 @@ + @@ -146,7 +147,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs index 41b362889..b8ebe9f6a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs @@ -93,7 +93,10 @@ namespace Tango.MachineStudio.Common.Controls private void HiveCombo_HiveGenerated(object sender, EventArgs e) { - hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); + if (SelectedColor.HasValue) + { + hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); + } } private void OnSelectedHiveColorChanged() diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index 2a5dcb3a0..0a4af6218 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -120,6 +120,8 @@ namespace Tango.MachineStudio.Common.EventLogging { machine.MachineEventsStateProvider.NewEvents -= MachineEventsStateProvider_NewEvents; machine.MachineEventsStateProvider.NewEvents += MachineEventsStateProvider_NewEvents; + machine.MachineEventsStateProvider.EventsResolved -= MachineEventsStateProvider_EventsResolved; + machine.MachineEventsStateProvider.EventsResolved += MachineEventsStateProvider_EventsResolved; } machine.RequestSent -= Machine_RequestSent; @@ -175,6 +177,19 @@ namespace Tango.MachineStudio.Common.EventLogging } } + /// + /// Handles the connected machine events state provider EventsResolved event. + /// + /// The sender. + /// The events. + private void MachineEventsStateProvider_EventsResolved(object sender, IEnumerable events) + { + foreach (var ev in events) + { + Log(String.Format("Event '{0}' resolved.", ev.EventType.Name)); + } + } + #endregion #region Logging diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs index 65997b195..e847eb7cb 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareDancer.cs @@ -136,6 +136,26 @@ namespace Tango.BL.Entities } + protected Int32 _maximalmovementmm; + /// + /// Gets or sets the hardwaredancer maximal movement mm. + /// + [Column("MAXIMAL_MOVEMENT_MM")] + + public Int32 MaximalMovementMm + { + get + { + return _maximalmovementmm; + } + + set + { + _maximalmovementmm = value; RaisePropertyChanged(nameof(MaximalMovementMm)); + } + + } + protected Int32 _zeropoint; /// /// Gets or sets the hardwaredancer zero point. @@ -156,6 +176,46 @@ namespace Tango.BL.Entities } + protected Int32 _resolutionbits; + /// + /// Gets or sets the hardwaredancer resolution bits. + /// + [Column("RESOLUTION_BITS")] + + public Int32 ResolutionBits + { + get + { + return _resolutionbits; + } + + set + { + _resolutionbits = value; RaisePropertyChanged(nameof(ResolutionBits)); + } + + } + + protected Int32 _armlength; + /// + /// Gets or sets the hardwaredancer arm length. + /// + [Column("ARM_LENGTH")] + + public Int32 ArmLength + { + get + { + return _armlength; + } + + set + { + _armlength = value; RaisePropertyChanged(nameof(ArmLength)); + } + + } + protected HardwareDancerType _hardwaredancertype; /// /// Gets or sets the hardwaredancer hardware dancer types. diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs index ab61f4c02..75fb30549 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareMotor.cs @@ -96,242 +96,182 @@ namespace Tango.BL.Entities } - protected Int32 _minmicrostep; + protected Int32 _setmicrostep; /// - /// Gets or sets the hardwaremotor min micro step. + /// Gets or sets the hardwaremotor set micro step. /// - [Column("MIN_MICRO_STEP")] + [Column("SET_MICRO_STEP")] - public Int32 MinMicroStep + public Int32 SetMicroStep { get { - return _minmicrostep; + return _setmicrostep; } set { - _minmicrostep = value; RaisePropertyChanged(nameof(MinMicroStep)); + _setmicrostep = value; RaisePropertyChanged(nameof(SetMicroStep)); } } - protected Int32 _maxmicrostep; + protected Int32 _microstep; /// - /// Gets or sets the hardwaremotor max micro step. + /// Gets or sets the hardwaremotor micro step. /// - [Column("MAX_MICRO_STEP")] + [Column("MICRO_STEP")] - public Int32 MaxMicroStep + public Int32 MicroStep { get { - return _maxmicrostep; + return _microstep; } set { - _maxmicrostep = value; RaisePropertyChanged(nameof(MaxMicroStep)); + _microstep = value; RaisePropertyChanged(nameof(MicroStep)); } } - protected Double _linearratio; + protected Double _maxchangeslope; /// - /// Gets or sets the hardwaremotor linear ratio. + /// Gets or sets the hardwaremotor max change slope. /// - [Column("LINEAR_RATIO")] + [Column("MAX_CHANGE_SLOPE")] - public Double LinearRatio + public Double MaxChangeSlope { get { - return _linearratio; + return _maxchangeslope; } set { - _linearratio = value; RaisePropertyChanged(nameof(LinearRatio)); + _maxchangeslope = value; RaisePropertyChanged(nameof(MaxChangeSlope)); } } - protected Int32 _medianposition; - /// - /// Gets or sets the hardwaremotor median position. - /// - [Column("MEDIAN_POSITION")] - - public Int32 MedianPosition - { - get - { - return _medianposition; - } - - set - { - _medianposition = value; RaisePropertyChanged(nameof(MedianPosition)); - } - - } - - protected Double _correctiongain; - /// - /// Gets or sets the hardwaremotor correction gain. - /// - [Column("CORRECTION_GAIN")] - - public Double CorrectionGain - { - get - { - return _correctiongain; - } - - set - { - _correctiongain = value; RaisePropertyChanged(nameof(CorrectionGain)); - } - - } - - protected Double _ratiotodryerspeed; - /// - /// Gets or sets the hardwaremotor ratio to dryer speed. - /// - [Column("RATIO_TO_DRYER_SPEED")] - - public Double RatioToDryerSpeed - { - get - { - return _ratiotodryerspeed; - } - - set - { - _ratiotodryerspeed = value; RaisePropertyChanged(nameof(RatioToDryerSpeed)); - } - - } - - protected Double _kp; + protected Double _highlengthmicrosecond; /// - /// Gets or sets the hardwaremotor kp. + /// Gets or sets the hardwaremotor high length micro second. /// - [Column("KP")] + [Column("HIGH_LENGTH_MICRO_SECOND")] - public Double Kp + public Double HighLengthMicroSecond { get { - return _kp; + return _highlengthmicrosecond; } set { - _kp = value; RaisePropertyChanged(nameof(Kp)); + _highlengthmicrosecond = value; RaisePropertyChanged(nameof(HighLengthMicroSecond)); } } - protected Double _ki; + protected Boolean _speedmaster; /// - /// Gets or sets the hardwaremotor ki. + /// Gets or sets the hardwaremotor speed master. /// - [Column("KI")] + [Column("SPEED_MASTER")] - public Double Ki + public Boolean SpeedMaster { get { - return _ki; + return _speedmaster; } set { - _ki = value; RaisePropertyChanged(nameof(Ki)); + _speedmaster = value; RaisePropertyChanged(nameof(SpeedMaster)); } } - protected Double _kd; + protected Int32 _pulseperround; /// - /// Gets or sets the hardwaremotor kd. + /// Gets or sets the hardwaremotor pulse per round. /// - [Column("KD")] + [Column("PULSE_PER_ROUND")] - public Double Kd + public Int32 PulsePerRound { get { - return _kd; + return _pulseperround; } set { - _kd = value; RaisePropertyChanged(nameof(Kd)); + _pulseperround = value; RaisePropertyChanged(nameof(PulsePerRound)); } } - protected Double _changeslope; + protected Double _pulleyradius; /// - /// Gets or sets the hardwaremotor change slope. + /// Gets or sets the hardwaremotor pulley radius. /// - [Column("CHANGE_SLOPE")] + [Column("PULLEY_RADIUS")] - public Double ChangeSlope + public Double PulleyRadius { get { - return _changeslope; + return _pulleyradius; } set { - _changeslope = value; RaisePropertyChanged(nameof(ChangeSlope)); + _pulleyradius = value; RaisePropertyChanged(nameof(PulleyRadius)); } } - protected Double _highlengthmicrosecond; + protected Int32 _configword; /// - /// Gets or sets the hardwaremotor high length micro second. + /// Gets or sets the hardwaremotor config word. /// - [Column("HIGH_LENGTH_MICRO_SECOND")] + [Column("CONFIG_WORD")] - public Double HighLengthMicroSecond + public Int32 ConfigWord { get { - return _highlengthmicrosecond; + return _configword; } set { - _highlengthmicrosecond = value; RaisePropertyChanged(nameof(HighLengthMicroSecond)); + _configword = value; RaisePropertyChanged(nameof(ConfigWord)); } } - protected Boolean _speedmaster; + protected Boolean _directionthreadwize; /// - /// Gets or sets the hardwaremotor speed master. + /// Gets or sets the hardwaremotor direction thread wize. /// - [Column("SPEED_MASTER")] + [Column("DIRECTION_THREAD_WIZE")] - public Boolean SpeedMaster + public Boolean DirectionThreadWize { get { - return _speedmaster; + return _directionthreadwize; } set { - _speedmaster = value; RaisePropertyChanged(nameof(SpeedMaster)); + _directionthreadwize = value; RaisePropertyChanged(nameof(DirectionThreadWize)); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs index 04049ef3c..882bbbdf6 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwarePidControl.cs @@ -376,6 +376,26 @@ namespace Tango.BL.Entities } + protected Double _proportionalgain; + /// + /// Gets or sets the hardwarepidcontrol proportional gain. + /// + [Column("PROPORTIONAL_GAIN")] + + public Double ProportionalGain + { + get + { + return _proportionalgain; + } + + set + { + _proportionalgain = value; RaisePropertyChanged(nameof(ProportionalGain)); + } + + } + protected HardwarePidControlType _hardwarepidcontroltype; /// /// Gets or sets the hardwarepidcontrol hardware pid control types. diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ActionTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ActionTypes.cs index a95d35cd7..e8a46921c 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/ActionTypes.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/ActionTypes.cs @@ -39,11 +39,5 @@ namespace Tango.BL.Enumerations [Description("Displays a graceful notification to the user")] SoftVisualNotification = 4, - /// - /// (Displays a guide and requires confirmation) - /// - [Description("Displays a guide and requires confirmation")] - DisplayGuideAndConfirm = 5, - } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs index 9f894db6d..389510997 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/HardwarePidControlTypes.cs @@ -87,11 +87,5 @@ namespace Tango.BL.Enumerations [Description("Winder Motor")] MotorWinder = 12, - /// - /// (Dryer Heater 400) - /// - [Description("Dryer Heater 400")] - DryerHeater400 = 13, - } } diff --git a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs index 72120dc6b..be6302a4b 100644 --- a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs +++ b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs @@ -19,6 +19,12 @@ namespace Tango.Core [Serializable] public class ExtendedObject : INotifyPropertyChanged { + /// + /// Occurs when after InvalidateRelayCommands is called. + /// + [field: NonSerialized] + public event EventHandler RelayCommandsInvalidated; + /// /// Gets the default log manager. /// @@ -67,6 +73,8 @@ namespace Tango.Core value.RaiseCanExecuteChanged(); } } + + RelayCommandsInvalidated?.Invoke(this, new EventArgs()); })); } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_DANCERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_DANCERS.cs index 21f6d2e84..7341ceec9 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_DANCERS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_DANCERS.cs @@ -23,7 +23,10 @@ namespace Tango.DAL.Remote.DB public double K { get; set; } public double X { get; set; } public int PULSE_PER_MM_SPRING { get; set; } + public int MAXIMAL_MOVEMENT_MM { get; set; } public int ZERO_POINT { get; set; } + public int RESOLUTION_BITS { get; set; } + public int ARM_LENGTH { get; set; } public virtual HARDWARE_DANCER_TYPES HARDWARE_DANCER_TYPES { get; set; } public virtual HARDWARE_VERSIONS HARDWARE_VERSIONS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs index 9933e8a60..2124049f6 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_MOTORS.cs @@ -21,18 +21,15 @@ namespace Tango.DAL.Remote.DB public string HARDWARE_VERSION_GUID { get; set; } public int MIN_FREQUENCY { get; set; } public int MAX_FREQUENCY { get; set; } - public int MIN_MICRO_STEP { get; set; } - public int MAX_MICRO_STEP { get; set; } - public double LINEAR_RATIO { get; set; } - public int MEDIAN_POSITION { get; set; } - public double CORRECTION_GAIN { get; set; } - public double RATIO_TO_DRYER_SPEED { get; set; } - public double KP { get; set; } - public double KI { get; set; } - public double KD { get; set; } - public double CHANGE_SLOPE { get; set; } + public int SET_MICRO_STEP { get; set; } + public int MICRO_STEP { get; set; } + public double MAX_CHANGE_SLOPE { get; set; } public double HIGH_LENGTH_MICRO_SECOND { get; set; } public bool SPEED_MASTER { get; set; } + public int PULSE_PER_ROUND { get; set; } + public double PULLEY_RADIUS { get; set; } + public int CONFIG_WORD { get; set; } + public bool DIRECTION_THREAD_WIZE { get; set; } public virtual HARDWARE_MOTOR_TYPES HARDWARE_MOTOR_TYPES { get; set; } public virtual HARDWARE_VERSIONS HARDWARE_VERSIONS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_PID_CONTROLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_PID_CONTROLS.cs index 1145cc879..50b0efa47 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_PID_CONTROLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_PID_CONTROLS.cs @@ -35,6 +35,7 @@ namespace Tango.DAL.Remote.DB public double PV_INPUT_FILTER_FACTOR_MODE { get; set; } public int OUTPUT_PROPORTIONAL_CYCLE_TIME { get; set; } public int AC_HEATERS__HALF_CYCLE_TIME { get; set; } + public double PROPORTIONAL_GAIN { get; set; } public virtual HARDWARE_PID_CONTROL_TYPES HARDWARE_PID_CONTROL_TYPES { get; set; } public virtual HARDWARE_VERSIONS HARDWARE_VERSIONS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 7246e3a09..0d889d4ae 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -351,7 +351,10 @@ + + + @@ -375,18 +378,15 @@ - - - - - - - - - - + + + + + + + @@ -424,6 +424,7 @@ + @@ -2971,7 +2972,10 @@ + + + @@ -2998,18 +3002,15 @@ - - - - - - - - - - + + + + + + + @@ -3050,6 +3051,7 @@ + @@ -4945,7 +4947,10 @@ + + + @@ -4973,18 +4978,15 @@ + + + + - - - - - - - - - - + + + @@ -5010,6 +5012,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 6dcfacb9d..d6f37da08 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,72 +5,72 @@ - - - - - - + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - + - - - - - - - + + + + + + + diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs index 1506aef18..a6b8e1776 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Diagnostics { static EventTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg9FdmVudFR5cGUucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcyqbBwoJ", + "Cg9FdmVudFR5cGUucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcyrHBwoJ", "RXZlbnRUeXBlEg8KC1RocmVhZEJyZWFrEAASHwobVGhyZWFkVGVuc2lvbkNv", "bnRyb2xGYWlsdXJlEAESGgoWRmVlZGVyQ29uZUluc3VmZmljaWFudBACEhYK", "EldpbmRlckdlbmVyYWxFcnJvchADEhcKE1dpbmRlckNvbmVOb3RFeGlzdHMQ", @@ -43,8 +43,9 @@ namespace Tango.PMR.Diagnostics { "dWVzdFNlbnQQHRIUChBSZXNwb25zZVJlY2VpdmVkEB4SEQoNUmVxdWVzdEZh", "aWxlZBAfEhgKFEFwcGxpY2F0aW9uRXhjZXB0aW9uECASGgoWQXBwbGljYXRp", "b25JbmZvcm1hdGlvbhAhEhYKEkFwcGxpY2F0aW9uU3RhcnRlZBAiEhkKFUFw", - "cGxpY2F0aW9uVGVybWluYXRlZBAjQiEKH2NvbS50d2luZS50YW5nby5wbXIu", - "ZGlhZ25vc3RpY3NiBnByb3RvMw==")); + "cGxpY2F0aW9uVGVybWluYXRlZBAjEhQKEFJlY29yZGluZ1N0YXJ0ZWQQJBIU", + "ChBSZWNvcmRpbmdTdG9wcGVkECVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5k", + "aWFnbm9zdGljc2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.EventType), }, null)); @@ -55,7 +56,7 @@ namespace Tango.PMR.Diagnostics { #region Enums public enum EventType { /// - ///Dancer overshot / Thread break sensor (Group = Thread Feeding System, Category = Error, Actions = Soft Visual Notification, Abort Running Job, Prevent Job Execution) + ///Dancer overshot / Thread break sensor (Group = Thread Feeding System, Category = Error, Actions = Abort Running Job, Prevent Job Execution, Soft Visual Notification) /// [pbr::OriginalName("ThreadBreak")] ThreadBreak = 0, /// @@ -198,6 +199,14 @@ namespace Tango.PMR.Diagnostics { ///Notifies about application termination (Group = Application, Category = Info, Actions = ) /// [pbr::OriginalName("ApplicationTerminated")] ApplicationTerminated = 35, + /// + ///Occures when a diagnostics recording has been started (Group = Application, Category = Info, Actions = ) + /// + [pbr::OriginalName("RecordingStarted")] RecordingStarted = 36, + /// + ///Occures when a diagnostics recording has been stopped (Group = Application, Category = Info, Actions = ) + /// + [pbr::OriginalName("RecordingStopped")] RecordingStopped = 37, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs index 114224dea..9707399d9 100644 --- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs +++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs @@ -20,7 +20,7 @@ namespace Tango.PMR /// /// The value. /// - public static String ToOriginalName(this MessageType value) + public static String ToOriginalName(this MessageType value) { FieldInfo fi = value.GetType().GetField(value.ToString()); diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancer.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancer.cs index 38c04472c..bd150cb85 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancer.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDancer.cs @@ -23,15 +23,17 @@ namespace Tango.PMR.Hardware { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChRIYXJkd2FyZURhbmNlci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJlGhhI", - "YXJkd2FyZURhbmNlclR5cGUucHJvdG8ilQEKDkhhcmR3YXJlRGFuY2VyEkIK", + "YXJkd2FyZURhbmNlclR5cGUucHJvdG8i7gEKDkhhcmR3YXJlRGFuY2VyEkIK", "EkhhcmR3YXJlRGFuY2VyVHlwZRgBIAEoDjImLlRhbmdvLlBNUi5IYXJkd2Fy", "ZS5IYXJkd2FyZURhbmNlclR5cGUSDwoHR3JhZHVhbBgCIAEoCBIJCgFLGAMg", - "ASgBEgkKAVgYBCABKAESGAoQUHVsc2VQZXJNbVNwcmluZxgFIAEoBUIeChxj", - "b20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM=")); + "ASgBEgkKAVgYBCABKAESGAoQUHVsc2VQZXJNbVNwcmluZxgFIAEoBRIZChFN", + "YXhpbWFsTW92ZW1lbnRNbRgGIAEoBRIRCglaZXJvUG9pbnQYByABKAUSFgoO", + "UmVzb2x1dGlvbkJpdHMYCCABKAUSEQoJQXJtTGVuZ3RoGAkgASgFQh4KHGNv", + "bS50d2luZS50YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareDancerTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDancer), global::Tango.PMR.Hardware.HardwareDancer.Parser, new[]{ "HardwareDancerType", "Gradual", "K", "X", "PulsePerMmSpring" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDancer), global::Tango.PMR.Hardware.HardwareDancer.Parser, new[]{ "HardwareDancerType", "Gradual", "K", "X", "PulsePerMmSpring", "MaximalMovementMm", "ZeroPoint", "ResolutionBits", "ArmLength" }, null, null, null) })); } #endregion @@ -67,6 +69,10 @@ namespace Tango.PMR.Hardware { k_ = other.k_; x_ = other.x_; pulsePerMmSpring_ = other.pulsePerMmSpring_; + maximalMovementMm_ = other.maximalMovementMm_; + zeroPoint_ = other.zeroPoint_; + resolutionBits_ = other.resolutionBits_; + armLength_ = other.armLength_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -129,6 +135,50 @@ namespace Tango.PMR.Hardware { } } + /// Field number for the "MaximalMovementMm" field. + public const int MaximalMovementMmFieldNumber = 6; + private int maximalMovementMm_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaximalMovementMm { + get { return maximalMovementMm_; } + set { + maximalMovementMm_ = value; + } + } + + /// Field number for the "ZeroPoint" field. + public const int ZeroPointFieldNumber = 7; + private int zeroPoint_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ZeroPoint { + get { return zeroPoint_; } + set { + zeroPoint_ = value; + } + } + + /// Field number for the "ResolutionBits" field. + public const int ResolutionBitsFieldNumber = 8; + private int resolutionBits_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ResolutionBits { + get { return resolutionBits_; } + set { + resolutionBits_ = value; + } + } + + /// Field number for the "ArmLength" field. + public const int ArmLengthFieldNumber = 9; + private int armLength_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ArmLength { + get { return armLength_; } + set { + armLength_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as HardwareDancer); @@ -147,6 +197,10 @@ namespace Tango.PMR.Hardware { if (K != other.K) return false; if (X != other.X) return false; if (PulsePerMmSpring != other.PulsePerMmSpring) return false; + if (MaximalMovementMm != other.MaximalMovementMm) return false; + if (ZeroPoint != other.ZeroPoint) return false; + if (ResolutionBits != other.ResolutionBits) return false; + if (ArmLength != other.ArmLength) return false; return true; } @@ -158,6 +212,10 @@ namespace Tango.PMR.Hardware { if (K != 0D) hash ^= K.GetHashCode(); if (X != 0D) hash ^= X.GetHashCode(); if (PulsePerMmSpring != 0) hash ^= PulsePerMmSpring.GetHashCode(); + if (MaximalMovementMm != 0) hash ^= MaximalMovementMm.GetHashCode(); + if (ZeroPoint != 0) hash ^= ZeroPoint.GetHashCode(); + if (ResolutionBits != 0) hash ^= ResolutionBits.GetHashCode(); + if (ArmLength != 0) hash ^= ArmLength.GetHashCode(); return hash; } @@ -188,6 +246,22 @@ namespace Tango.PMR.Hardware { output.WriteRawTag(40); output.WriteInt32(PulsePerMmSpring); } + if (MaximalMovementMm != 0) { + output.WriteRawTag(48); + output.WriteInt32(MaximalMovementMm); + } + if (ZeroPoint != 0) { + output.WriteRawTag(56); + output.WriteInt32(ZeroPoint); + } + if (ResolutionBits != 0) { + output.WriteRawTag(64); + output.WriteInt32(ResolutionBits); + } + if (ArmLength != 0) { + output.WriteRawTag(72); + output.WriteInt32(ArmLength); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -208,6 +282,18 @@ namespace Tango.PMR.Hardware { if (PulsePerMmSpring != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(PulsePerMmSpring); } + if (MaximalMovementMm != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaximalMovementMm); + } + if (ZeroPoint != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ZeroPoint); + } + if (ResolutionBits != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ResolutionBits); + } + if (ArmLength != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ArmLength); + } return size; } @@ -231,6 +317,18 @@ namespace Tango.PMR.Hardware { if (other.PulsePerMmSpring != 0) { PulsePerMmSpring = other.PulsePerMmSpring; } + if (other.MaximalMovementMm != 0) { + MaximalMovementMm = other.MaximalMovementMm; + } + if (other.ZeroPoint != 0) { + ZeroPoint = other.ZeroPoint; + } + if (other.ResolutionBits != 0) { + ResolutionBits = other.ResolutionBits; + } + if (other.ArmLength != 0) { + ArmLength = other.ArmLength; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -261,6 +359,22 @@ namespace Tango.PMR.Hardware { PulsePerMmSpring = input.ReadInt32(); break; } + case 48: { + MaximalMovementMm = input.ReadInt32(); + break; + } + case 56: { + ZeroPoint = input.ReadInt32(); + break; + } + case 64: { + ResolutionBits = input.ReadInt32(); + break; + } + case 72: { + ArmLength = input.ReadInt32(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs index eb6743fba..093270524 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs @@ -23,20 +23,19 @@ namespace Tango.PMR.Hardware { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChNIYXJkd2FyZU1vdG9yLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUaF0hh", - "cmR3YXJlTW90b3JUeXBlLnByb3RvIvYCCg1IYXJkd2FyZU1vdG9yEkAKEUhh", + "cmR3YXJlTW90b3JUeXBlLnByb3RvItACCg1IYXJkd2FyZU1vdG9yEkAKEUhh", "cmR3YXJlTW90b3JUeXBlGAEgASgOMiUuVGFuZ28uUE1SLkhhcmR3YXJlLkhh", "cmR3YXJlTW90b3JUeXBlEhQKDE1pbkZyZXF1ZW5jeRgCIAEoBRIUCgxNYXhG", - "cmVxdWVuY3kYAyABKAUSFAoMTWluTWljcm9TdGVwGAQgASgFEhQKDE1heE1p", - "Y3JvU3RlcBgFIAEoBRITCgtMaW5lYXJSYXRpbxgGIAEoARIWCg5NZWRpYW5Q", - "b3NpdGlvbhgHIAEoBRIWCg5Db3JyZWN0aW9uR2FpbhgIIAEoARIZChFSYXRp", - "b1RvRHJ5ZXJTcGVlZBgJIAEoARIKCgJLcBgKIAEoARIKCgJLaRgLIAEoARIK", - "CgJLZBgMIAEoARITCgtDaGFuZ2VTbG9wZRgNIAEoARIdChVIaWdoTGVuZ3Ro", - "TWljcm9TZWNvbmQYDiABKAESEwoLU3BlZWRNYXN0ZXIYDyABKAhCHgocY29t", - "LnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z")); + "cmVxdWVuY3kYAyABKAUSFAoMU2V0TWljcm9TdGVwGAQgASgFEhEKCU1pY3Jv", + "U3RlcBgFIAEoBRIWCg5NYXhDaGFuZ2VTbG9wZRgGIAEoARIdChVIaWdoTGVu", + "Z3RoTWljcm9TZWNvbmQYByABKAESEwoLU3BlZWRNYXN0ZXIYCCABKAgSFQoN", + "UHVsc2VQZXJSb3VuZBgJIAEoBRIUCgxQdWxsZXlSYWRpdXMYCiABKAESEgoK", + "Q29uZmlnV29yZBgLIAEoBRIbChNEaXJlY3Rpb25UaHJlYWRXaXplGAwgASgI", + "Qh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "MinMicroStep", "MaxMicroStep", "LinearRatio", "MedianPosition", "CorrectionGain", "RatioToDryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthMicroSecond", "SpeedMaster" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize" }, null, null, null) })); } #endregion @@ -70,18 +69,15 @@ namespace Tango.PMR.Hardware { hardwareMotorType_ = other.hardwareMotorType_; minFrequency_ = other.minFrequency_; maxFrequency_ = other.maxFrequency_; - minMicroStep_ = other.minMicroStep_; - maxMicroStep_ = other.maxMicroStep_; - linearRatio_ = other.linearRatio_; - medianPosition_ = other.medianPosition_; - correctionGain_ = other.correctionGain_; - ratioToDryerSpeed_ = other.ratioToDryerSpeed_; - kp_ = other.kp_; - ki_ = other.ki_; - kd_ = other.kd_; - changeSlope_ = other.changeSlope_; + setMicroStep_ = other.setMicroStep_; + microStep_ = other.microStep_; + maxChangeSlope_ = other.maxChangeSlope_; highLengthMicroSecond_ = other.highLengthMicroSecond_; speedMaster_ = other.speedMaster_; + pulsePerRound_ = other.pulsePerRound_; + pulleyRadius_ = other.pulleyRadius_; + configWord_ = other.configWord_; + directionThreadWize_ = other.directionThreadWize_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -122,135 +118,102 @@ namespace Tango.PMR.Hardware { } } - /// Field number for the "MinMicroStep" field. - public const int MinMicroStepFieldNumber = 4; - private int minMicroStep_; + /// Field number for the "SetMicroStep" field. + public const int SetMicroStepFieldNumber = 4; + private int setMicroStep_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int MinMicroStep { - get { return minMicroStep_; } + public int SetMicroStep { + get { return setMicroStep_; } set { - minMicroStep_ = value; + setMicroStep_ = value; } } - /// Field number for the "MaxMicroStep" field. - public const int MaxMicroStepFieldNumber = 5; - private int maxMicroStep_; + /// Field number for the "MicroStep" field. + public const int MicroStepFieldNumber = 5; + private int microStep_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int MaxMicroStep { - get { return maxMicroStep_; } + public int MicroStep { + get { return microStep_; } set { - maxMicroStep_ = value; + microStep_ = value; } } - /// Field number for the "LinearRatio" field. - public const int LinearRatioFieldNumber = 6; - private double linearRatio_; + /// Field number for the "MaxChangeSlope" field. + public const int MaxChangeSlopeFieldNumber = 6; + private double maxChangeSlope_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double LinearRatio { - get { return linearRatio_; } + public double MaxChangeSlope { + get { return maxChangeSlope_; } set { - linearRatio_ = value; + maxChangeSlope_ = value; } } - /// Field number for the "MedianPosition" field. - public const int MedianPositionFieldNumber = 7; - private int medianPosition_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int MedianPosition { - get { return medianPosition_; } - set { - medianPosition_ = value; - } - } - - /// Field number for the "CorrectionGain" field. - public const int CorrectionGainFieldNumber = 8; - private double correctionGain_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double CorrectionGain { - get { return correctionGain_; } - set { - correctionGain_ = value; - } - } - - /// Field number for the "RatioToDryerSpeed" field. - public const int RatioToDryerSpeedFieldNumber = 9; - private double ratioToDryerSpeed_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double RatioToDryerSpeed { - get { return ratioToDryerSpeed_; } - set { - ratioToDryerSpeed_ = value; - } - } - - /// Field number for the "Kp" field. - public const int KpFieldNumber = 10; - private double kp_; + /// Field number for the "HighLengthMicroSecond" field. + public const int HighLengthMicroSecondFieldNumber = 7; + private double highLengthMicroSecond_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double Kp { - get { return kp_; } + public double HighLengthMicroSecond { + get { return highLengthMicroSecond_; } set { - kp_ = value; + highLengthMicroSecond_ = value; } } - /// Field number for the "Ki" field. - public const int KiFieldNumber = 11; - private double ki_; + /// Field number for the "SpeedMaster" field. + public const int SpeedMasterFieldNumber = 8; + private bool speedMaster_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double Ki { - get { return ki_; } + public bool SpeedMaster { + get { return speedMaster_; } set { - ki_ = value; + speedMaster_ = value; } } - /// Field number for the "Kd" field. - public const int KdFieldNumber = 12; - private double kd_; + /// Field number for the "PulsePerRound" field. + public const int PulsePerRoundFieldNumber = 9; + private int pulsePerRound_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double Kd { - get { return kd_; } + public int PulsePerRound { + get { return pulsePerRound_; } set { - kd_ = value; + pulsePerRound_ = value; } } - /// Field number for the "ChangeSlope" field. - public const int ChangeSlopeFieldNumber = 13; - private double changeSlope_; + /// Field number for the "PulleyRadius" field. + public const int PulleyRadiusFieldNumber = 10; + private double pulleyRadius_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double ChangeSlope { - get { return changeSlope_; } + public double PulleyRadius { + get { return pulleyRadius_; } set { - changeSlope_ = value; + pulleyRadius_ = value; } } - /// Field number for the "HighLengthMicroSecond" field. - public const int HighLengthMicroSecondFieldNumber = 14; - private double highLengthMicroSecond_; + /// Field number for the "ConfigWord" field. + public const int ConfigWordFieldNumber = 11; + private int configWord_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double HighLengthMicroSecond { - get { return highLengthMicroSecond_; } + public int ConfigWord { + get { return configWord_; } set { - highLengthMicroSecond_ = value; + configWord_ = value; } } - /// Field number for the "SpeedMaster" field. - public const int SpeedMasterFieldNumber = 15; - private bool speedMaster_; + /// Field number for the "DirectionThreadWize" field. + public const int DirectionThreadWizeFieldNumber = 12; + private bool directionThreadWize_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool SpeedMaster { - get { return speedMaster_; } + public bool DirectionThreadWize { + get { return directionThreadWize_; } set { - speedMaster_ = value; + directionThreadWize_ = value; } } @@ -270,18 +233,15 @@ namespace Tango.PMR.Hardware { if (HardwareMotorType != other.HardwareMotorType) return false; if (MinFrequency != other.MinFrequency) return false; if (MaxFrequency != other.MaxFrequency) return false; - if (MinMicroStep != other.MinMicroStep) return false; - if (MaxMicroStep != other.MaxMicroStep) return false; - if (LinearRatio != other.LinearRatio) return false; - if (MedianPosition != other.MedianPosition) return false; - if (CorrectionGain != other.CorrectionGain) return false; - if (RatioToDryerSpeed != other.RatioToDryerSpeed) return false; - if (Kp != other.Kp) return false; - if (Ki != other.Ki) return false; - if (Kd != other.Kd) return false; - if (ChangeSlope != other.ChangeSlope) return false; + if (SetMicroStep != other.SetMicroStep) return false; + if (MicroStep != other.MicroStep) return false; + if (MaxChangeSlope != other.MaxChangeSlope) return false; if (HighLengthMicroSecond != other.HighLengthMicroSecond) return false; if (SpeedMaster != other.SpeedMaster) return false; + if (PulsePerRound != other.PulsePerRound) return false; + if (PulleyRadius != other.PulleyRadius) return false; + if (ConfigWord != other.ConfigWord) return false; + if (DirectionThreadWize != other.DirectionThreadWize) return false; return true; } @@ -291,18 +251,15 @@ namespace Tango.PMR.Hardware { if (HardwareMotorType != 0) hash ^= HardwareMotorType.GetHashCode(); if (MinFrequency != 0) hash ^= MinFrequency.GetHashCode(); if (MaxFrequency != 0) hash ^= MaxFrequency.GetHashCode(); - if (MinMicroStep != 0) hash ^= MinMicroStep.GetHashCode(); - if (MaxMicroStep != 0) hash ^= MaxMicroStep.GetHashCode(); - if (LinearRatio != 0D) hash ^= LinearRatio.GetHashCode(); - if (MedianPosition != 0) hash ^= MedianPosition.GetHashCode(); - if (CorrectionGain != 0D) hash ^= CorrectionGain.GetHashCode(); - if (RatioToDryerSpeed != 0D) hash ^= RatioToDryerSpeed.GetHashCode(); - if (Kp != 0D) hash ^= Kp.GetHashCode(); - if (Ki != 0D) hash ^= Ki.GetHashCode(); - if (Kd != 0D) hash ^= Kd.GetHashCode(); - if (ChangeSlope != 0D) hash ^= ChangeSlope.GetHashCode(); + if (SetMicroStep != 0) hash ^= SetMicroStep.GetHashCode(); + if (MicroStep != 0) hash ^= MicroStep.GetHashCode(); + if (MaxChangeSlope != 0D) hash ^= MaxChangeSlope.GetHashCode(); if (HighLengthMicroSecond != 0D) hash ^= HighLengthMicroSecond.GetHashCode(); if (SpeedMaster != false) hash ^= SpeedMaster.GetHashCode(); + if (PulsePerRound != 0) hash ^= PulsePerRound.GetHashCode(); + if (PulleyRadius != 0D) hash ^= PulleyRadius.GetHashCode(); + if (ConfigWord != 0) hash ^= ConfigWord.GetHashCode(); + if (DirectionThreadWize != false) hash ^= DirectionThreadWize.GetHashCode(); return hash; } @@ -325,53 +282,41 @@ namespace Tango.PMR.Hardware { output.WriteRawTag(24); output.WriteInt32(MaxFrequency); } - if (MinMicroStep != 0) { + if (SetMicroStep != 0) { output.WriteRawTag(32); - output.WriteInt32(MinMicroStep); + output.WriteInt32(SetMicroStep); } - if (MaxMicroStep != 0) { + if (MicroStep != 0) { output.WriteRawTag(40); - output.WriteInt32(MaxMicroStep); + output.WriteInt32(MicroStep); } - if (LinearRatio != 0D) { + if (MaxChangeSlope != 0D) { output.WriteRawTag(49); - output.WriteDouble(LinearRatio); + output.WriteDouble(MaxChangeSlope); } - if (MedianPosition != 0) { - output.WriteRawTag(56); - output.WriteInt32(MedianPosition); + if (HighLengthMicroSecond != 0D) { + output.WriteRawTag(57); + output.WriteDouble(HighLengthMicroSecond); } - if (CorrectionGain != 0D) { - output.WriteRawTag(65); - output.WriteDouble(CorrectionGain); + if (SpeedMaster != false) { + output.WriteRawTag(64); + output.WriteBool(SpeedMaster); } - if (RatioToDryerSpeed != 0D) { - output.WriteRawTag(73); - output.WriteDouble(RatioToDryerSpeed); + if (PulsePerRound != 0) { + output.WriteRawTag(72); + output.WriteInt32(PulsePerRound); } - if (Kp != 0D) { + if (PulleyRadius != 0D) { output.WriteRawTag(81); - output.WriteDouble(Kp); - } - if (Ki != 0D) { - output.WriteRawTag(89); - output.WriteDouble(Ki); + output.WriteDouble(PulleyRadius); } - if (Kd != 0D) { - output.WriteRawTag(97); - output.WriteDouble(Kd); + if (ConfigWord != 0) { + output.WriteRawTag(88); + output.WriteInt32(ConfigWord); } - if (ChangeSlope != 0D) { - output.WriteRawTag(105); - output.WriteDouble(ChangeSlope); - } - if (HighLengthMicroSecond != 0D) { - output.WriteRawTag(113); - output.WriteDouble(HighLengthMicroSecond); - } - if (SpeedMaster != false) { - output.WriteRawTag(120); - output.WriteBool(SpeedMaster); + if (DirectionThreadWize != false) { + output.WriteRawTag(96); + output.WriteBool(DirectionThreadWize); } } @@ -387,40 +332,31 @@ namespace Tango.PMR.Hardware { if (MaxFrequency != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxFrequency); } - if (MinMicroStep != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinMicroStep); - } - if (MaxMicroStep != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxMicroStep); - } - if (LinearRatio != 0D) { - size += 1 + 8; - } - if (MedianPosition != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MedianPosition); + if (SetMicroStep != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetMicroStep); } - if (CorrectionGain != 0D) { - size += 1 + 8; + if (MicroStep != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MicroStep); } - if (RatioToDryerSpeed != 0D) { + if (MaxChangeSlope != 0D) { size += 1 + 8; } - if (Kp != 0D) { + if (HighLengthMicroSecond != 0D) { size += 1 + 8; } - if (Ki != 0D) { - size += 1 + 8; + if (SpeedMaster != false) { + size += 1 + 1; } - if (Kd != 0D) { - size += 1 + 8; + if (PulsePerRound != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PulsePerRound); } - if (ChangeSlope != 0D) { + if (PulleyRadius != 0D) { size += 1 + 8; } - if (HighLengthMicroSecond != 0D) { - size += 1 + 8; + if (ConfigWord != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ConfigWord); } - if (SpeedMaster != false) { + if (DirectionThreadWize != false) { size += 1 + 1; } return size; @@ -440,35 +376,14 @@ namespace Tango.PMR.Hardware { if (other.MaxFrequency != 0) { MaxFrequency = other.MaxFrequency; } - if (other.MinMicroStep != 0) { - MinMicroStep = other.MinMicroStep; - } - if (other.MaxMicroStep != 0) { - MaxMicroStep = other.MaxMicroStep; + if (other.SetMicroStep != 0) { + SetMicroStep = other.SetMicroStep; } - if (other.LinearRatio != 0D) { - LinearRatio = other.LinearRatio; + if (other.MicroStep != 0) { + MicroStep = other.MicroStep; } - if (other.MedianPosition != 0) { - MedianPosition = other.MedianPosition; - } - if (other.CorrectionGain != 0D) { - CorrectionGain = other.CorrectionGain; - } - if (other.RatioToDryerSpeed != 0D) { - RatioToDryerSpeed = other.RatioToDryerSpeed; - } - if (other.Kp != 0D) { - Kp = other.Kp; - } - if (other.Ki != 0D) { - Ki = other.Ki; - } - if (other.Kd != 0D) { - Kd = other.Kd; - } - if (other.ChangeSlope != 0D) { - ChangeSlope = other.ChangeSlope; + if (other.MaxChangeSlope != 0D) { + MaxChangeSlope = other.MaxChangeSlope; } if (other.HighLengthMicroSecond != 0D) { HighLengthMicroSecond = other.HighLengthMicroSecond; @@ -476,6 +391,18 @@ namespace Tango.PMR.Hardware { if (other.SpeedMaster != false) { SpeedMaster = other.SpeedMaster; } + if (other.PulsePerRound != 0) { + PulsePerRound = other.PulsePerRound; + } + if (other.PulleyRadius != 0D) { + PulleyRadius = other.PulleyRadius; + } + if (other.ConfigWord != 0) { + ConfigWord = other.ConfigWord; + } + if (other.DirectionThreadWize != false) { + DirectionThreadWize = other.DirectionThreadWize; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -499,51 +426,39 @@ namespace Tango.PMR.Hardware { break; } case 32: { - MinMicroStep = input.ReadInt32(); + SetMicroStep = input.ReadInt32(); break; } case 40: { - MaxMicroStep = input.ReadInt32(); + MicroStep = input.ReadInt32(); break; } case 49: { - LinearRatio = input.ReadDouble(); + MaxChangeSlope = input.ReadDouble(); break; } - case 56: { - MedianPosition = input.ReadInt32(); + case 57: { + HighLengthMicroSecond = input.ReadDouble(); break; } - case 65: { - CorrectionGain = input.ReadDouble(); + case 64: { + SpeedMaster = input.ReadBool(); break; } - case 73: { - RatioToDryerSpeed = input.ReadDouble(); + case 72: { + PulsePerRound = input.ReadInt32(); break; } case 81: { - Kp = input.ReadDouble(); - break; - } - case 89: { - Ki = input.ReadDouble(); - break; - } - case 97: { - Kd = input.ReadDouble(); + PulleyRadius = input.ReadDouble(); break; } - case 105: { - ChangeSlope = input.ReadDouble(); + case 88: { + ConfigWord = input.ReadInt32(); break; } - case 113: { - HighLengthMicroSecond = input.ReadDouble(); - break; - } - case 120: { - SpeedMaster = input.ReadBool(); + case 96: { + DirectionThreadWize = input.ReadBool(); break; } } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs index 658f4463c..022e0c5b9 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControl.cs @@ -23,7 +23,7 @@ namespace Tango.PMR.Hardware { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChhIYXJkd2FyZVBpZENvbnRyb2wucHJvdG8SElRhbmdvLlBNUi5IYXJkd2Fy", - "ZRocSGFyZHdhcmVQaWRDb250cm9sVHlwZS5wcm90byLcBAoSSGFyZHdhcmVQ", + "ZRocSGFyZHdhcmVQaWRDb250cm9sVHlwZS5wcm90byL2BAoSSGFyZHdhcmVQ", "aWRDb250cm9sEkoKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUYASABKA4yKi5U", "YW5nby5QTVIuSGFyZHdhcmUuSGFyZHdhcmVQaWRDb250cm9sVHlwZRIkChxP", "dXRwdXRQcm9wb3J0aW9uYWxQb3dlckxpbWl0GAIgASgBEh4KFk91dHB1dFBy", @@ -37,12 +37,12 @@ namespace Tango.PMR.Hardware { "IAEoARIjChtQcm9jZXNzVmFyaWFibGVTYW1wbGluZ1JhdGUYDiABKAESHwoX", "UHZJbnB1dEZpbHRlckZhY3Rvck1vZGUYDyABKAESIwobT3V0cHV0UHJvcG9y", "dGlvbmFsQ3ljbGVUaW1lGBAgASgFEh4KFkFjSGVhdGVyc0hhbGZDeWNsZVRp", - "bWUYESABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv", - "dG8z")); + "bWUYESABKAUSGAoQUHJvcG9ydGlvbmFsR2FpbhgSIAEoAUIeChxjb20udHdp", + "bmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwarePidControlTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwarePidControl), global::Tango.PMR.Hardware.HardwarePidControl.Parser, new[]{ "HardwarePidControlType", "OutputProportionalPowerLimit", "OutputProportionalBand", "IntegralTime", "DerivativeTime", "SensorCorrectionAdjustment", "SensorMinValue", "SensorMaxValue", "SetPointRampRateorSoftStartRamp", "SetPointControlOutputRate", "ControlOutputType", "SsrControlOutputType", "OutputOnOffHysteresisValue", "ProcessVariableSamplingRate", "PvInputFilterFactorMode", "OutputProportionalCycleTime", "AcHeatersHalfCycleTime" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwarePidControl), global::Tango.PMR.Hardware.HardwarePidControl.Parser, new[]{ "HardwarePidControlType", "OutputProportionalPowerLimit", "OutputProportionalBand", "IntegralTime", "DerivativeTime", "SensorCorrectionAdjustment", "SensorMinValue", "SensorMaxValue", "SetPointRampRateorSoftStartRamp", "SetPointControlOutputRate", "ControlOutputType", "SsrControlOutputType", "OutputOnOffHysteresisValue", "ProcessVariableSamplingRate", "PvInputFilterFactorMode", "OutputProportionalCycleTime", "AcHeatersHalfCycleTime", "ProportionalGain" }, null, null, null) })); } #endregion @@ -90,6 +90,7 @@ namespace Tango.PMR.Hardware { pvInputFilterFactorMode_ = other.pvInputFilterFactorMode_; outputProportionalCycleTime_ = other.outputProportionalCycleTime_; acHeatersHalfCycleTime_ = other.acHeatersHalfCycleTime_; + proportionalGain_ = other.proportionalGain_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -284,6 +285,17 @@ namespace Tango.PMR.Hardware { } } + /// Field number for the "ProportionalGain" field. + public const int ProportionalGainFieldNumber = 18; + private double proportionalGain_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double ProportionalGain { + get { return proportionalGain_; } + set { + proportionalGain_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as HardwarePidControl); @@ -314,6 +326,7 @@ namespace Tango.PMR.Hardware { if (PvInputFilterFactorMode != other.PvInputFilterFactorMode) return false; if (OutputProportionalCycleTime != other.OutputProportionalCycleTime) return false; if (AcHeatersHalfCycleTime != other.AcHeatersHalfCycleTime) return false; + if (ProportionalGain != other.ProportionalGain) return false; return true; } @@ -337,6 +350,7 @@ namespace Tango.PMR.Hardware { if (PvInputFilterFactorMode != 0D) hash ^= PvInputFilterFactorMode.GetHashCode(); if (OutputProportionalCycleTime != 0) hash ^= OutputProportionalCycleTime.GetHashCode(); if (AcHeatersHalfCycleTime != 0) hash ^= AcHeatersHalfCycleTime.GetHashCode(); + if (ProportionalGain != 0D) hash ^= ProportionalGain.GetHashCode(); return hash; } @@ -415,6 +429,10 @@ namespace Tango.PMR.Hardware { output.WriteRawTag(136, 1); output.WriteInt32(AcHeatersHalfCycleTime); } + if (ProportionalGain != 0D) { + output.WriteRawTag(145, 1); + output.WriteDouble(ProportionalGain); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -471,6 +489,9 @@ namespace Tango.PMR.Hardware { if (AcHeatersHalfCycleTime != 0) { size += 2 + pb::CodedOutputStream.ComputeInt32Size(AcHeatersHalfCycleTime); } + if (ProportionalGain != 0D) { + size += 2 + 8; + } return size; } @@ -530,6 +551,9 @@ namespace Tango.PMR.Hardware { if (other.AcHeatersHalfCycleTime != 0) { AcHeatersHalfCycleTime = other.AcHeatersHalfCycleTime; } + if (other.ProportionalGain != 0D) { + ProportionalGain = other.ProportionalGain; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -608,6 +632,10 @@ namespace Tango.PMR.Hardware { AcHeatersHalfCycleTime = input.ReadInt32(); break; } + case 145: { + ProportionalGain = input.ReadDouble(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs index fe6f6ab97..ec7ae44c1 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwarePidControlType.cs @@ -23,14 +23,13 @@ namespace Tango.PMR.Hardware { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChxIYXJkd2FyZVBpZENvbnRyb2xUeXBlLnByb3RvEhJUYW5nby5QTVIuSGFy", - "ZHdhcmUqnAIKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUSFAoQRHJ5ZXJIZWF0", + "ZHdhcmUqiAIKFkhhcmR3YXJlUGlkQ29udHJvbFR5cGUSFAoQRHJ5ZXJIZWF0", "ZXIxMDAwdxAAEhQKEERyeWVySGVhdGVyMjAwdzEQARIUChBEcnllckhlYXRl", "cjIwMHcyEAISEAoMSGVhZEhlYXRlcloxEAMSEAoMSGVhZEhlYXRlcloyEAQS", "EAoMSGVhZEhlYXRlclozEAUSEAoMSGVhZEhlYXRlclo0EAYSDwoLTWl4ZXJI", "ZWF0ZXIQBxIQCgxXYXN0ZUNvbnRyb2wQCBIOCgpNb3RvckRyeWVyEAkSDwoL", "TW90b3JGZWVkZXIQChIPCgtNb3RvclBvb2xlchALEg8KC01vdG9yV2luZGVy", - "EAwSEgoORHJ5ZXJIZWF0ZXI0MDAQDUIeChxjb20udHdpbmUudGFuZ28ucG1y", - "LmhhcmR3YXJlYgZwcm90bzM=")); + "EAxCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.HardwarePidControlType), }, null)); @@ -92,10 +91,6 @@ namespace Tango.PMR.Hardware { ///Winder Motor /// [pbr::OriginalName("MotorWinder")] MotorWinder = 12, - /// - ///Dryer Heater 400 - /// - [pbr::OriginalName("DryerHeater400")] DryerHeater400 = 13, } #endregion -- cgit v1.3.1