终端一体化运控平台
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.
 
 
 

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