Hello all, I need your help. we use the control to communicate with a measuring device. It sends 10 ASCII for a single measurment. We measure 4000 times / sec. All goes well for a couple of hours. But some times we get a windows exeption:
in this code section:
Private Sub CHRControl_OnReceive(ByVal Sender As Object, _ ByVal NumberOfBytesInBuffer As System.UInt32) _ Handles CHRControl.OnReceive '---------------------------------------------------------------- Dim BytesInBuffer(CInt(NumberOfBytesInBuffer - 1)) As Byte Dim ActualNumberOfBytesInBuffer As Integer = 0 Try ActualNumberOfBytesInBuffer = _ CInt(CHRControl.ReadArray(BytesInBuffer)) If ActualNumberOfBytesInBuffer > 0 Then '--------------------------------------------------------- CHRBuffer.Append(Encoding.ASCII.GetString(BytesInBuffer)) '--------------------------------------------------------- End If Catch ex As FabulaTech.SPC.FTSPCException
End Try End Sub
We are using Windows 7 prof. 32Bit Fabula control 2.0 Visual Studio 2011 VB.net
The exception says overflow of "NumberOfBytesInBuffer"= 4294966994
Overflow Exception arithmetric operation resulted in an overflow
Please try using the latest version of Serial Port Control 2.2 http://www.fabulatech.com/serial-port-control.msi If your problem happens again with 2,2 version then please contact me at support@fabulatech.com
Have you tried version 2.2 from our website? http://www.fabulatech.com/serial-port-control.msi
Please try it. If issue will happen again with version 2.2 then please send me the code of your application to support@fabulatech.com so our developer can analyse it. (The complete source code of your application is not necessary. That would be great to if you can give us a separate part of code that reproduces the issue)