Commit 9be5cc66 authored by 潘栩锋's avatar 潘栩锋 🚴

1. 修复 flyad7.GridIStatusEventAdd(int istatus_no, ) istatus_no的取值范围 0~11

2. 完善 FLY.Simulation.Coating 使用 PropertyChanged.Fody
parent 3146b1f2
...@@ -29,24 +29,13 @@ namespace FLY.Simulation.Coating ...@@ -29,24 +29,13 @@ namespace FLY.Simulation.Coating
coatingmode = value; coatingmode = value;
hmi_cc.CoatingMode = value; hmi_cc.CoatingMode = value;
inner_cc.CoatingMode = value; inner_cc.CoatingMode = value;
NotifyPropertyChanged("CoatingMode");
}
}
}
private int port=502;
public int Port
{
get { return port; }
set
{
if (port != value)
{
port = value;
NotifyPropertyChanged("Port");
} }
} }
} }
public int Port { get; set; } = 502;
public class DataInfo public class DataInfo
{ {
public bool IsLight;//是亮 public bool IsLight;//是亮
...@@ -69,29 +58,13 @@ namespace FLY.Simulation.Coating ...@@ -69,29 +58,13 @@ namespace FLY.Simulation.Coating
/// <summary> /// <summary>
/// 膜宽 /// 膜宽
/// </summary> /// </summary>
public int FilmWidth { public int FilmWidth => Datas_Horizontal.Count();
get {
return Datas_Horizontal.Count();
}
}
double filmvelocity = 12;
/// <summary> /// <summary>
/// 膜速度 m/min /// 膜速度 m/min
/// </summary> /// </summary>
public double FilmVelocity public double FilmVelocity { get; set; } = 12;
{
get {
return filmvelocity;
}
set {
if (filmvelocity != value)
{
filmvelocity = value;
NotifyPropertyChanged("FilmVelocity");
}
}
}
/// <summary> /// <summary>
...@@ -110,21 +83,11 @@ namespace FLY.Simulation.Coating ...@@ -110,21 +83,11 @@ namespace FLY.Simulation.Coating
double RPosition = 0; double RPosition = 0;
private double filmlength = 0;
/// <summary> /// <summary>
/// 膜已经跑了的长度。m /// 膜已经跑了的长度。m
/// </summary> /// </summary>
public double FilmLength public double FilmLength { get; set; }
{
get { return filmlength; }
set {
if (filmlength != value)
{
filmlength = value;
NotifyPropertyChanged("FilmLength");
}
}
}
/// <summary> /// <summary>
/// 烘箱长度 30m /// 烘箱长度 30m
/// </summary> /// </summary>
...@@ -142,32 +105,11 @@ namespace FLY.Simulation.Coating ...@@ -142,32 +105,11 @@ namespace FLY.Simulation.Coating
/// </summary> /// </summary>
public bool HSignal; public bool HSignal;
private bool devicestate;
public bool DeviceState
{
get { return devicestate; }
set {
if (devicestate != value)
{
devicestate = value;
NotifyPropertyChanged("DeviceState");
}
}
}
private double avg; public bool DeviceState { get; set; }
public double Avg
{
get { return avg; } public double Avg { get; set; }
set
{
if (avg != value)
{
avg = value;
NotifyPropertyChanged("Avg");
}
}
}
void Load_Vertical() void Load_Vertical()
{ {
......
...@@ -66,6 +66,11 @@ ...@@ -66,6 +66,11 @@
<Name>FLY.Simulation</Name> <Name>FLY.Simulation</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -98,6 +98,20 @@ namespace FLY.Simulation.Coating ...@@ -98,6 +98,20 @@ namespace FLY.Simulation.Coating
mCoating.OnPoll(now); mCoating.OnPoll(now);
} }
/// <summary>
/// 横向边界信号 i5
/// </summary>
public const int HSIGN_NO = 5;
/// <summary>
/// 辊信号 i11
/// </summary>
public const int RSIGN_NO = 11;
/// <summary>
/// 纵向边界信号 i12
/// </summary>
public const int VSIGN_NO = 12;
public UInt16 GetInput() public UInt16 GetInput()
{ {
UInt16 istatus = 0x0fff; UInt16 istatus = 0x0fff;
......
...@@ -955,7 +955,7 @@ namespace FlyADBase ...@@ -955,7 +955,7 @@ namespace FlyADBase
int CorrectAD(int grid, int ad) int CorrectAD(int grid, int ad)
{ {
int[] d = new int[0]; int[] d = new int[1];
d[0] = ad; d[0] = ad;
CorrectADs(Misc.DIRECTION.FIX, grid, d); CorrectADs(Misc.DIRECTION.FIX, grid, d);
return d[0]; return d[0];
......
...@@ -509,7 +509,7 @@ namespace FlyADBase ...@@ -509,7 +509,7 @@ namespace FlyADBase
return; return;
} }
bool istatus_no_b = Misc.MyBase.CHECKBIT(istatus, istatus_no - 1); bool istatus_no_b = Misc.MyBase.CHECKBIT(istatus, istatus_no );
Range r = new Range(); Range r = new Range();
...@@ -519,7 +519,7 @@ namespace FlyADBase ...@@ -519,7 +519,7 @@ namespace FlyADBase
{ {
istatus = IStatusPool[i].istatus; istatus = IStatusPool[i].istatus;
int pos = IStatusPool[i].pos; int pos = IStatusPool[i].pos;
bool b = Misc.MyBase.CHECKBIT(istatus, istatus_no - 1); bool b = Misc.MyBase.CHECKBIT(istatus, istatus_no );
if (IStatusPool[i].dt >= end_dt) if (IStatusPool[i].dt >= end_dt)
{ {
//结束,这是最后!!! //结束,这是最后!!!
......
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