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
coatingmode = value;
hmi_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 bool IsLight;//是亮
......@@ -69,29 +58,13 @@ namespace FLY.Simulation.Coating
/// <summary>
/// 膜宽
/// </summary>
public int FilmWidth {
get {
return Datas_Horizontal.Count();
}
}
public int FilmWidth => Datas_Horizontal.Count();
double filmvelocity = 12;
/// <summary>
/// 膜速度 m/min
/// </summary>
public double FilmVelocity
{
get {
return filmvelocity;
}
set {
if (filmvelocity != value)
{
filmvelocity = value;
NotifyPropertyChanged("FilmVelocity");
}
}
}
public double FilmVelocity { get; set; } = 12;
/// <summary>
......@@ -110,21 +83,11 @@ namespace FLY.Simulation.Coating
double RPosition = 0;
private double filmlength = 0;
/// <summary>
/// 膜已经跑了的长度。m
/// </summary>
public double FilmLength
{
get { return filmlength; }
set {
if (filmlength != value)
{
filmlength = value;
NotifyPropertyChanged("FilmLength");
}
}
}
public double FilmLength { get; set; }
/// <summary>
/// 烘箱长度 30m
/// </summary>
......@@ -142,32 +105,11 @@ namespace FLY.Simulation.Coating
/// </summary>
public bool HSignal;
private bool devicestate;
public bool DeviceState
{
get { return devicestate; }
set {
if (devicestate != value)
{
devicestate = value;
NotifyPropertyChanged("DeviceState");
}
}
}
private double avg;
public double Avg
{
get { return avg; }
set
{
if (avg != value)
{
avg = value;
NotifyPropertyChanged("Avg");
}
}
}
public bool DeviceState { get; set; }
public double Avg { get; set; }
void Load_Vertical()
{
......
......@@ -66,6 +66,11 @@
<Name>FLY.Simulation</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
......
......@@ -98,6 +98,20 @@ namespace FLY.Simulation.Coating
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()
{
UInt16 istatus = 0x0fff;
......
......@@ -955,7 +955,7 @@ namespace FlyADBase
int CorrectAD(int grid, int ad)
{
int[] d = new int[0];
int[] d = new int[1];
d[0] = ad;
CorrectADs(Misc.DIRECTION.FIX, grid, d);
return d[0];
......
......@@ -509,7 +509,7 @@ namespace FlyADBase
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();
......@@ -519,7 +519,7 @@ namespace FlyADBase
{
istatus = IStatusPool[i].istatus;
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)
{
//结束,这是最后!!!
......
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