Hi All.
I have encountered a weird problem as follows:
I am running C# Win Form app build with Visual Studio Community 2019.
The main form will be constantly receiving CAN messages via USB-CAN adaptor using DLL file provided by CAN manufacturer.
I clicked a button to select which particular CAN-ID message I want to process and display. Then a separate sub form opens up
and decodes the parameters in CAN message and then plots in a line chart the received and decoded variables.
This chart plotting in sub form slows down. I found out this happens when I DO NOT CLICK and HOLD on the main form window continuously.
When I do click and hold on the main form window, I can see CAN-ID message count with its timestamps and also raw hex data of CAN packet is
shown on a display log in the main form and is updating and running continuous.
When I let go and do not click on the main form window, the update in main form display log slows down and is only updated once every 20 - 30 plus seconds.
But I can see that the message count is correct as there is some difference between CAN message count between each update shown in display log. This means
the CAN message is still being received in between consecutive updates shown in display log window ion main form.
But in the above case, the chart plot in sub form slows down and there are many missing data points not plotted as sub form is not receiving those data points in between updates.
The timestamp of each data point send to sub form from the main is shown on sub form and it also freezes between updates. But when I click on main form window, both the
display log window in the main and received data interval time stamps in the sub form are running smoothly and continuously.
I have tried what means I know and also googled on this problem with no result.
Please advise.
Best regards
Tang
I have encountered a weird problem as follows:
I am running C# Win Form app build with Visual Studio Community 2019.
The main form will be constantly receiving CAN messages via USB-CAN adaptor using DLL file provided by CAN manufacturer.
I clicked a button to select which particular CAN-ID message I want to process and display. Then a separate sub form opens up
and decodes the parameters in CAN message and then plots in a line chart the received and decoded variables.
This chart plotting in sub form slows down. I found out this happens when I DO NOT CLICK and HOLD on the main form window continuously.
When I do click and hold on the main form window, I can see CAN-ID message count with its timestamps and also raw hex data of CAN packet is
shown on a display log in the main form and is updating and running continuous.
When I let go and do not click on the main form window, the update in main form display log slows down and is only updated once every 20 - 30 plus seconds.
But I can see that the message count is correct as there is some difference between CAN message count between each update shown in display log. This means
the CAN message is still being received in between consecutive updates shown in display log window ion main form.
But in the above case, the chart plot in sub form slows down and there are many missing data points not plotted as sub form is not receiving those data points in between updates.
The timestamp of each data point send to sub form from the main is shown on sub form and it also freezes between updates. But when I click on main form window, both the
display log window in the main and received data interval time stamps in the sub form are running smoothly and continuously.
I have tried what means I know and also googled on this problem with no result.
Please advise.
Best regards
Tang