Commit ff3f83fe authored by 潘栩锋's avatar 潘栩锋 🚴

模拟器添加倍加德旋转PLC模拟

parent 990c4363
using System;
using FLY.Simulation.Blowing;
using System;
using System.Threading.Tasks;
using System.Windows;
......@@ -18,12 +19,18 @@ namespace BlowingSimulator
//AD盒对外接口
FLY.Simulation.Flyad7.OBJProxy.Flyad7_OBJProxy flyad7objproxy;
//风环PLC
FLY.Simulation.Blowing.AirRingPlc plcLink;
//和美风环PLC
FLY.Simulation.Blowing.HeMeiAirRingPlc heMeiAirRingPlc;
/// <summary>
/// 倍加德旋转PLC
/// </summary>
FLY.Simulation.Blowing.BeiJiaDeRotaryPlc beiJiaDeRotaryPlc;
//吹膜逻辑
FLY.Simulation.Blowing.Blowing blowing;
public App()
{
appjustone = new FLY.AppHelper.AppJustOne(this);
......@@ -43,7 +50,7 @@ namespace BlowingSimulator
{
Init();
var main = new MainWindow();
main.Init(flyad7, plcLink, blowing);
main.Init(flyad7, heMeiAirRingPlc, beiJiaDeRotaryPlc, blowing);
this.MainWindow = main;
......@@ -57,9 +64,11 @@ namespace BlowingSimulator
blowing = new FLY.Simulation.Blowing.Blowing();
plcLink = new FLY.Simulation.Blowing.AirRingPlc();
plcLink.Init(blowing, blowing.mAirRing2);
heMeiAirRingPlc = new FLY.Simulation.Blowing.HeMeiAirRingPlc();
heMeiAirRingPlc.Init(blowing, blowing.mAirRing2);
beiJiaDeRotaryPlc = new FLY.Simulation.Blowing.BeiJiaDeRotaryPlc();
beiJiaDeRotaryPlc.Init(blowing);
flyad7 = new FLY.Simulation.Flyad7.FLYAD7();
......@@ -73,15 +82,6 @@ namespace BlowingSimulator
flyad7objproxy.Listen();
FObjBase.PollModule.Current.Start();
//Task.Factory.StartNew(() =>
//{
// while (true)
// {
// FObjBase.PollModule.Current.OnPoll();
// Task.Delay(0).Wait();
// }
//});
}
}
}
......@@ -158,19 +158,22 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody">
<Version>5.7.0</Version>
<Version>4.1.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NLog">
<Version>5.1.0</Version>
<Version>4.6.8</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>4.1.0</Version>
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Resource Include="games_control.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -66,16 +66,6 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
......@@ -102,16 +92,6 @@
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
......@@ -142,16 +122,6 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
......
......@@ -40,17 +40,21 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Header="数据采集器" Margin="{StaticResource ControlMargin}" >
<GroupBox Margin="{StaticResource ControlMargin}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="AD盒"/>
<TextBlock>
(<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding Addr}" DataContext="{Binding FlyAd}"/>)
</TextBlock>
</StackPanel>
</GroupBox.Header>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel.Resources>
<Style x:Key="Styles.Text.FieldHeader" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Width" Value="80"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" DataContext="{Binding FlyAd}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="地址:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding Addr}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="采集值:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding AD}"/>
......@@ -114,34 +118,60 @@
</WrapPanel>
</StackPanel>
</GroupBox>
<GroupBox Grid.Column="1" Header="H3U" Margin="{StaticResource ControlMargin}" DataContext="{Binding Plc}" d:DataContext="{d:DesignInstance Type=blowing:AirRingPlc}">
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel.Resources>
<Style x:Key="Styles.Text.FieldHeader" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Width" Value="80"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="地址:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding PlcAddr}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding IsConnected,Converter={StaticResource connectionConv}}" />
<Grid Grid.Column="1" >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<GroupBox Margin="{StaticResource ControlMargin}" DataContext="{Binding HeMeiAirRingPlc}" d:DataContext="{d:DesignInstance Type=blowing:HeMeiAirRingPlc}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="和美风环PLC"/>
<TextBlock>(<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding PlcAddr}"/>)
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding IsConnected,Converter={StaticResource connectionConv}}" /></TextBlock>
</StackPanel>
</GroupBox.Header>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel.Resources>
<Style x:Key="Styles.Text.FieldHeader" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Width" Value="80"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="心跳写入:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding LastUpdateDt,StringFormat={}{0:HH:mm:ss}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="设置更新:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding ChannelValueUpdate}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="电流互感:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Led}" Tag="{Binding HasElectricity}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="心跳写入:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding LastUpdateDt,StringFormat={}{0:HH:mm:ss}}"/>
</GroupBox>
<GroupBox Grid.Row="1" Margin="{StaticResource ControlMargin}" DataContext="{Binding BeiJiaDeRotaryPlc}" >
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="倍加德旋转PLC"/>
<TextBlock>(<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding Port}"/>)</TextBlock>
</StackPanel>
</GroupBox.Header>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel.Resources>
<Style x:Key="Styles.Text.FieldHeader" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Width" Value="80"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="角度:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding Angle}"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="设置更新:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding ChannelValueUpdate}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="电流互感:"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Led}" Tag="{Binding HasElectricity}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</GroupBox>
</Grid>
</Grid>
</Grid>
......
......@@ -28,28 +28,28 @@ namespace BlowingSimulator
MainVm viewModel;
FLY.Simulation.Flyad7.FLYAD7 flyad7;
FLY.Simulation.Blowing.Blowing blowing;
AirRingPlc plc;
HeMeiAirRingPlc heMeiAirRingPlc;
public MainWindow()
{
InitializeComponent();
}
public void Init(FLY.Simulation.Flyad7.FLYAD7 flyad7, AirRingPlc plc, FLY.Simulation.Blowing.Blowing blowing)
public void Init(FLY.Simulation.Flyad7.FLYAD7 flyad7, HeMeiAirRingPlc heMeiAirRingPlc, BeiJiaDeRotaryPlc beiJiaDeRotaryPlc, FLY.Simulation.Blowing.Blowing blowing)
{
this.flyad7 = flyad7;
this.blowing = blowing;
this.plc = plc;
this.heMeiAirRingPlc = heMeiAirRingPlc;
viewModel = new MainVm();
viewModel.Init(flyad7, plc);
viewModel.Init(flyad7, heMeiAirRingPlc, beiJiaDeRotaryPlc);
this.DataContext = viewModel;
}
private void button1_Click(object sender, RoutedEventArgs e)
{
WindowBlowing wb = new WindowBlowing();
wb.Init(blowing, plc);
wb.Init(blowing, heMeiAirRingPlc);
wb.ShowDialog();
}
......@@ -107,16 +107,23 @@ namespace BlowingSimulator
private DispatcherTimer timer;
private FLYAD7 flyad;
private AirRingPlc plc;
private HeMeiAirRingPlc heMeiAirRingPlc;
private BeiJiaDeRotaryPlc beiJiaDeRotaryPlc;
public FLY.Simulation.Flyad7.FLYAD7 FlyAd => flyad;
public AirRingPlc Plc => plc;
public HeMeiAirRingPlc HeMeiAirRingPlc => heMeiAirRingPlc;
public BeiJiaDeRotaryPlc BeiJiaDeRotaryPlc => beiJiaDeRotaryPlc;
public MainVm()
{
}
public void Init(FLYAD7 flyad, AirRingPlc plc)
public void Init(FLYAD7 flyad, HeMeiAirRingPlc heMeiAirRingPlc, BeiJiaDeRotaryPlc beiJiaDeRotaryPlc)
{
this.flyad = flyad;
this.plc = plc;
this.heMeiAirRingPlc = heMeiAirRingPlc;
this.beiJiaDeRotaryPlc = beiJiaDeRotaryPlc;
//AD盒的信息降频显示
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(0.1);
timer.Tick += new EventHandler(timer_Tick);
......@@ -125,6 +132,7 @@ namespace BlowingSimulator
void timer_Tick(object sender, EventArgs e)
{
//AD盒的信息降频显示
Position = flyad.Position;
Position2 = flyad.Position2;
AD = flyad.AD;
......
......@@ -22,7 +22,7 @@ namespace BlowingSimulator
public partial class WindowBlowing : Window
{
Blowing mBlowing;
AirRingPlc plcLink;
HeMeiAirRingPlc plcLink;
public WindowBlowing()
{
InitializeComponent();
......@@ -146,7 +146,7 @@ namespace BlowingSimulator
this.chart2.BackColor = System.Drawing.Color.Transparent;
}
public void Init(Blowing blowing, AirRingPlc plcLink)
public void Init(Blowing blowing, HeMeiAirRingPlc plcLink)
{
this.mBlowing = blowing;
this.plcLink = plcLink;
......
......@@ -13,17 +13,20 @@ using System.Windows.Threading;
namespace FLY.Simulation.Blowing
{
//D200 通道数量
//D201 设置值 更新
//D400 设置值 160个
//M3 风环开关
//M4 检测电流
//M0 看门狗 PC写1
public class AirRingPlc : INotifyPropertyChanged
/// <summary>
/// 中山和美风环PLC模拟器
/// </summary>
public class HeMeiAirRingPlc : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
//D200 通道数量
//D201 设置值 更新
//D400 设置值 160个
//M3 风环开关
//M4 检测电流
//M0 看门狗 PC写1
const int ADDR_ChannelCnt = 200;
const int ADDR_Update = 201;
const int ADDR_ChannelValues = 400;
......@@ -53,7 +56,7 @@ namespace FLY.Simulation.Blowing
Modbus.WithThread.ServerTCP mserver;
public AirRingPlc()
public HeMeiAirRingPlc()
{
}
......@@ -303,20 +306,20 @@ namespace FLY.Simulation.Blowing
return hasElectricity;
}
string filePath = "plc.json";
string filePath = "heMeiPlc.json";
public bool Save()
{
return AirRingJsonDb.Save(this, filePath);
return HeMeiAirRingJsonDb.Save(this, filePath);
}
bool Load()
{
return AirRingJsonDb.Load(this, filePath);
return HeMeiAirRingJsonDb.Load(this, filePath);
}
}
public class AirRingJsonDb
public class HeMeiAirRingJsonDb
{
public static bool Load(AirRingPlc src, string filePath)
public static bool Load(HeMeiAirRingPlc src, string filePath)
{
if (!File.Exists(filePath))
return false;
......@@ -324,7 +327,7 @@ namespace FLY.Simulation.Blowing
try
{
string json = File.ReadAllText(filePath);
var jsonDb = JsonConvert.DeserializeObject<AirRingJsonDb>(json);
var jsonDb = JsonConvert.DeserializeObject<HeMeiAirRingJsonDb>(json);
src.PlcAddr = jsonDb.PlcAddr;
return true;
}
......@@ -336,11 +339,11 @@ namespace FLY.Simulation.Blowing
}
public static bool Save(AirRingPlc src, string filePath)
public static bool Save(HeMeiAirRingPlc src, string filePath)
{
try
{
var jsonDb = new AirRingJsonDb()
var jsonDb = new HeMeiAirRingJsonDb()
{
PlcAddr = src.PlcAddr
};
......
using HslCommunication.Profinet.FATEK;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
......@@ -10,7 +12,10 @@ using System.Windows.Threading;
namespace FLY.Simulation.Blowing
{
public class BeiJiaDePlc : INotifyPropertyChanged
/// <summary>
/// 无锡倍加德旋转PLC模拟器
/// </summary>
public class BeiJiaDeRotaryPlc : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
......@@ -38,9 +43,7 @@ namespace FLY.Simulation.Blowing
FatekProgramServer fatekProgramServer;
Blowing blowing;
Blowing.AirRing airRing;
DispatcherTimer timer;
public BeiJiaDePlc()
public BeiJiaDeRotaryPlc()
{
}
......@@ -48,6 +51,11 @@ namespace FLY.Simulation.Blowing
public void Init(Blowing blowing)
{
this.blowing = blowing;
Misc.BindingOperations.SetBinding(blowing, nameof(blowing.CurrAngle), updateAngle);
// 授权示例 Authorization example
//11.0.2 版本后,都是下面的激活码
if (!HslCommunication.Authorization.SetAuthorizationCode("e30dcfe8-f4e1-45d3-9aca-9ac8fa0787b1"))
......@@ -58,7 +66,8 @@ namespace FLY.Simulation.Blowing
fatekProgramServer = new FatekProgramServer()
{
Port = Port,
Station = Station
Station = Station,
};
fatekProgramServer.ServerStart();
......@@ -67,12 +76,84 @@ namespace FLY.Simulation.Blowing
fatekProgramServer.Write(ADDR_Angle, Angle);
});
Misc.BindingOperations.SetBinding(blowing, nameof(blowing.CurrAngle), updateAngle);
}
private void updateAngle()
{
Angle = (Int16)(blowing.CurrAngle * 10);
if(!IsReversed)
Angle = (Int16)(blowing.CurrAngle * 10);
else
Angle = (Int16)(-blowing.CurrAngle * 10);
}
string filePath = "beiJiaDeRotaryPlc.json";
public bool Save()
{
return BeiJiaDeRotaryPlcJsonDb.Save(this, filePath);
}
bool Load()
{
return BeiJiaDeRotaryPlcJsonDb.Load(this, filePath);
}
}
public class BeiJiaDeRotaryPlcJsonDb
{
public static bool Load(BeiJiaDeRotaryPlc src, string filePath)
{
if (!File.Exists(filePath))
return false;
try
{
string json = File.ReadAllText(filePath);
var jsonDb = JsonConvert.DeserializeObject<BeiJiaDeRotaryPlcJsonDb>(json);
src.Port = jsonDb.Port;
src.Station = jsonDb.Station;
src.IsReversed = jsonDb.IsReversed;
return true;
}
catch
{
//异常,没有json 解码失败
return false;
}
}
public static bool Save(BeiJiaDeRotaryPlc src, string filePath)
{
try
{
var jsonDb = new BeiJiaDeRotaryPlc()
{
Port = src.Port,
Station = src.Station,
IsReversed = src.IsReversed
};
string json = JsonConvert.SerializeObject(jsonDb, Formatting.Indented);
File.WriteAllText(filePath, json);
return true;
}
catch
{
//异常,没有json 编码失败
return false;
}
}
/// <summary>
/// PLC 地址 及 端口
/// </summary>
public int Port { get; set; } = 500;
/// <summary>
/// 方向反转
/// </summary>
public bool IsReversed { get; set; } = true;
/// <summary>
/// 站号
/// </summary>
public byte Station { get; set; } = 2;
}
}
......@@ -44,7 +44,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="BeiJiaDePlc.cs" />
<Compile Include="BeiJiaDeRotaryPlc.cs" />
<Compile Include="Blowing.cs" />
<Compile Include="FilmLength3D.cs" />
<Compile Include="GageAD.cs" />
......@@ -78,7 +78,7 @@
<Version>11.0.6</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>4.1.0</Version>
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
......
......@@ -8,7 +8,7 @@ namespace FLY.Simulation.Blowing
/// <summary>
/// 1脉冲 = ? mm
/// </summary>
public double Mmpp { get; set; } = 0.14;
public double Mmpp { get; set; } = 0.0943;
/// <summary>
/// 机架总长 mm
......
......@@ -84,7 +84,7 @@
<Version>10.1.1</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>4.1.0</Version>
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
......@@ -15,7 +15,7 @@ namespace FLY.Simulation.Flyad7
{
public class FLYAD7 : IFlyAD, INotifyPropertyChanged
{
public string Addr { get; set; } = "0.0.0.0:20006";
public string Addr { get; set; } = "127.168.251.10:20008";
public int Version { get; } = 2;
......
......@@ -62,10 +62,10 @@
<Version>10.1.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.2</Version>
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>4.1.0</Version>
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
......@@ -40,7 +40,7 @@ namespace FLY.Winder.BeiJiaDe.UI.Server
/// <summary>
/// 方向反转
/// </summary>
public bool IsReversed { get; set; }
public bool IsReversed { get; set; } = true;
/// <summary>
/// 站号
......@@ -106,9 +106,9 @@ namespace FLY.Winder.BeiJiaDe.UI.Server
public void Init()
{
Load();
//if (!Load())
// Save();
//Load();
if (!Load())
Save();
IPEndPoint ep = Misc.StringConverter.ToIPEndPoint(PlcAddr);
......@@ -350,7 +350,7 @@ namespace FLY.Winder.BeiJiaDe.UI.Server
/// <summary>
/// 方向反转
/// </summary>
public bool IsReversed { get; set; }
public bool IsReversed { get; set; } = true;
public static bool Save(RotaryPlc src, string filePath)
{
......
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