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

Panda improvements #1341

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Panda improvements #1341

merged 2 commits into from
Apr 30, 2024

Conversation

olliesilvester
Copy link
Contributor

@olliesilvester olliesilvester commented Apr 29, 2024

Fixes #1338 and DiamondLightSource/mx-bluesky#278

I didn't add tests here since it was mainly just logging / I'm being a bit lazy, I can add some if needed though

To test:

  1. Confirm changes are sensible and that tests pass

Copy link
Collaborator

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Couple of comments in code

@@ -174,6 +172,10 @@ def setup_panda_for_flyscan(
# Values need to be set before blocks are enabled, so wait here
yield from bps.wait(group="panda-config", timeout=GENERAL_TIMEOUT)

LOGGER.info(f"PandA sequencer table has been set to: {str(table)}")
table_readback = yield from bps.rd(panda.seq[1].table)
LOGGER.info(f"PandA sequencer table readback is: {str(table_readback)}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: This is going to match the setpoint ideally so might be a bit noisy in the logs. If you think the bug is gone where we need to report it then remove it, otherwise can we put it as a debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll put as debug now. When we're 100% sure there's no more issues with it I will remove

Comment on lines 200 to 209
gridscan_start_time = time()
LOGGER.info("Waiting for Zocalo device queue to have been cleared...")
yield from bps.wait(
ZOCALO_STAGE_GROUP
) # Make sure ZocaloResults queue is clear and ready to accept our new data
LOGGER.info("completing FGS")
yield from bps.complete(gridscan, wait=True)
LOGGER.info(
f"Gridscan motion program took {round(time()-gridscan_start_time,2)} to complete"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: We will hopefully have proper metrics soon so I don't think we should include printing timings like this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite useful to see how long things are taking while we are still increasing the run-up distance. I could just add it in temporarily when I do testing instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, can you leave it in with a comment saying to remove it when we have metrics?

Copy link
Collaborator

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@DominicOram DominicOram merged commit ceebe9f into main Apr 30, 2024
9 checks passed
@DominicOram DominicOram deleted the 1338_panda_improvements branch April 30, 2024 10:02
olliesilvester pushed a commit to olliesilvester/mx-bluesky that referenced this pull request Aug 23, 2024
…Source/1338_panda_improvements

Panda improvements
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PandA grid scans improvements
2 participants