Archie,
When I run this code all the data populates and the message box pops up 3 times:
Private lastValue As Single
Private currentValue As Single
Private vesselFillRate As Single
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
Me.currentValue = Me.ModbusRTUCom1.Read("404116") '<---- This line will depend on your driver and tag for D19 register
Catch ex As Exception
System.Windows.Forms.MessageBox.Show("All data exported successfully", "Data Export Complete!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
vesselFillRate = (Me.currentValue - Me.lastValue) * 60
Me.BasicLabel4.Value = vesselFillRate 'This you could change to CInt(vesselFillRate) to get round value
Me.lastValue = Me.currentValue
End Sub
Do you see any problem that could cause or just annoyance?