Thread_Main=New Thread (AddressOf Templ_chark)
Thread_Main. Start ()
Loop_Mark=True
End Sub
Public Sub Templ_chark ()
While Loop_Mark=True
Me. Invoke (New Thread_New (AddressOf Main_loop))
End While
End Sub
Public Sub Main_loop ()
Modbus_Comunication (DataGridView1 (3, 0). The Value. The ToString)
End Sub
Private Sub Stop_btn_Click (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles Stop_btn. Click Loop_Mark=False
Thread_Main. Abort ()
End Sub
Modbus_Comunication as a communication function, takes longer,
CodePudding user response:
The.net there should be a debug mode, please look at you one by one cycle