-
Notifications
You must be signed in to change notification settings - Fork 10
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
Eiger2 500K exposure and acquisition time are reset to 1s on IOC restart #58
Comments
I understand why you are seeing this with both AcquireTime and ThresholdEnergy. Note that AcquireTime and AcquirePeriod affect each other.
So if AcquirePeriod is currently 1 and AcquireTime is set to 300 then the actual value of AcquirePeriod (and the RBV value) will be set to 300. But the output record will still be 1.0, and that is what is in autosave. AcquirePeriod_RBV is 300, but that is not what is saved with autosave. So when the system reboots AcquireTime is set to 300, but then AcquirePeriod is set to 1 (the value before reboot). That causes the actual value of AcquireTime (and the RBV value) to be set to 1.0. AcquireTime and AcquirePeriod both have PINI=YES. It is clear than during iocInit AcquirePeriod is processing after AcquireTime, but this is not something the user can control. There are 3 ways to overcome this problem:
The problem with the Threshold is similar. The problem is that whenever the PhotonEnergy is changed the actual Threshold (and the RBV value) is set to 50% of PhotonEnergy. But the output record is not updated to this value. In the screen shot above the PhotonEnergy was set to 7000 so the actual value of the Threshold (and the RBV value) were set to 3500. However, the output record for the Threshold was still 3000, and that is what is in autosave. It is clear during iocInit PhotonEnergy is processing before Threshold, so the value of 3000 for Threshold is being restored after PhotonEnergy is set. All 3 of the methods described above can be used to overcome this problem as well. |
The problem with AcquireTime being changed because the autosave value of AcquirePeriod is "wrong" is fixed via dbpf commands in the st.cmd files on the alignment_mode branch. This assumes the user wants to give priority to the AcquireTime. If priority should go to AcquirePeriod then comment out that line. The issue with Threshold and PhotonEnergy is more difficult. @antoninomiceli in your screen shot above what is the "correct" value to restore for Threshold. the value 3000 that the user last explicitly set, or the value 3500 that was last set by selecting the PhotonEnergy? autosave cannot save the Threshold_RBV value so it does not know what was actually in use. |
I implemented option 3 above (asyn:READBACK info tag) for the ThresholdEnergy, AcquireTime, and AcquirePeriod records. This keeps the output records synced to the RBV records, so there is no longer any issue with autosave values. |
I think you figured it out already, but to answer you question above.... the =correct value in the above screenshot should been 3500 for Threshold. |
This is fixed in 84dcd74 by adding the asyn:READBACK info tag to AcquireTime, AcquirePeriod, and ThresholdEnergy in the database. This keeps the output record synced with the readback when the driver changes these. This avoids problems with autosave. |
I am testing with the Detector Pool Eiger2 Si 500k and it seems on every IOC restart, the autosaved values are displayed in the GUI, but the detector itself is reset to 1.0s for exposure/acquire time. They must be re-set before taking effect.
This is similar to #31 but is happening every IOC restart, no change to detector needed.
Eiger firmware release-2020.2.2
SDK 1.8.0
Driver 3.2.0
ADCore 3.12.1
StreamAPI selected; FileWriterAPI disabled
This detector setup seems to have other issues (#57) which may or may not be related
The text was updated successfully, but these errors were encountered: