Skip to content

Commit 074dcb7

Browse files
author
jogibear9988
committed
Updates to PLCTag, ItemDoesNotExistError fixes...
1 parent 283c845 commit 074dcb7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ExampleWPFVisualization/MainWindow.xaml.cs

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ private void cmdStop_Click(object sender, RoutedEventArgs e)
103103
worker.CancelAsync();
104104
cmdConnect.IsEnabled = true;
105105
cmdStop.IsEnabled = false;
106+
myConn.Disconnect();
106107
}
107108

108109

LibNoDaveConnectionLibrary/Communication/PLCConnection.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1445,9 +1445,7 @@ public void ReadValues(IEnumerable<PLCTag> valueList)
14451445
libnodave.PDU myPDU = _dc.prepareReadRequest();
14461446

14471447
foreach (var libNoDaveValue in valueList)
1448-
{
1449-
libNoDaveValue.ItemDoesNotExist = false;
1450-
1448+
{
14511449
//Save the Byte Address in anthoer Variable, because if we split the Read Request, we need not the real Start Address
14521450
akByteAddress = libNoDaveValue.ByteAddress;
14531451

@@ -1574,6 +1572,7 @@ public void ReadValues(IEnumerable<PLCTag> valueList)
15741572
{
15751573
if (!NotExistedValue[nr])
15761574
{
1575+
value.ItemDoesNotExist = false;
15771576
value._readValueFromBuffer(completeData, buffPos);
15781577
buffPos += value._internalGetSize();
15791578
}

0 commit comments

Comments
 (0)