You can try using old code, inside the DataSubscriber2 - Region "Subscribing and PLC data receiving" - Private Sub PolledDataReturnedValue, just replace the whole sub with the following:
Private Sub PolledDataReturnedValue(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
Try
'* Fire this event every time data is returned
OnDataReturned(e)
'For index = 0 To m_PLCAddressValueItems.Count - 1
' If String.Compare(e.PlcAddress, m_PLCAddressValueItems(index).PLCAddress, True) = 0 Then
' Dim i As Integer
' Dim tempString As String = ""
' Dim tempValue As String = ""
' While (i < e.Values.Count)
' Try
' tempValue = m_PLCAddressValueItems(index).GetScaledValue(e.Values(i))
' Catch ex As Exception
' tempValue = "," & "INVALID - Check scale factor/offset - " & e.Values(i)
' End Try
' If i > 0 Then
' tempString &= "," & tempValue
' Else
' tempString = tempValue
' End If
' i += 1
' End While
' If m_PLCAddressValueItems(index).LastValue <> tempString Then
' m_PLCAddressValueItems(index).LastValue = tempString
' '* This event is only fired when the returned data has changed
' OnDataChanged(e)
' End If
' End If
'Next
For index = 0 To m_PLCAddressValueItems.Count - 1
If String.Compare(e.PlcAddress, m_PLCAddressValueItems(index).PLCAddress, True) = 0 Then
Dim i As Integer
Dim tempString As String = ""
Dim tempValue As String = ""
While (i < e.Values.Count)
Try
If m_PLCAddressValueItems(index).ScaleFactor = 1 Then
If m_PLCAddressValueItems(index).ScaleOffset <> 0 Then
tempValue = CStr((CDbl(e.Values(i)) + m_PLCAddressValueItems(index).ScaleOffset))
Else
tempValue = e.Values(i)
End If
Else
tempValue = CStr((CDbl(e.Values(i)) * m_PLCAddressValueItems(index).ScaleFactor + m_PLCAddressValueItems(index).ScaleOffset))
End If
Catch ex As Exception
tempValue = "," & "INVALID - Check scale factor/offset - " & e.Values(i)
End Try
If i > 0 Then
tempString &= "," & tempValue
Else
tempString = tempValue
End If
i += 1
End While
If m_PLCAddressValueItems(index).LastValue <> tempString Then
m_PLCAddressValueItems(index).LastValue = tempString
'* This event is only fired when the returned data has changed
OnDataChanged(e)
End If
End If
Next
Catch
DisplayError("INVALID VALUE RETURNED!")
End Try
End Sub
The current code has been included here as a commented section.