mirror of
https://github.com/OpenLogics/MewtocolNet.git
synced 2025-12-06 03:01:24 +00:00
Gone from async queue
This commit is contained in:
@@ -55,9 +55,14 @@ public partial class ConnectView : UserControl {
|
||||
|
||||
App.ViewModel.Plc = Mewtocol.Ethernet(viewModel.SelectedIP, parsedInt)
|
||||
.WithPoller()
|
||||
.WithInterfaceSettings(s => {
|
||||
s.TryReconnectAttempts = 30;
|
||||
s.TryReconnectDelayMs = 2000;
|
||||
})
|
||||
.WithRegisters(b => {
|
||||
b.Struct<short>("DT0").Build();
|
||||
b.Struct<short>("DT0").AsArray(30).Build();
|
||||
b.Struct<Word>("DT1002").Build();
|
||||
})
|
||||
.Build();
|
||||
|
||||
@@ -67,6 +72,12 @@ public partial class ConnectView : UserControl {
|
||||
|
||||
App.MainWindow.mainContent.Content = new PlcDataView();
|
||||
|
||||
//for (int i = 0; i < 300000; i++) {
|
||||
|
||||
// _ = Task.Run(async () => await App.ViewModel.Plc.SendCommandAsync("%EE#RT"));
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
viewModel.IsConnecting = false;
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
<DataGridTextColumn Header="Address" Binding="{Binding PLCAddressName}"/>
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding UnderlyingSystemType.Name}"/>
|
||||
<DataGridTextColumn Header="Value" Binding="{Binding ValueStr}"/>
|
||||
<!--<DataGridTextColumn Header="Value" Binding="{Binding PollLevel, Mode=OneWay}"/>-->
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user