This commit is contained in:
Admin 2026-03-15 21:37:34 +08:00
parent c569d4877c
commit 0d2e37a0a0
8 changed files with 897 additions and 398 deletions

View File

@ -18,6 +18,8 @@
<mah:MetroWindow.RightWindowCommands>
<mah:WindowCommands>
<CheckBox Content="流线直通模式" IsChecked="{Binding ZhiTongMode}"></CheckBox>
<CheckBox Content="单机模式" IsChecked="{Binding OfflineMode}"></CheckBox>
<CheckBox Content="空跑模式" IsChecked="{Binding CurrentMachine.RunningMode}"></CheckBox>
<!--<CheckBox Content="联机空跑" IsChecked="{Binding RunningModePlas}"></CheckBox>-->
<!--<ComboBox Grid.Row="4" Grid.Column="5" VerticalContentAlignment="Center" Margin="1" Text="请选择串口" ItemsSource="{Binding LightCOM.ComPortList}" SelectedItem="{Binding SerialProt}"/>-->

View File

@ -13,11 +13,25 @@ namespace Model
/// </summary>
public class FlowModel : NotificationObject
{
/// <summary>
/// 入料检知
/// </summary>
public InputSignal InSignal { get; set; }
/// <summary>
/// 出料检知
/// </summary>
public InputSignal OutSignal { get; set; }
/// <summary>
/// 皮带控制
/// </summary>
public OutputSignal OutCmd { get; set; }
public bool EnPut { get; set; }
/// <summary>
/// 允许放料信号
/// </summary>
public bool ProductPut { get; set; }
private string myName;
/// <summary>

91
Model/InteractionModel.cs Normal file
View File

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
/// <summary>
/// 交互模型
/// </summary>
public class InteractionModel
{
/// <summary>
/// 运行中(报告当前设备是否处于运行状态)
/// </summary>
public bool Running { get; set; }
/// <summary>
/// 安全信号
/// </summary>
public bool Safe { get; set; }
/// <summary>
/// 是否有请求 (请求方发出)
/// </summary>
public bool Request { get; set; }
/// <summary>
/// 是否有请求 (请求方发出)
/// </summary>
public bool RequestCache { get; set; }
/// <summary>
/// 请求类型(请求方赋值) 1:穴位1 2:穴位2
/// </summary>
public int RequestType { get; set; }
/// <summary>
/// 请求完成 (被请求方发出)
/// </summary>
public bool RequestAchieve { get; set; }
/// 请求完成 (被请求方发出)
/// </summary>
public bool RequestCacheAchieve { get; set; }
/// <summary>
/// 产品对象 (被请求方赋值)
/// </summary>
public ShowInfo Product { get; set; }
/// <summary>
/// 出料请求
/// </summary>
public bool RequestOut { get; set; }
/// <summary>
/// 出料请求
/// </summary>
public bool RequestOutCache { get; set; }
/// <summary>
/// 出料产品对象(由当前站给下一站识别)
/// </summary>
public ShowInfo OutProducr { get; set; }
/// <summary>
/// 出料产品对象(由当前站给下一站识别)
/// </summary>
public List<ShowInfo> OutProducrList { get; set; }
/// <summary>
/// 发给上一站,表示 出料产品已经被取走了
/// </summary>
public bool OutProducrOK { get; set; }
/// <summary>
/// 发给上一站,表示 出料产品已经被取走了
/// </summary>
public bool OutCacheProducrOK { get; set; }
/// <summary>
/// 发给上一站 表示取走产品的索引或序列
/// </summary>
public int OutProducrNumber { get; set; }
public InteractionModel()
{
Product = new ShowInfo();
OutProducr = new ShowInfo();
}
}
}

View File

@ -94,6 +94,7 @@
<Compile Include="hsl\MitsubishiHsl.cs" />
<Compile Include="hsl\ModBusTcpHsl.cs" />
<Compile Include="hsl\PanasonicHsl.cs" />
<Compile Include="InteractionModel.cs" />
<Compile Include="litenoDataUP.cs" />
<Compile Include="LitenoMesModel.cs" />
<Compile Include="MotionControl\FeiYuCard.cs" />

View File

@ -43,6 +43,11 @@ namespace Model
/// </summary>
public ushort IoNumber { get; set; }
/// <summary>
/// IO锁
/// </summary>
public bool SwitchLock { get; set; }
private bool switchs;
/// <summary>
@ -53,6 +58,11 @@ namespace Model
get { return switchs; }
set
{
if (SwitchLock)
{
return;
}
switchs = value;
//if (ToRunControlCard && MyCard != null)

File diff suppressed because it is too large Load Diff

View File

@ -101,7 +101,9 @@
Foreground="White"
Background="{Binding StatusBackground}"></Label>
<GroupBox Header="前后机台物料状态" Padding="0" Grid.Row="5" Grid.RowSpan="2" Grid.Column="1" Content="{Binding StationProduceGrid}"></GroupBox>
<GroupBox Header="前后机台运行状态" Padding="0" Grid.Row="5" Grid.RowSpan="2" Grid.Column="1" Content="{Binding StationStateGrid}"></GroupBox>
<GroupBox Header="缓存流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Content="{Binding ProduceLineGrid}"></GroupBox>
<GroupBox Header="良品流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Grid.Column="1" Content="{Binding CacheLineGrid}"></GroupBox>
<GroupBox Header="测试平台状态" Padding="0" Grid.Row="10" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding TestBenchGrid}"></GroupBox>
<GroupBox Header="吸嘴状态" Padding="0" Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding XizuiLabelGrid}"></GroupBox>
<!--<Grid Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2">

View File

@ -11,20 +11,47 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="40*"></ColumnDefinition>-->
<ColumnDefinition Width="67*"></ColumnDefinition>
<ColumnDefinition Width="33*"></ColumnDefinition>
<ColumnDefinition Width=" *"></ColumnDefinition>
<ColumnDefinition Width=" *"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.ColumnSpan="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<!--<ColumnDefinition></ColumnDefinition>-->
</Grid.ColumnDefinitions>
<!--<ContentControl DataContext="{Binding VisualA}" Content="{Binding HWindowWPF2}"></ContentControl>-->
<ContentControl DataContext="{Binding VisualB}" Margin="1" Grid.ColumnSpan="2" Content="{Binding HWindowWPF2}"></ContentControl>
<ContentControl DataContext="{Binding VisualA}" Content="{Binding HWindowWPF2}"></ContentControl>
<ContentControl DataContext="{Binding VisualB}" Margin="1" Grid.Row="1" Content="{Binding HWindowWPF2}"></ContentControl>
</Grid>
<DataGrid Grid.Column ="1" Name="mygrid" ItemsSource="{Binding ExcepList}" RowStyle="{DynamicResource DataGridRowStyle}" ColumnHeaderStyle="{DynamicResource DataGridHadeStyle}" Style="{DynamicResource DataGridStyle}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Number}" >
<DataGridTextColumn.Header>
<TextBlock Text="序号"></TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding HappenTime,StringFormat='yyyy/MM/dd HH:mm:ss'}" Width="0.3*">
<DataGridTextColumn.Header>
<TextBlock Text="发生时间"></TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Describe}" Width="*">
<DataGridTextColumn.Header>
<TextBlock Text="详细描述"></TextBlock>
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>