Hi guys his my problem:
I am trying to run the function:
from inside a while loop of a different function ie.Code:Private Sub port_dataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles port.DataReceived
the real problem is that the serial call updates the value of A_switch which is need to exit the loop at the correct timeCode:While A_switch = 0 System.Threading.Thread.Sleep(100) ' Sleep for .1 second calabrate_send = calabrate_send - 5 port.WriteLine("9 1 ") port.WriteLine(calabrate_send) port.WriteLine("a") end While
if anyone knows how to do this or has a better method i would love to hear -cheers robbo




Reply With Quote