openUC2 / ImSwitchConfig

3 stars 2 forks source link

soft limits #6

Open anasophy opened 5 months ago

anasophy commented 5 months ago

@beniroquai record limits in the script so that the microscope does not exceed them x: up to 105000 µm y: up to 51000 µm

beniroquai commented 4 months ago

Theoretically you can set the parameters in your config file. It would be this: https://github.com/openUC2/ImSwitch/blob/master/imswitch/imcontrol/model/managers/positioners/ESP32StageManager.py#L30

So in json format something like: 'minX':0, 'maxX':100000,

if 100000 is your maximum position the stage can move. I need to double check if this was correctly implemented. But you can also check on your own :)

In fact, it would probably be better to check for the values in the def move()function so that there is no motion if the currentposition+step is outside the range of minX..minX

What do you think @anasophy ?