Commit 72bf88b1 authored by 潘栩锋's avatar 潘栩锋 🚴

添加 自动模头服务器主界面添加 显示连接测厚仪服务器 状态

parent 4d8f0717
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
<TextBlock Text="PLC连接状态" /> <TextBlock Text="PLC连接状态" />
<TextBlock Text="{Binding IsConnectedWithPLC}" FontSize="20"/> <TextBlock Text="{Binding IsConnectedWithPLC}" FontSize="20"/>
</StackPanel> </StackPanel>
<StackPanel Margin="4" Name="spBulkDb">
<TextBlock Text="测厚服务连接状态" />
<TextBlock Text="{Binding IsConnected}" FontSize="20"/>
</StackPanel>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -31,6 +31,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Server ...@@ -31,6 +31,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Server
{ {
this.gage = gage; this.gage = gage;
this.DataContext = gage.mfeedback; this.DataContext = gage.mfeedback;
this.spBulkDb.DataContext = gage.bulkDb;
} }
} }
} }
...@@ -31,7 +31,8 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -31,7 +31,8 @@ namespace FLY.FilmCasting.AutoDie.Server
#region IFeedbackHeat 成员 #region IFeedbackHeat 成员
#region 参数 #region 参数
public IPEndPoint PLCep { get; set; } public string PLCep { get; set; } = "192.168.50.60:502";
/// <summary> /// <summary>
/// 自动控制使能 /// 自动控制使能
/// </summary> /// </summary>
...@@ -177,10 +178,9 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -177,10 +178,9 @@ namespace FLY.FilmCasting.AutoDie.Server
public FeedbackHeat() public FeedbackHeat()
{ {
PLCep = Misc.StringConverter.ToIPEndPoint("192.168.50.60:502");
Load(); Load();
plc = new PLCLink(PLCep); plc = new PLCLink(Misc.StringConverter.ToIPEndPoint("192.168.50.60:502"));
} }
...@@ -315,10 +315,7 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -315,10 +315,7 @@ namespace FLY.FilmCasting.AutoDie.Server
InitError(); InitError();
if (plc is PLCLink) ((PLCLink)plc).Start();
{
((PLCLink)plc).Start();
}
} }
private void DynArea_PropertyChanged(object sender, PropertyChangedEventArgs e) private void DynArea_PropertyChanged(object sender, PropertyChangedEventArgs e)
...@@ -720,16 +717,16 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -720,16 +717,16 @@ namespace FLY.FilmCasting.AutoDie.Server
); );
//工作的螺丝数 //工作的螺丝数
int workBolts = lc_ScanData.BoltMapInfo.BoltCnt - lc_ScanData.BoltMapInfo.LeftEmptyBolts + lc_ScanData.BoltMapInfo.RightEmptyBolts; int workBolts = lc_ScanData.BoltMapInfo.BoltCnt - (lc_ScanData.BoltMapInfo.LeftEmptyBolts + lc_ScanData.BoltMapInfo.RightEmptyBolts);
if (invalid_cnt > workBolts / 2)//有一半数据都是无效的 if (invalid_cnt > workBolts / 2)//有一半数据都是无效的
return; return;
if (lc_ScanData.FilmVelocity < INVALID_VELOCITY) //if (lc_ScanData.FilmVelocity < INVALID_VELOCITY)
{ //{
//速度太慢,异常 // //速度太慢,异常
return; // return;
} //}
var lcThickHeat = new Lc_ThickHeat() var lcThickHeat = new Lc_ThickHeat()
{ {
......
...@@ -27,7 +27,7 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -27,7 +27,7 @@ namespace FLY.FilmCasting.AutoDie.Server
#region 服务器数据-------------------------------------------------------------- #region 服务器数据--------------------------------------------------------------
FLY.Thick.FilmCasting.IService.IBoltMapFilmCastingService boltMapFilmCasting; FLY.Thick.FilmCasting.IService.IBoltMapFilmCastingService boltMapFilmCasting;
FLY.Thick.FilmCasting.IService.IBulkDbService bulkDb; public FLY.Thick.FilmCasting.IService.IBulkDbService bulkDb;
FLY.Thick.Base.IService.ITDGageService gageService; FLY.Thick.Base.IService.ITDGageService gageService;
/// <summary> /// <summary>
/// 报警系统 /// 报警系统
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment