public GpibResponse CreateIO488Object() { try { ioDmm = new FormattedIO488Class(); GpibResponse gr = new GpibResponse("00", "OK", null); return(gr); } catch (SystemException ex) { GpibResponse gr = new GpibResponse("EX", "FormattedIO488Class object creation failure. " + ex.Source + " " + ex.Message, ex); return(gr); } }
private void ExecuteInitializeMeterMethod(object parameter) { ThreadPool.QueueUserWorkItem( o => { // This is a background operation! DispatcherHelper.CheckBeginInvokeOnUI( () => { // Dispatch back to the main thread //isBusy = false; Current1 += 1; System.Threading.Thread.Sleep(1000); GpibResponse gr = _Ammeters[0].CreateIO488Object(); Current1 += 1; //isBusy = false; }); }); }