add example for 2-axis piezo controller in device_configs/user_template.yaml #204
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
issue::not confirmed
issue::not reproducible
issue::reproducible
priority::critical
priority::needed
priority::nice to have
scope::backend
scope::frontend
stage::in development
stage::on hold
stage::pre_release
stage::ready for review
stage::selected for development
stage::weekly backlog
type::bug
type::discussion
type::doc
type::feature
type::improvement
type::test
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Used if an issue has not yet been confirmed by a developer
Used if an issue is not reproducible
Used if a developer was able to reproduce the issue
Should be done as soon as possible
An important update to the code base
Not really needed but a good improvement
An issue regarding the backend services
An issue regarding the user-facing services
This issue is currently being worked on
Something is blocking the development
For issues that have been merged into a pre-release branch and are waiting for their release.
For issues that have been resolved and are ready for review
This issue has been selected for development but has not been scheduled yet
This issue has been selected for development for the next development cycle
It's a bug!
A discussion is wanted/needed
Improvements to the documentation
A new feature
Neither a feature nor a bug but an improvement to the code base
Missing tests or improvements to the test suite
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
acerbo_a (acerbo_a)
bec-gitea
celcer_t (celcer_t)
debenjak_l (debenjak_l)
diaz (diaz)
divall_e (divall_e)
guizar_m (guizar_m)
haghta_s (haghta_s)
holler (holler)
lombosi_c (lombosi_c)
menzel (menzel)
perl_d (perl_d)
usov_i (usov_i)
wakonig_k (wakonig_k)
wang_x1 (wang_x1)
wyzula_j (wyzula_j)
zamofing_t (zamofing_t)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bec/csaxs_bec#204
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I was testing the devices/npoint.py ophyd to control the 3-axis and the 2-axis nPoint controllers with the help of Klaus. We found that the current way to change the settling time of the piezo is:
dev.npx.settling_time.put(0.08)
And this can be used to get the current value:
dev.npx.settling_time.get()
I checked that 2 axes form 2 different controllers can be added simultaneously in the yaml file. I have thus added an example to configure an axis from the 2-axis controller in the device_configs/user_template.yaml file. The main difference with the 3-axis controller is the hostname and the limits of the motion.
We think that they way it works is that when connecting to each controller, it reads the corresponding range directly from the controller, so that the correct conversion from voltage to distance in microns can be done. Perhaps we should check this once with a microscope, I will discuss this with @holler next week.
Perhaps another thing to report is that I typically had to load the config file in bec more than once until it worked... I found this a bit strange but as long as it works I am happy.
Thanks for your patience @wakonig_k
@diaz
Was it complaining that it could not connect? Or any other error message?
Yes, I think the complaints were about the connection. Typically, the first time it would complain, and the second time it was then asking weather to load all new parameters from the configuration, or to keep the values from previous ones (the question that it asks with 3 different possible answers)
From the logs, it looks like it was able to connect but the initial read that it performs afterwards fails with a timeout. Maybe the controller needs more time after opening the connection. We could try to repeat the same readout 2-3 times, giving us a total timeout of 6 s (2 s per try) before giving up.
Yes, we could try that, thanks! My impression is that it needs longer time to establish the connection, indeed. I also noticed that it took a while from physically connecting to network (plug ethernet cable and turn controller on) until the controller was detected in PacketFence. It needs its time...
okay, I will add the retry to this branch
It will try it now 5 times with a 1s delay in between. Let's see if that "fixes" it
Regarding "settling_time" and "settle_time": We've had a discussion with Controls yesterday and we agreed that we would override the default ophyd property "settle_time" with what we currently have in "settling_time". This should make it more consistent: configurations are signals.
If you want, we can make the change already here for the NPoint. It is merely renaming
to
Hi Klaus. I am not sure I completely understand. Would this mean that we can set the settling time of the piezo in the configuration? How?
Yes, this would be a side-effect once merged. It would then behave like a normal signal, allowing you to do something like
If you want, I can make the required changes
This sounds great, Klaus, thank you!
Should I test the branch before merging? - Did you make a branch?
acdc3728b9to40e1efa329I pushed it now to this branch. We can merge it and test it the next time we find the opportunity. I would be particularly interested in the startup behavior (as discussed above) and whether the repeated readout attempt improves the stability.
Ana, feel free to merge :)
OK, thanks!
I am trying to figure out how to merge. I have button here that says: "rebase, then fast-forward"
And a message:
"The merge will not be signed as the base commit is not signed.
This pull request can be merged automatically"
But I don't see a clear button saying "merge"
You can press the rebase button (see https://bec.readthedocs.io/latest/how-to/git/merge-changes-to-main.html). Rebasing is similar to merge but puts the commits on top of the main branch, not just mingles them in between.
OK, now I was reading the instructions and I think it is clear. Thank you. It's just that the buttons have nothing to do with logic or intuition... I guess I need to learn all this
I have a chance to test the piezos today, so I am going to test on the branch, maybe add the settling time in the config template, and I will then merge
That's great to hear!
Please note that it is now called
settle_time, notsettling_time1c4165f301toabca4364bdMerged!
Thanks for your help, Klaus!