Your Interval is 1 second, not 2 - and that may be contributing to the problem.
I would assign the Tick handler before I start the Timer personally but it shouldn;t cause a problem.
We can't help you fix this - we have no idea what your GetdataMachine method does - but if it takes longer than one second to execute at any time, then it's possible that your message queue is filling up and UI updates no longer happen, so your app appears to freeze and stop working.
Start by adding logging to your Tick handler: use a
Stopwatch Class (System.Diagnostics) | Microsoft Docs[
^] to time the event handler, and log that to a file for review after it stops working, along with the current date and time.
See if at any point the event handler is taking too long to execute after it fails.