using CCDCount.DLL; using CCDCount.DLL.SqlDataClass; using CCDCount.MODEL.AuditTrailModel; using CCDCount.MODEL.ConfigModel; using LogClass; using MvCameraControl; using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Imaging; using static System.Net.Mime.MediaTypeNames; namespace CCDCountWpf.WpfPage { /// /// MainPage.xaml 的交互逻辑 /// public partial class MainPage : Page { #region 变量与实例 #endregion public MainPage() { InitializeComponent(); DataContext = ShowMessageBus.ShowBinding; InitFormationItems(); } private void DataClear_Click(object sender, RoutedEventArgs e) { if(MessageBus.MainThreadS.Count=0) { if (MessageBus.MainThreadS[MessageBus.NowLoadCameraIndex].CameraRunStatic) { StartIdentifyBtn.IsEnabled = false; StartIdentifyBtn.Opacity = 0.5; StopIdentifyBtn.IsEnabled = true; StopIdentifyBtn.Opacity = 1; } else { StartIdentifyBtn.IsEnabled = true; StartIdentifyBtn.Opacity = 1; StopIdentifyBtn.IsEnabled = false; StopIdentifyBtn.Opacity = 0.5; } } } private void MiniShowImageBox2_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if(MessageBus.MainThreadS.Count < 2) return; MessageBus.NowLoadCameraIndex = 1; } private void MiniShowImageBox1_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (MessageBus.MainThreadS.Count < 1) return; MessageBus.NowLoadCameraIndex = 0; } private void MiniShowImageBox3_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (MessageBus.MainThreadS.Count < 3) return; MessageBus.NowLoadCameraIndex = 2; } private void MiniShowImageBox4_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (MessageBus.MainThreadS.Count < 4) return; MessageBus.NowLoadCameraIndex = 3; } /// /// 启动相机识别 /// private void RunCameraIdentify() { for (int i = 0; i < MessageBus.MainThreadS.Count; i++) { MessageBus.MainThreadS[i].BatchNumber = ShowMessageBus.ShowBinding.BatchNumber; if (MessageBus.MainThreadS[i].CameraConfigIsChange) { MessageBus.MainThreadS[i].ReLoadCameraConfig(); } //启动单相机实例的全部线程 if (!MessageBus.MainThreadS[i].StartMianThread()) { FaultLog.RecordErrorMessage(MessageBus.MainThreadS[i].cameraConfig.DeviceName + "_" + MessageBus.MainThreadS[i].cameraConfig.CameraSNNum + "启动失败", "CCDCountWpf:MainPage-RunCameraIdentify"); //LOG.error(MessageBus.MainThreadS[i].cameraConfig.DeviceName + "_" + MessageBus.MainThreadS[i].cameraConfig.CameraSNNum + "启动失败"); MessageBox.Show(MessageBus.MainThreadS[i].cameraConfig.DeviceName + "_" + MessageBus.MainThreadS[i].cameraConfig.CameraSNNum + "启动失败"); continue; } } MessageBus.NowLoadCammeraSN = MessageBus.MainThreadS[0].cameraConfig.CameraSNNum; MessageBus.SeetingNowLoadInMaThreadsIndex = 0; MessageBus.NowLoadCameraIndex = 0; } /// /// 停止相机识别 /// private void StopCameraIdentify() { for (int i = 0; i < MessageBus.MainThreadS.Count; i++) { //启动单相机实例的全部线程 if (!MessageBus.MainThreadS[i].StopMianThread()) { FaultLog.RecordErrorMessage(MessageBus.MainThreadS[i].cameraConfig.DeviceName + "_" + MessageBus.MainThreadS[i].cameraConfig.CameraSNNum + "关闭失败", "CCDCountWpf:MainPage-StopCameraIdentify"); MessageBox.Show(MessageBus.MainThreadS[i].cameraConfig.DeviceName + "_" + MessageBus.MainThreadS[i].cameraConfig.CameraSNNum + "关闭失败"); continue; } } } private bool RunBatchIsRun =false; /// /// 运行批次记录 /// /// private void RunBatchRecord(string BatchNumber) { if (RunBatchIsRun) { return; } List batchRecordModels = new List(); Stopwatch stopwatch = new Stopwatch(); BatchMessSqliteDataClass batchMessSqliteData = new BatchMessSqliteDataClass($"{AppDomain.CurrentDomain.BaseDirectory}DATA\\BatchData\\BatchData_{BatchNumber}.db"); RunBatchIsRun = true; Task.Run(() => { while (RunBatchIsRun) { stopwatch.Restart(); DateTime RecordTime = DateTime.Now; var OutTimeBatch = batchRecordModels.Where(x => x.RecordTime.AddMinutes(1) < RecordTime).ToList(); OutTimeBatch.ForEach(x => batchRecordModels.Remove(x)); PlcSettingMessageBus.pLCManagement.ReadBottingVibrationTableHighSpeedValue(out ushort BottingVibrationTableHighSpeedValue, out ushort FilterVibrationTableHighSpeedValue, out ushort CountVibrationTableHighSpeedValue); PlcSettingMessageBus.pLCManagement.ReadBottingCount(out ushort BottingCount); ushort CountSPeed = (ushort)(batchRecordModels.Count() > 0 ? (BottingCount - batchRecordModels.Min(o => o.BottingCount)) > 0 ? BottingCount - batchRecordModels.Min(o => o.BottingCount) : 0 : 0); ShowMessageBus.ShowBinding.BottingSpeed = CountSPeed; BatchRecordModel batchRecordModel = new BatchRecordModel { BatchNunber = BatchNumber, MaterialCylinderVibrationTableSpeed = BottingVibrationTableHighSpeedValue, FilterVibrationTableSpeed = FilterVibrationTableHighSpeedValue, CountVibrationTableSpeed = CountVibrationTableHighSpeedValue, BottingCount = BottingCount, BottingSpeed = CountSPeed, RecordTime = RecordTime }; batchMessSqliteData.InsertBatchMessage(batchRecordModel); batchRecordModels.Add(batchRecordModel); stopwatch.Stop(); int SleepTime = 998 - (int)stopwatch.ElapsedMilliseconds; if(SleepTime > 0) { Thread.Sleep(SleepTime); } } }); } private void StopBatchRecord() { RunBatchIsRun = false; } private void StartIdentifyBtn_Click(object sender, RoutedEventArgs e) { if(String.IsNullOrWhiteSpace(ShowMessageBus.ShowBinding.BatchNumber)) { MessageBox.Show("请输入批次号!"); return; } RunBatchRecord(ShowMessageBus.ShowBinding.BatchNumber); RunCameraIdentify(); StartIdentifyBtn.IsEnabled = false; StartIdentifyBtn.Opacity = 0.5; StopIdentifyBtn.IsEnabled = true; StopIdentifyBtn.Opacity = 1; if(PlcSettingMessageBus.pLCManagement.IsConnect) { PlcSettingMessageBus.pLCManagement.InitiateToTrue(); } } private void StopIdentifyBtn_Click(object sender, RoutedEventArgs e) { StopCameraIdentify(); StopBatchRecord(); StartIdentifyBtn.IsEnabled = true; StartIdentifyBtn.Opacity = 1; StopIdentifyBtn.IsEnabled = false; StopIdentifyBtn.Opacity = 0.5; if (PlcSettingMessageBus.pLCManagement.IsConnect) { PlcSettingMessageBus.pLCManagement.StopToTrue(); } } private void BottingMaterialCylinderVibrationTableHighSpeedValueUpUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue + 10) > PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue += 10; } } private void BottingMaterialCylinderVibrationTableHighSpeedValueUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue + 1) > PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue += 1; } } private void BottingMaterialCylinderVibrationTableHighSpeedValueDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue - 1) < PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue -= 1; } } private void BottingMaterialCylinderVibrationTableHighSpeedValueDownDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue - 10) < PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue -= 10; } } private void BottingFilterVibrationTableHighSpeedValueUpUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue + 10) > PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue += 10; } } private void BottingFilterVibrationTableHighSpeedValueUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue + 1) > PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue += 1; } } private void BottingFilterVibrationTableHighSpeedValueDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue - 1) < PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue -= 1; } } private void BottingFilterVibrationTableHighSpeedValueDownDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue - 10) < PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue -= 10; } } private void BottingCountVibrationTableHighSpeedValueUpUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue + 10) > PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue += 10; } } private void BottingCountVibrationTableHighSpeedValueUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue + 1) > PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue += 1; } } private void BottingCountVibrationTableHighSpeedValueDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue - 1) < PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue -= 1; } } private void BottingCountVibrationTableHighSpeedValueDownDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue - 10) < PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue) { PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue -= 10; } } private void BottValueSetUpUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet + 5) > PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet) { PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet += 5; } } private void BottValueSetUpBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet + 1) > PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet) { PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet += 1; } } private void BottValueSetDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet - 1) < PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet) { PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet -= 1; } } private void BottValueSetDownDownBtn_Click(object sender, RoutedEventArgs e) { if ((ushort)(PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet - 5) < PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet) { PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet -= 5; } } private void TextBox_KeyDown(object sender,KeyEventArgs e) { if (e.Key == Key.Enter) { TextBox textBox = sender as TextBox; if (textBox != null) { // 强制更新源数据 BindingExpression bindingExpression = textBox.GetBindingExpression(TextBox.TextProperty); bindingExpression.UpdateSource(); } } } /// /// 初始化配方列表 /// private void InitFormationItems() { string folderPath = $"{AppDomain.CurrentDomain.BaseDirectory}Formulations"; if (!Directory.Exists(folderPath)) { // 创建文件夹 Directory.CreateDirectory(folderPath); } try { // 获取文件列表(包含子目录) string[] files = Directory.GetFiles(folderPath, "*.*", SearchOption.AllDirectories); ShowMessageBus.ShowBinding.FormulationItems.Clear(); foreach (string file in files) { ShowMessageBus.ShowBinding.FormulationItems.Add(Path.GetFileNameWithoutExtension(file)); } if (ShowMessageBus.ShowBinding.FormulationName != null && ShowMessageBus.ShowBinding.FormulationName != string.Empty) { try { FormulationCoBox.SelectedItem = ShowMessageBus.ShowBinding.FormulationName; } catch { } } } catch { } } private void SaveFormulationBtn_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(ShowMessageBus.ShowBinding.FormulationName)) { MessageBox.Show("请输入配方名称!"); return; } var ParaValue = PlcSettingMessageBus.pLCManagement.ReadAllPara(); FormulationConfigClass formulationConfigClass = FormulationClass.InitFormulation( MessageBus.NowSettingLoadMainThread.cameraConfig, MessageBus.NowSettingLoadMainThread.shuLiConfig,ParaValue); if (formulationConfigClass == null) { MessageBox.Show("获取参数失败,请检查与PLC的连接"); return; } formulationConfigClass.FormulationName = ShowMessageBus.ShowBinding.FormulationName; string folderPath = $"{AppDomain.CurrentDomain.BaseDirectory}Formulations"; string FilePath = folderPath + "\\" + ShowMessageBus.ShowBinding.FormulationName + ".xml"; if (File.Exists(FilePath)) { var confirmResult = MessageBox.Show("配方已存在,是否覆盖?", "保存确认", MessageBoxButton.YesNo); if (confirmResult == MessageBoxResult.No) { return; } } if (!Directory.Exists(folderPath)) Directory.CreateDirectory(folderPath); { XmlStorage.SerializeToXml(formulationConfigClass, FilePath); InitFormationItems(); MessageBus.NowSettingLoadMainThread.FormulationName = formulationConfigClass.FormulationName; MessageBus.NowSettingLoadMainThread.IsLoadFormulation = true; MessageBox.Show("保存成功"); } } private void ReadFormulationBtn_Click(object sender, RoutedEventArgs e) { string folderPath = $"{AppDomain.CurrentDomain.BaseDirectory}Formulations\\{FormulationCoBox.SelectedItem}.xml"; if (!File.Exists(folderPath)) { MessageBox.Show("指定文件不存在,请选择一个正确的配方"); return; } try { FormulationConfigClass formulationConfigClass = null; formulationConfigClass = XmlStorage.DeserializeFromXml(folderPath); LoadFormulation(formulationConfigClass); MessageBus.NowSettingLoadMainThread.FormulationName = formulationConfigClass.FormulationName; MessageBus.NowSettingLoadMainThread.IsLoadFormulation = true; MessageBox.Show("加载成功"); } catch (Exception ex) { MessageBox.Show($"读取文件时出错:{ex.Message}"); } } /// /// 加载配方 /// /// private void LoadFormulation(FormulationConfigClass FormulationConfig) { ShowMessageBus.ShowBinding.AcquistionLineRate = FormulationConfig.AcquistionLineRateValue.ToString(); ShowMessageBus.ShowBinding.ExposureTimeValue = FormulationConfig.ExposureTimeValue.ToString(); ShowMessageBus.ShowBinding.Channel = FormulationConfig.Channel.ToString(); ShowMessageBus.ShowBinding.FormulationName = FormulationConfig.FormulationName; ShowMessageBus.ShowBinding.MAX_OBJECT_LENGTH = FormulationConfig.MAX_Object_LENGTH.ToString(); ShowMessageBus.ShowBinding.MIN_OBJECT_LENGTH = FormulationConfig.MIN_Object_LENGTH.ToString(); ShowMessageBus.ShowBinding.PandingCode = FormulationConfig.PandingCode.ToString(); ShowMessageBus.ShowBinding.RegionThreshold = FormulationConfig.RegionThreshold.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.SpeedModeRunningSpeed = FormulationConfig.SpeedModeRunningSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.JogSpeed = FormulationConfig.JogSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottValueSet = FormulationConfig.BottValueSet; PlcSettingMessageBus.PlcMessageShowBindage.TransferValveOpeningSpeed = FormulationConfig.TransferValveOpeningSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.TransferValveOpeningTime = FormulationConfig.TransferValveOpeningTime; PlcSettingMessageBus.PlcMessageShowBindage.BottingDecelerationValue = FormulationConfig.BottingDecelerationValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheDecelerationValue = FormulationConfig.CacheDecelerationValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheCountDelayTiming = FormulationConfig.CacheCountDelayTiming; PlcSettingMessageBus.PlcMessageShowBindage.CacheShutdownValue = FormulationConfig.CacheShutdownValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableHighSpeedValue = FormulationConfig.BottingMaterialCylinderVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableHighSpeedValue = FormulationConfig.BottingFilterVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableHighSpeedValue = FormulationConfig.BottingCountVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingMaterialCylinderVibrationTableDecelerationSpeedValue = FormulationConfig.BottingMaterialCylinderVibrationTableDecelerationSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingFilterVibrationTableDecelerationSpeedValue = FormulationConfig.BottingFilterVibrationTableDecelerationSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.BottingCountVibrationTableDecelerationSpeedValue = FormulationConfig.BottingCountVibrationTableDecelerationSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheMaterialCylinderVibrationTableHighSpeedValue = FormulationConfig.CacheMaterialCylinderVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheFilterVibrationTableHighSpeedValue = FormulationConfig.CacheFilterVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheCountVibrationTableHighSpeedValue = FormulationConfig.CacheCountVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheMaterialCylinderVibrationTableDecelerationSpeedValue = FormulationConfig.CacheMaterialCylinderVibrationTableDecelerationSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheMaterialCylinderVibrationTableHighSpeedValue = FormulationConfig.CacheMaterialCylinderVibrationTableHighSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.CacheCountVibrationTableDecelerationSpeedValue = FormulationConfig.CacheCountVibrationTableDecelerationSpeedValue; PlcSettingMessageBus.PlcMessageShowBindage.GateOpeningDelay = FormulationConfig.GateOpeningDelay; PlcSettingMessageBus.PlcMessageShowBindage.ReturnToZeroOffsetValue = FormulationConfig.ReturnToZeroOffsetValue.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.ReturnToZeroOffsetSpeed = FormulationConfig.ReturnToZeroOffsetSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.TransferValveClosingSpeed = FormulationConfig.TransferValveClosingSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.TransferValveOpenPosition = FormulationConfig.TransferValveOpenPosition.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.TransferValveClosePosition = FormulationConfig.TransferValveClosePosition.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.AirValveOpeningDelay = FormulationConfig.AirValveOpeningDelay; PlcSettingMessageBus.PlcMessageShowBindage.BottlingShutdownValue = FormulationConfig.BottlingShutdownValue; PlcSettingMessageBus.PlcMessageShowBindage.BottlingShutdownTime = FormulationConfig.BottlingShutdownTime; PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelRunningSpeed = FormulationConfig.BottleFeedingWheelRunningSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelJogRunningSpeed = FormulationConfig.BottleFeedingWheelJogRunningSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelReturnToZeroOffsetValue = FormulationConfig.BottleFeedingWheelReturnToZeroOffsetValue.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelReturnToZeroSpeed = FormulationConfig.BottleFeedingWheelReturnToZeroSpeed.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelPositionLength = FormulationConfig.BottleFeedingWheelPositionLength.ToString(); PlcSettingMessageBus.PlcMessageShowBindage.BottleFeedingWheelPauseTime = FormulationConfig.BottleFeedingWheelPauseTime; PlcSettingMessageBus.PlcMessageShowBindage.DelayBlanking = FormulationConfig.DelayBlanking; } } }