Apr-30-2020, 03:38 AM
Ok, I will try your suggestion.
Sorry for not sharing the code. It is very long and there are a lot of things going on, so here I am just trying to narrow down the issue. Actually, one thing I have just realised is that in my exception block I was still using an attribute of MyDevice. But what I could do is to generate a new instance of the device class with the same name, and then run a reset commands. Maybe like this it could work. Of course this is not understanding the issue, but I am just trying to find a way to avoid stopping the measurement while running over night.
Also, I am now trying to run the script via command prompt instead of Spyder. Not sure if this will make any difference.
Sorry for not sharing the code. It is very long and there are a lot of things going on, so here I am just trying to narrow down the issue. Actually, one thing I have just realised is that in my exception block I was still using an attribute of MyDevice. But what I could do is to generate a new instance of the device class with the same name, and then run a reset commands. Maybe like this it could work. Of course this is not understanding the issue, but I am just trying to find a way to avoid stopping the measurement while running over night.
Also, I am now trying to run the script via command prompt instead of Spyder. Not sure if this will make any difference.