PlcOperationPage.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <Page x:Class="CCDCountWpf.WpfPage.PlcOperationPage"
  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:CCDCountWpf.WpfPage"
  7. mc:Ignorable="d"
  8. Title="PlcOperationPage" Height="509" Width="822">
  9. <Grid>
  10. <Grid x:Name="ShowGrid" Grid.Row="1">
  11. <Grid x:Name="PLCRuningSetting" Visibility="Visible">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="*"/>
  14. <ColumnDefinition Width="150"/>
  15. </Grid.ColumnDefinitions>
  16. <WrapPanel Orientation="Horizontal" Grid.Column="0"
  17. ItemHeight="70" ItemWidth="130" HorizontalAlignment="Left"
  18. VerticalAlignment="Top">
  19. <Button Content="使能" Margin="40,0,0,0" Height="40" Width="90" Click="Button_Click"/>
  20. <Button x:Name="InitiateBtn" Content="PLC启动" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="InitiateBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="InitiateBtn_PreviewMouseLeftButtonUp"/>
  21. <Button x:Name="StopBtn" Content="PLC停止" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="StopBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="StopBtn_PreviewMouseLeftButtonUp"/>
  22. <Button x:Name="ReturnToZeroBtn" Content="回零" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="ReturnToZeroBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="ReturnToZeroBtn_PreviewMouseLeftButtonUp"/>
  23. <Button x:Name="RepositionBtn" Content="复位" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="RepositionBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="RepositionBtn_PreviewMouseLeftButtonUp"/>
  24. <Button x:Name="ForwardRotatingJogBtn" Content="正转点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="ForwardRotatingJogBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="ForwardRotatingJogBtn_PreviewMouseLeftButtonUp"/>
  25. <Button x:Name="ReversalReverseJogBtn" Content="反转点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="ReversalReverseJogBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="ReversalReverseJogBtn_PreviewMouseLeftButtonUp"/>
  26. <Button x:Name="ShaftStopsBtn" Content="轴停止" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="ShaftStopsBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="ShaftStopsBtn_PreviewMouseLeftButtonUp"/>
  27. <Button x:Name="SpeedRunBtn" Content="速度运行" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="SpeedRunBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="SpeedRunBtn_PreviewMouseLeftButtonUp"/>
  28. <Button x:Name="EquipmentOperationBtn" Content="设备运行" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="EquipmentOperationBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="EquipmentOperationBtn_PreviewMouseLeftButtonUp"/>
  29. <Button x:Name="LevelOneVibrationTableBtn" Content="一级震台启动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="LevelOneVibrationTableBtn_Click"/>
  30. <Button x:Name="LevelTwoVibrationTableBtn" Content="二级震台启动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="LevelTwoVibrationTableBtn_Click"/>
  31. <Button x:Name="LevelThreeVibrationTableBtn" Content="三级震台启动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="LevelThreeVibrationTableBtn_Click"/>
  32. <Button x:Name="DeviceUpBtn" Content="设备上升" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="DeviceUpBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="DeviceUpBtn_PreviewMouseLeftButtonUp"/>
  33. <Button x:Name="DeviceDownBtn" Content="设备下降" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="DeviceDownBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="DeviceDownBtn_PreviewMouseLeftButtonUp"/>
  34. <Button x:Name="TransferStartBtn" Content="传送带启动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="TransferStartBtn_Click"/>
  35. <Button x:Name="AirValveCloseBtn" Content="气锁关" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="AirValveCloseBtn_Click"/>
  36. <Button x:Name="BottleFeedingWheelResetBtn" Content="送瓶轮复位" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="BottleFeedingWheelResetBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="BottleFeedingWheelResetBtn_PreviewMouseLeftButtonUp"/>
  37. <Button x:Name="BottleFeedingWheelReturnToZeroBtn" Content="送瓶轮回零" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="BottleFeedingWheelReturnToZeroBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="BottleFeedingWheelReturnToZeroBtn_PreviewMouseLeftButtonUp"/>
  38. <Button x:Name="BottleFeedingWheelShaftStopsBtn" Content="送瓶轮轴停止" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="BottleFeedingWheelShaftStopsBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="BottleFeedingWheelShaftStopsBtn_PreviewMouseLeftButtonUp"/>
  39. <Button x:Name="BottleFeedingWheelPositiveRotationJogBtn" Content="送瓶轮正转点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="BottleFeedingWheelPositiveRotationJogBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="BottleFeedingWheelPositiveRotationJogBtn_PreviewMouseLeftButtonUp"/>
  40. <Button x:Name="BottleFeedingWheelReverseRotationJogBtn" Content="送瓶轮反转点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" PreviewMouseLeftButtonDown="BottleFeedingWheelReverseRotationJogBtn_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="BottleFeedingWheelReverseRotationJogBtn_PreviewMouseLeftButtonUp"/>
  41. <Button x:Name="BottleFeedingWheelEnableBtn" Content="送瓶轮使能" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="BottleFeedingWheelEnableBtn_Click"/>
  42. <Button x:Name="Valve1Jog" Content="闸门一点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve1Jog_Click"/>
  43. <Button x:Name="Valve2Jog" Content="闸门二点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve2Jog_Click"/>
  44. <Button x:Name="Valve3Jog" Content="闸门三点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve3Jog_Click"/>
  45. <Button x:Name="Valve4Jog" Content="闸门四点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve4Jog_Click"/>
  46. <Button x:Name="Valve5Jog" Content="闸门五点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve5Jog_Click"/>
  47. <Button x:Name="Valve6Jog" Content="闸门六点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve6Jog_Click"/>
  48. <Button x:Name="Valve7Jog" Content="闸门七点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve7Jog_Click"/>
  49. <Button x:Name="Valve8Jog" Content="闸门八点动" HorizontalAlignment="Left" Margin="40,0,0,0" Height="40" Width="90" Click="Valve8Jog_Click"/>
  50. </WrapPanel>
  51. <StackPanel Orientation="Vertical" Grid.Column="1">
  52. <StackPanel Orientation="Horizontal" Margin="0,20,0,0">
  53. <Label Content="使能完成:"></Label>
  54. <Ellipse Width="20" Height="20" Margin="48,0,0,0" >
  55. <Ellipse.Style>
  56. <Style TargetType="Ellipse">
  57. <Setter Property="Fill" Value="Red" />
  58. <Style.Triggers>
  59. <DataTrigger Binding="{Binding EnableCompletion}" Value="True">
  60. <Setter Property="Fill" Value="Green" />
  61. </DataTrigger>
  62. </Style.Triggers>
  63. </Style>
  64. </Ellipse.Style>
  65. </Ellipse>
  66. </StackPanel>
  67. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  68. <Label Content="回零完成:"></Label>
  69. <Ellipse Width="20" Height="20" Margin="48,0,0,0">
  70. <Ellipse.Style>
  71. <Style TargetType="Ellipse">
  72. <Setter Property="Fill" Value="Red" />
  73. <Style.Triggers>
  74. <DataTrigger Binding="{Binding ReturnToZeroCompletion}" Value="True">
  75. <Setter Property="Fill" Value="Green" />
  76. </DataTrigger>
  77. </Style.Triggers>
  78. </Style>
  79. </Ellipse.Style>
  80. </Ellipse>
  81. </StackPanel>
  82. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  83. <Label Content="停止完成:"></Label>
  84. <Ellipse Width="20" Height="20" Margin="48,0,0,0">
  85. <Ellipse.Style>
  86. <Style TargetType="Ellipse">
  87. <Setter Property="Fill" Value="Red" />
  88. <Style.Triggers>
  89. <DataTrigger Binding="{Binding StopCompletion}" Value="True">
  90. <Setter Property="Fill" Value="Green" />
  91. </DataTrigger>
  92. </Style.Triggers>
  93. </Style>
  94. </Ellipse.Style>
  95. </Ellipse>
  96. </StackPanel>
  97. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  98. <Label Content="速度运行中:"></Label>
  99. <Ellipse Width="20" Height="20" Margin="36,0,0,0">
  100. <Ellipse.Style>
  101. <Style TargetType="Ellipse">
  102. <Setter Property="Fill" Value="Red" />
  103. <Style.Triggers>
  104. <DataTrigger Binding="{Binding SpeedRunning}" Value="True">
  105. <Setter Property="Fill" Value="Green" />
  106. </DataTrigger>
  107. </Style.Triggers>
  108. </Style>
  109. </Ellipse.Style>
  110. </Ellipse>
  111. </StackPanel>
  112. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  113. <Label Content="回零中:"></Label>
  114. <Ellipse Width="20" Height="20" Margin="60,0,0,0">
  115. <Ellipse.Style>
  116. <Style TargetType="Ellipse">
  117. <Setter Property="Fill" Value="Red" />
  118. <Style.Triggers>
  119. <DataTrigger Binding="{Binding ReturnToZero}" Value="True">
  120. <Setter Property="Fill" Value="Green" />
  121. </DataTrigger>
  122. </Style.Triggers>
  123. </Style>
  124. </Ellipse.Style>
  125. </Ellipse>
  126. </StackPanel>
  127. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  128. <Label Content="中转阀开定位完成:"></Label>
  129. <Ellipse Width="20" Height="20">
  130. <Ellipse.Style>
  131. <Style TargetType="Ellipse">
  132. <Setter Property="Fill" Value="Red" />
  133. <Style.Triggers>
  134. <DataTrigger Binding="{Binding TransferValveOpenCompletion}" Value="True">
  135. <Setter Property="Fill" Value="Green" />
  136. </DataTrigger>
  137. </Style.Triggers>
  138. </Style>
  139. </Ellipse.Style>
  140. </Ellipse>
  141. </StackPanel>
  142. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  143. <Label Content="中转阀关定位完成:"></Label>
  144. <Ellipse Width="20" Height="20">
  145. <Ellipse.Style>
  146. <Style TargetType="Ellipse">
  147. <Setter Property="Fill" Value="Red" />
  148. <Style.Triggers>
  149. <DataTrigger Binding="{Binding TransferValveCloseCompletion}" Value="True">
  150. <Setter Property="Fill" Value="Green" />
  151. </DataTrigger>
  152. </Style.Triggers>
  153. </Style>
  154. </Ellipse.Style>
  155. </Ellipse>
  156. </StackPanel>
  157. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  158. <Label Content="允许数据交换:"></Label>
  159. <Ellipse Width="20" Height="20" Margin="24,0,0,0">
  160. <Ellipse.Style>
  161. <Style TargetType="Ellipse">
  162. <Setter Property="Fill" Value="Red" />
  163. <Style.Triggers>
  164. <DataTrigger Binding="{Binding AllowsDataExchange}" Value="True">
  165. <Setter Property="Fill" Value="Green" />
  166. </DataTrigger>
  167. </Style.Triggers>
  168. </Style>
  169. </Ellipse.Style>
  170. </Ellipse>
  171. </StackPanel>
  172. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  173. <Label Content="暂停获取数据:"></Label>
  174. <Ellipse Width="20" Height="20" Margin="24,0,0,0">
  175. <Ellipse.Style>
  176. <Style TargetType="Ellipse">
  177. <Setter Property="Fill" Value="Red" />
  178. <Style.Triggers>
  179. <DataTrigger Binding="{Binding PauseDataExchange}" Value="True">
  180. <Setter Property="Fill" Value="Green" />
  181. </DataTrigger>
  182. </Style.Triggers>
  183. </Style>
  184. </Ellipse.Style>
  185. </Ellipse>
  186. </StackPanel>
  187. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  188. <Label Content="缓存计数延时完成:"></Label>
  189. <Ellipse Width="20" Height="20">
  190. <Ellipse.Style>
  191. <Style TargetType="Ellipse">
  192. <Setter Property="Fill" Value="Red" />
  193. <Style.Triggers>
  194. <DataTrigger Binding="{Binding CacheCountDelayed}" Value="True">
  195. <Setter Property="Fill" Value="Green" />
  196. </DataTrigger>
  197. </Style.Triggers>
  198. </Style>
  199. </Ellipse.Style>
  200. </Ellipse>
  201. </StackPanel>
  202. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  203. <Label Content="使能:"></Label>
  204. <Ellipse Width="20" Height="20" Margin="72,0,0,0">
  205. <Ellipse.Style>
  206. <Style TargetType="Ellipse">
  207. <Setter Property="Fill" Value="Red" />
  208. <Style.Triggers>
  209. <DataTrigger Binding="{Binding Enable}" Value="True">
  210. <Setter Property="Fill" Value="Green" />
  211. </DataTrigger>
  212. </Style.Triggers>
  213. </Style>
  214. </Ellipse.Style>
  215. </Ellipse>
  216. </StackPanel>
  217. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  218. <Label Content="送瓶轮使能完成:"></Label>
  219. <Ellipse Width="20" Height="20" Margin="12,0,0,0">
  220. <Ellipse.Style>
  221. <Style TargetType="Ellipse">
  222. <Setter Property="Fill" Value="Red" />
  223. <Style.Triggers>
  224. <DataTrigger Binding="{Binding BottleFeedingWheelEnableCompletion}" Value="True">
  225. <Setter Property="Fill" Value="Green" />
  226. </DataTrigger>
  227. </Style.Triggers>
  228. </Style>
  229. </Ellipse.Style>
  230. </Ellipse>
  231. </StackPanel>
  232. <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
  233. <Label Content="送瓶轮停止完成:"></Label>
  234. <Ellipse Width="20" Height="20" Margin="12,0,0,0">
  235. <Ellipse.Style>
  236. <Style TargetType="Ellipse">
  237. <Setter Property="Fill" Value="Red" />
  238. <Style.Triggers>
  239. <DataTrigger Binding="{Binding BottleFeedingWheelStopCompletion}" Value="True">
  240. <Setter Property="Fill" Value="Green" />
  241. </DataTrigger>
  242. </Style.Triggers>
  243. </Style>
  244. </Ellipse.Style>
  245. </Ellipse>
  246. </StackPanel>
  247. </StackPanel>
  248. </Grid>
  249. </Grid>
  250. </Grid>
  251. </Page>