QMAPP-mq / qudi

A modular laboratory experiment management suite.
GNU General Public License v3.0
4 stars 0 forks source link

figure how to init New Focus screw positions #21

Open mvbnano opened 6 years ago

mvbnano commented 6 years ago

The New Focus screws have no 'absolute' positions, only relative:

The actual position represents the internal number of steps made by the controller relative to its position when controller was powered ON or a system reset occurred or Home (DH) command was received. Note that the real or physical position of the actuator/motor may differ as a function of mechanical precision and inherent open-loop positioning inaccuracies.

We need to think about how to smartly manage this.

BGNorton commented 6 years ago

For the teaching labs I think the best method if to reference off one of the corners of the sample slide. Im pretty sure there is a "set home position" command which will then allow us to set that position to be the origin. Does that sound reasonable?

MyrddynEmrys commented 6 years ago

Idea: So what we could do is ensure that when we have on_deactivate we send it to the home position. This means on activate it should already be at the home position. Then everything will be an absolute distance from the home position as it will be static. I have an idea how to do this.

The only problem with this is if there is a hard reset. (usb unplugged, power issue, continues to move when qudi crashes etc.) then it will be lost. I'm not sure how to solve this. Maybe a logging function? when we get position from any movement it logs where it is relative to home. Then on start up. qudi checks if it's last position was at the home position [x1,y1,z1]=(0,0,0). If not then it moves x2 = -(x1), y2=-(y1), z2=-(z2). Then it will be back to where the previous home is (which we set manually at the very beginning) and then use the set home position like Ben says on the new position it is in after making this fix. This will mean before it starts moving it is always in the same (0,0,0).