Qcodes icon indicating copy to clipboard operation
Qcodes copied to clipboard

fix cryomagnetics4g driver bug.

Open liuyichao82 opened this issue 8 months ago • 0 comments

I am trying to fix several bugs in cryomagnetics4g:

  1. In the write_raw function of the code, when VisaIOError occurs in the first communication, the code will use self._RETRY_WRITE_ASK to determine whether to re-communicate, but I did not see the definition of self._RETRY_WRITE_ASK in the code, so I added
self._RETRY_WRITE_ASK = True
self._RETRY_TIME = 1 
  1. This magnet power supply has three states: Standby, Holding, and Ramping. In the original code, each time the set_field function is executed, it will determine whether the magnetic field setting is normal by judging whether the final state is the Holding state. However, he forgot one situation——when the magnetic field is set to 0T, the magnet power supply will enter the Standby state instead of Holding, so I added a judgment to fix this problem.
  2. This program waits for the excitation to end by checking the status code status_byte = int(self.ask("*STB?")), when the magnet state is not ramping, it means that the excitation is complete. However, there is a problem with this magnet power supply——even if the magnetic field has been added to the specified value, the state is still ramping and will not change! So I changed to ask the current magnetic field value self._get_field() to determine whether the excitation is complete

liuyichao82 avatar Apr 30 '25 14:04 liuyichao82