public async Task DisconnectFromInstrument() { if (InstrumentCommunicator != null) { await InstrumentCommunicator.Disconnect(); } }
private async Task RunSyncTest() { await Task.Run(async() => { if (!RunningTest) { Log.Info("Syncing Volume..."); await InstrumentCommunicator.Disconnect(); VolumeTest.PulseACount = 0; VolumeTest.PulseBCount = 0; _outputBoard.StartMotor(); do { VolumeTest.PulseACount += FirstPortAInputBoard.ReadInput(); VolumeTest.PulseBCount += FirstPortBInputBoard.ReadInput(); } while (VolumeTest.UncPulseCount < 1); _outputBoard.StopMotor(); Thread.Sleep(500); } }); }
public override async Task StartVolumeTest() { if (!RunningTest) { await InstrumentCommunicator.Connect(); VolumeTest.Items = await InstrumentCommunicator.GetItemValues(InstrumentCommunicator.ItemDetails.VolumeItems()); await InstrumentCommunicator.Disconnect(); VolumeTest.PulseACount = 0; VolumeTest.PulseBCount = 0; await RunningVolumeTest(); } }
public override async Task StartVolumeTest() { if (!RunningTest) { await RunSyncTest(); if (_tachometerCommunicator != null) { await _tachometerCommunicator?.ResetTach(); } await InstrumentCommunicator.Connect(); VolumeTest.Items = await InstrumentCommunicator.GetItemValues(InstrumentCommunicator.ItemDetails.VolumeItems()); await InstrumentCommunicator.Disconnect(); await RunningVolumeTest(); } }