add example for 2-axis piezo controller in device_configs/user_template.yaml #204
Reference in New Issue
Block a user
Delete Branch "2axis_npoint_controller"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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!