diff --git a/src/Agilent4uhv.cpp b/src/Agilent4uhv.cpp index 9cc7a4283a5f0e3689b54ecf6a16188277dfbe2f..f40b37effaa81963e99b1b7355c7fae0847ee989 100644 --- a/src/Agilent4uhv.cpp +++ b/src/Agilent4uhv.cpp @@ -261,15 +261,10 @@ void Agilent4uhv::init_device() attr_Model_read[0] = new char[MAX_DEVSTRING_LENGTH]; attr_SerialNumber_read[0] = new char[MAX_DEVSTRING_LENGTH]; - // Waiting the device - int retries = 0; - while(get_state2() == 9 && retries++ < 5) { - sleep(1); - } - /* Che if the mBar is pressure unit used */ int pressure_unit; read_window(600, pressure_unit); + if (pressure_unit != 1) { Tango::Except::throw_exception( "", "mBar is not the pressure unit used", @@ -366,7 +361,7 @@ void Agilent4uhv::init_device() worker->start(); } catch(Tango::DevFailed &e) { if (string(e.errors[0].reason) == "API_CommandNotAllowed") - init_error = "Initialization failed: " + get_status2(); + init_error = "Initialization failed: " + get_status(); else init_error = "Initialization failed: " + string(e.errors[0].desc); } catch (...) {