diff --git a/src/Agilent4uhv.cpp b/src/Agilent4uhv.cpp index 4d08653ecef3e644860830c67ddd0356ac28b07b..3e29734db05e17b3c7d354a7b88b11f5854fcda9 100644 --- a/src/Agilent4uhv.cpp +++ b/src/Agilent4uhv.cpp @@ -249,6 +249,12 @@ 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);