终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

188 lines
13 KiB

  1. <UserControl x:Class="BPASmartClient.MorkF.View.DebugView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MorkF.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MorkF.ViewModel"
  8. x:Name="调试界面"
  9. mc:Ignorable="d"
  10. d:DesignHeight="900" d:DesignWidth="1300">
  11. <UserControl.DataContext>
  12. <vm:DebugViewModel/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid>
  23. <ScrollViewer>
  24. <Grid>
  25. <Grid.RowDefinitions>
  26. <RowDefinition Height="81" ></RowDefinition>
  27. <RowDefinition Height="81" ></RowDefinition>
  28. <RowDefinition Height="325"></RowDefinition>
  29. <RowDefinition></RowDefinition>
  30. </Grid.RowDefinitions>
  31. <GroupBox Header="设备控制" FontSize="15" Foreground="Aqua" VerticalAlignment="Center" >
  32. <Grid Height="50">
  33. <Grid.RowDefinitions>
  34. <RowDefinition Height="1*"/>
  35. <RowDefinition Height="1*"/>
  36. </Grid.RowDefinitions>
  37. <WrapPanel Orientation="Horizontal">
  38. <TextBlock Text="炒锅选择:" Margin="10,0"/>
  39. <ComboBox ItemsSource="{Binding lstFry}" Width="80" Margin="10,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center"
  40. SelectedValue="{Binding FryGear}" SelectedIndex="0"/>
  41. <Button Content="设定" Margin="0,0,30,0" Command="{Binding SetFry}"/>
  42. <Button Content="炒锅初始化" Command="{Binding PlcInite}" Cursor="Hand" Margin="10,0"/>
  43. <Button Content="炒锅复位" Command="{Binding Plc1Reset}" Cursor="Hand" Margin="10,0"/>
  44. </WrapPanel>
  45. </Grid>
  46. </GroupBox>
  47. <GroupBox Grid.Row="1" Header="自动炒菜" FontSize="15" Foreground="Aqua" VerticalAlignment="Center" >
  48. <Grid Height="50">
  49. <Grid.RowDefinitions>
  50. <RowDefinition Height="1*"/>
  51. </Grid.RowDefinitions>
  52. <WrapPanel Grid.Row="1" Orientation="Horizontal">
  53. <TextBlock Text="菜单编号:" Margin="10,0"/>
  54. <TextBox Text="{Binding FoodMenuID}" Width="100"/>
  55. <Button Content="菜单编号下单下单" Margin="10,0" Command="{Binding StartOrder}" Cursor="Hand"/>
  56. <Button Content="本地菜单流程配置" Click="Button_Click"/>
  57. <Button Content="停止炒菜" Margin="10,0" Command="{Binding StopLocalOrder}" Cursor="Hand"/>
  58. <Button Content="{Binding ModeButten}" Margin="10,0" Command="{Binding ModeChange}" Cursor="Hand"/>
  59. </WrapPanel>
  60. </Grid>
  61. </GroupBox>
  62. <!--<GroupBox Header="菜品选择" FontSize="15" Foreground="Aqua" Grid.Row="2" VerticalAlignment="Center" Height="190" >
  63. <Grid >
  64. <Grid.RowDefinitions>
  65. <RowDefinition Height="*"/>
  66. <RowDefinition Height="*"/>
  67. <RowDefinition Height="*"/>
  68. <RowDefinition Height="*"/>
  69. <RowDefinition Height="*"/>
  70. </Grid.RowDefinitions>
  71. <WrapPanel Orientation="Horizontal" >
  72. <TextBlock Text="取料手臂实时位置" Margin="0,0,10,0"/>
  73. <TextBlock Text="X:" Margin="5,0"/>
  74. <TextBox Text="{Binding RealX}" Width="70" Margin="5,0" VerticalAlignment="Top" IsReadOnly="True"/>
  75. <TextBlock Text="Y:" Margin="5,0"/>
  76. <TextBox Text="{Binding RealY}" Width="70" Margin="5,0" VerticalAlignment="Top" IsReadOnly="True"/>
  77. <TextBlock Text="{Binding PawPosition}" Margin="10,0,5,0"/>
  78. <Button Content="菜品库初始化" Margin="10,0,5,0" Command="{Binding FoodLibInit}"/>
  79. <Button Content="菜品库余量检测" Margin="10,0,5,0" Command="{Binding SurplusCheck}"/>
  80. <Button Content="电磁阀启动" Margin="10,0,5,0" Command="{Binding StartElectromagnetism}"/>
  81. <Button Content="电磁阀停止" Margin="10,0,5,0" Command="{Binding StopElectromagnetism}"/>
  82. </WrapPanel>
  83. <WrapPanel Grid.Row="1" Orientation="Horizontal" >
  84. <TextBlock Text="取料手臂设定位置" Margin="0,0,10,0"/>
  85. <TextBlock Text="X:" Margin="5,0"/>
  86. <TextBox Text="{Binding SettingX}" Width="70" Margin="5,0" VerticalAlignment="Center" />
  87. <TextBlock Text="Y:" Margin="5,0"/>
  88. <TextBox Text="{Binding SettingY}" Width="70" Margin="5,0" VerticalAlignment="Center" />
  89. <Button Content="移动" Command="{Binding SetArmPosition}" Margin="5,0,10,0" Cursor="Hand"/>
  90. <TextBlock Text="移动速度:" Margin="5,0"/>
  91. <TextBox Text="{Binding MoveSpeed}" Width="70" Margin="5,0" VerticalAlignment="Center" />
  92. <Button Content="设定" Command="{Binding SetSpeed}" Cursor="Hand" Margin="5,0,10,0" />
  93. <Button Content="感应器1测距" Margin="5,0" Command="{Binding GetDistance_1}" Cursor="Hand"/>
  94. <TextBox Text="{Binding SensingDistance_1}" Margin="5,0" Width="60" IsReadOnly="True"/>
  95. <Button Content="感应器2测距" Margin="5,0" Command="{Binding GetDistance_2}"/>
  96. <TextBox Text="{Binding SensingDistance_2}" Margin="5,0" Width="60" IsReadOnly="True"/>
  97. <Button Content="感应器3测距" Margin="5,0" Command="{Binding GetDistance_3}"/>
  98. <TextBox Text="{Binding SensingDistance_3}" Margin="5,0" Width="60" IsReadOnly="True"/>
  99. </WrapPanel>
  100. <WrapPanel Grid.Row="2" Orientation="Horizontal" >
  101. <TextBlock Text="设定手臂当前位置" Margin="0,0,10,0"/>
  102. <TextBlock Text="X:" Margin="5,0"/>
  103. <TextBox Text="{Binding SettingNowX}" Width="70" Margin="5,0" VerticalAlignment="Center" />
  104. <TextBlock Text="Y:" Margin="5,0"/>
  105. <TextBox Text="{Binding SettingNowY}" Width="70" Margin="5,0" VerticalAlignment="Center" />
  106. <Button Content="设置" Margin="10,0,5,0" Command="{Binding SetNowPosition}"/>
  107. </WrapPanel>
  108. <WrapPanel Grid.Row="3" Orientation="Horizontal" >
  109. <Button Content="夹爪伸出" Command="{Binding PawTurnFront}" Margin="5,0" Cursor="Hand"/>
  110. <Button Content="夹爪收缩" Command="{Binding PawTurnBack}" Margin="5,0" Cursor="Hand"/>
  111. <RadioButton Content="位置1" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon1}" Command="{Binding PawToPoint1}" GroupName="PawTurn"/>
  112. <RadioButton Content="位置2" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon2}" Command="{Binding PawToPoint2}" GroupName="PawTurn"/>
  113. <RadioButton Content="位置3" Margin="5,0 " IsEnabled="True" IsChecked="{Binding PawPositon3}" Command="{Binding PawToPoint3}" GroupName="PawTurn"/>
  114. </WrapPanel>
  115. <WrapPanel Grid.Row="4" Orientation="Horizontal" >
  116. <RadioButton Content="上" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunUp}" GroupName="ArmRun"/>
  117. <RadioButton Content="下" Margin="5,0" IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunDown}" GroupName="ArmRun"/>
  118. <RadioButton Content="左" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunLeft}" GroupName="ArmRun"/>
  119. <RadioButton Content="右" Margin="5,0 " IsEnabled="{Binding ArmRunEnable}" IsChecked="{Binding ArmRunRight}" GroupName="ArmRun"/>
  120. <Button Content="{Binding ArmButtonName}" Command="{Binding ArmRun}" Margin="5,0" Cursor="Hand">
  121. </Button>
  122. </WrapPanel>
  123. </Grid>
  124. </GroupBox>-->
  125. <StackPanel Orientation="Vertical" Grid.Row="3">
  126. <GroupBox Header="配料仓控制" FontSize="15" Foreground="Aqua" VerticalAlignment="Center" Height="65">
  127. <WrapPanel Orientation="Horizontal" Grid.RowSpan="2" VerticalAlignment="Top" Margin="0,5,0,0" >
  128. <TextBlock Text="通道号" Margin="5,0"/>
  129. <ComboBox ItemsSource="{Binding PassageWays}" Width="120" Margin="5,0"
  130. SelectedIndex="{Binding PassagePosition}"/>
  131. <TextBlock Text="出料量" Margin="5,0"/>
  132. <TextBox Text="{Binding Weight}" Margin="5,0" Width="100"/>
  133. <TextBlock Text="g" Margin="0,0,10,0"/>
  134. <Button Content="出料" Margin="10,0" Command="{Binding OutMaterials}"/>
  135. </WrapPanel>
  136. </GroupBox>
  137. <GroupBox Header="炒锅" FontSize="15" Foreground="Aqua" VerticalAlignment="Center" Height="140">
  138. <Grid>
  139. <Grid.RowDefinitions>
  140. <RowDefinition Height="*"/>
  141. <RowDefinition Height="*"/>
  142. <RowDefinition Height="*"/>
  143. </Grid.RowDefinitions>
  144. <WrapPanel VerticalAlignment="Top" Margin="0,5,0,0">
  145. <Button Content="注油" Command="{Binding AddOil}" Margin="10,0,10,0"></Button>
  146. <Button Content="倒菜启动" Command="{Binding OutFood}" Margin="10,0,15,0" Cursor="Hand"/>
  147. <Button Content="搅拌臂去原点位" Command="{Binding StirArmGoOrigin}" Margin="10,0,10,0"></Button>
  148. <Button Content="搅拌臂去炒制位" Command="{Binding StirArmGoWork}" Margin="10,0,10,0"></Button>
  149. <Button Content="HBOT放盒子到位" Command="{Binding HBOTGoWork}" Margin="10,0,10,0"></Button>
  150. <Button Content="出餐启动" Command="{Binding OutMeal}" Margin="10,0,10,0"></Button>
  151. </WrapPanel>
  152. <WrapPanel Grid.Row="1" VerticalAlignment="Top" Margin="0,5,0,0">
  153. <Button Content="加热启动" Command="{Binding StartFire}" Margin="10,0,10,0"></Button>
  154. <Button Content="加热停止" Command="{Binding StopFire}" Margin="10,0,10,0"></Button>
  155. <Button Content="搅拌启动" Command="{Binding StartStir}" Margin="10,0,10,0" Cursor="Hand"></Button>
  156. <Button Content="搅拌停止" Command="{Binding StopStir}" Margin="10,0,15,0" Cursor="Hand"></Button>
  157. <Button Content="开启磁吸" Command="{Binding MagnetOn}" Margin="10,0,15,0" Cursor="Hand"></Button>
  158. <Button Content="关闭磁吸" Command="{Binding MagnetOff}" Margin="10,0,15,0" Cursor="Hand"></Button>
  159. </WrapPanel>
  160. <WrapPanel Grid.Row="2">
  161. <TextBlock Text="加热挡位:" Margin="10,0,0,0" />
  162. <ComboBox ItemsSource="{Binding lstFire}" Width="80" Margin="10,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center"
  163. SelectedValue="{Binding FireGear}"/>
  164. <Button Content="设定" Margin="0,0,30,0" Command="{Binding SetFire}"/>
  165. <TextBlock Text="搅拌挡位:" Margin="10,0,0,0" />
  166. <ComboBox ItemsSource="{Binding lstStir}" Width="80" Margin="10,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center"
  167. SelectedValue="{Binding StirGear}"/>
  168. <Button Content="设定" Margin="0,0,30,0" Command="{Binding SetStir}"/>
  169. </WrapPanel>
  170. </Grid>
  171. </GroupBox>
  172. </StackPanel>
  173. </Grid>
  174. </ScrollViewer>
  175. </Grid>
  176. </UserControl>