Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

XBPM feedback #796

Closed
DominicOram opened this issue Jul 13, 2023 · 4 comments · Fixed by #883
Closed

XBPM feedback #796

DominicOram opened this issue Jul 13, 2023 · 4 comments · Fixed by #883
Assignees
Labels
Other UDC Bits The small bits outside main scans that are required

Comments

@DominicOram
Copy link
Collaborator

DominicOram commented Jul 13, 2023

  • Set transmission to 100%
  • Check that feedback is in position (with some settle time)
  • Stop feedback
  • Move to transimission for data collection
  • Do data collection
  • Start feedback
  • Set back to 100% transmission
@DominicOram DominicOram added the Other UDC Bits The small bits outside main scans that are required label Jul 13, 2023
@DominicOram
Copy link
Collaborator Author

This is what's used to tell if we have beam so we can just wait on it.

For testing when we have no beam it might be useful to turn this on/off but don't want this accidentally

@DominicOram
Copy link
Collaborator Author

The checking with settle time relies on bluesky/ophyd#1142

@DominicOram
Copy link
Collaborator Author

DominicOram commented Aug 7, 2023

The code used in GDA currently to do the waiting part is:

def waitWhileBusy():
	logger.debug("waitWhileBusy()")

	if is_unavailable():
		logger.debug("waitWhileBusy() skipped as feedback unavailable")
		return

	if is_enabled() and not is_paused():
		if isI03():
			if expt_shutter() == 'Closed':
				return
			# beam already in position
			if not beam_position_feedback.isBusy():
				return
			# wait for beam to be in position
			beam_position_feedback.waitWhileBusy()
			beam_in_position = False
			time_to_wait_for_beam = 3 # beam must be in position for this many consecutive seconds
			logger.info("Waiting for beam in position for "+str(time_to_wait_for_beam)+" seconds")
			while not beam_in_position:
				for n in range(time_to_wait_for_beam):
					if not beam_position_feedback.isBusy():
						sleep(1)
						beam_in_position = True
					else:
						sleep(1)
						beam_in_position = False
						break
		if isI04():
			beam_position_feedback.waitWhileBusy()

@DominicOram
Copy link
Collaborator Author

DominicOram commented Sep 3, 2023

As discussed with @neil-i03, the reason we want to run with the XBPM feedbak on and transmission at 100% for most of the time and turn it off for collections are:

  1. Objects crossing the beam that illuminates the feedback xbpm (e.g. attenuators) risk a feedback event while crossing - this leads to the feedback motor heading to an extreme and it may not recover ( seen many times)
  2. At higher energies the signal reduces. So low transmission/high energy risks hitting a point where feedback on the xbpms is unreliable. There is a gain change feature, but it can cause the XBPM readback to hang and then it just sits there forever.

XBPM feedback is mainly for correcting slow thermal drift so safe to assume beam is stable when feedback off for collection

DominicOram added a commit to DiamondLightSource/dodal that referenced this issue Sep 3, 2023
DominicOram added a commit to DiamondLightSource/dodal that referenced this issue Sep 3, 2023
DominicOram added a commit that referenced this issue Sep 3, 2023
DominicOram added a commit to DiamondLightSource/dodal that referenced this issue Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Other UDC Bits The small bits outside main scans that are required
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant