-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ikon-M not configuring shutter #28
Comments
Those trace lines are warnings that, for example, getIntegerParam is being called for a parameter that has never been set. That may or may not actually be a problem, depending on whether the value read is actually being used. When you say
how did you configure it to be 2? You should display the record with dbpr:
What does it show? Please post the complete output of that command. Also post the output of the command
|
I configured the ShutterMode with a caput command. Which gave no error and gave me the desired Detector Output as a result on caget. Find attached a log of the two commands you asked for. They are in the wrong order though... |
The ADAndor driver uses 2 PVs to control the shutter operation. The first PV is defined in the the ADDriver base class, and is called ShutterMode. It provides 3 choices, defined in ADBase.template:
You have set this to 2, which is correct if you want the detector to control the shutter. The second PV is defined in andorCCD.template and is called AndorShutterMode. It provides 5 choices:
It appears that you have set both of these correctly. asynReport shows:
So you have selected "Detector output" for ShutterMode and "Fully Auto" for AndorShutterMode".
I don't understand that statement. dbpr and asynReport both show that the value is 2 and not 0. What observation led you to think it was 0 and not 2? Note that lines like this:
are normal because the order of PINI records in EPICS is somewhat undefined. So the value of ShutterMode may be initially undefined when the ADAndor::setupShutter() method is called. However, as each of the records processes it will be called again, until finally it is called with all records initialized and the operation should be as defined. Please explain the actual problem you are observing, and what you changed in the driver to fix whatever problem you were observing. |
The shutter settings are as they should be: ShutterMode 2 for Detector Output, AndorShutterMode 0 for fully auto. I started off with me getting only getting background images when collecting data with the andor. More exactly images with ~300 counts with few hot pixels which were not very hot either. I played around with various things until at some level of frustration I enabled the tracing thing. From the trace I learned that SetShutter() in setupShutter() was never called. I then proceeded to place a breakpoint at the start of setupShutter(). From this I learned that ShutterMode was 0. This made the test in the beginning of setupShutter() trigger and leave without ever calling SetShutter(). I observer that setupShutter() was sometimes called with the correct value but not reliably. The fix I then made was to call SetShutter() from the startAcquisition() method which I could observe to be frequently called from the trace. This fixed my problem but this seems not to be the right way forward. |
Please change this line in setupShutter
to this:
adShutterMode should be 0 until it is set to 2 either via caput() (or equivalent from a GUI) or from autosave. Are you running autosave? You seem to be reporting that it sometimes 2 but then goes back to 0? This debugging should show if that is ever happening. |
I tried that. Find the output attached. Yes, I am using autosave Please note that I switched to AndorShutterMode 7, Bulb in the meantime. This is working as expected for me. |
It looks to me like you have indeed found a bug. The problem is that setupShutter() should be called whenever ADShutterMode is changed, but it is not. It will thus only work correctly if AndorShutterMode is changed after ADShutterMode, because then setupShutter will be called after the correct value of ADShutterMode is set. Please try changing this code in writeInt32()
to this:
|
Thanks, this helped. I proceeded to another problem in that SetShutter() did not like the Bulb mode much. But I attribute this to our special andor library version not being implemented properly. This is no longer an AD problem. |
I have committed the above fix to the master branch. Note that in order to use the master branch of ADAndor you will currently need to also use the master branch of ADCore, because it adds a new CCDMultiTrack class that ADAndor now uses. You will also need to use asyn R4-37 because ADCore R3-8 and later require that. |
I am closing this issue because I believe that 591bbca fixes it. |
I am trying to use the Andor Ikon-M USB camera with area detector ADAndor. I tried debugging this problem and placed a breakpoint in AndorCCD::setupShutter(). I found that the shutter mode value was 0 and not the 2 I configured it to be. I then configured the driver into trace mode and in the trace I found lines like this:
2019/11/19 09:51:39.618 asynPortDriver:getIntegerParam: port=ANDOR error getting parameter 81 SHUTTER_MODE, in list 0, value u\
The trace also contains other, similar, lines for other parameters. I now assume that this the root cause of my problem. I did not modify anything in the drivers parameter handling. What can this be?
I attach the full trace:
andortrace.log
The text was updated successfully, but these errors were encountered: