private void StartScale_Click(object sender, EventArgs e)
{
StartScale.Enabled = false;
ushort DataValue = 128;
ULStat = DaqBoard.DOut(portNum, DataValue);
waitForTimer(300);
DataValue = 0;
ULStat = DaqBoard.DOut(portNum, DataValue);
waitForTimer(100);
getBoardData();
StartScale.Enabled = true;
}
private void Delay(int MillisecondsToWait)
{
DateTime dt = DateTime.Now.AddMilliseconds(MillisecondsToWait);
while (dt.Subtract(DateTime.Now).TotalMilliseconds > 0)
{
System.Threading.Thread.Sleep(50);
Application.DoEvents();
}
}
|