Interface between Arduino and Visual Basic

Hi everyone, I'm trying to make an interface between Arduino and VB for a project in my actual work.
I want to receive information from a cutting machine that cuts wire.

-Required Information-
*The time the machine is working.
*The time the machine is stop (not working).
*The amount of hits the die makes during the process.
Etc..

I want to display all that information on VB. 

I could already do the connections to count both times (Work Time and Time Out) and display them on VB; it works fine.

I also made the connections to count the amount of hits the die makes during the process. 
To receive that information, we receive 24V each time die goes down and 0V when the die goes up.
We put a counter on VB, that every time we receive 24V, the program count +1. The program works perfectly, and shows the counting of hits.

But at a certain time, VB gets freeze.. and we need to reconnect Arduino again to the computer so the program works again.. Some times it freezes at 10 minutes, 30 minutes, even an hour, but it always gets freeze at some time. We don't know why.
If anyone has possible solutions, please tell me, I would be very thankful.

My guess is that the serial

My guess is that the serial port connection gets stale.  You could test this by sending a “ping” signal every minute or every few seconds to see if that keeps it working.  

Also, you could test the port every so often to see if it is open.  If it isn’t, close the old one and open it anew.  Probably something in that vein will fix the issue.

Good luck.

Regards,

Bill