Closed georgekontogiorgos closed 3 years ago
Hi George,
We do have a homing capability that we use at Diamond and you can see and example of it in use for the turbo pmac example IOC. The associated PLC is in etc/lab-home.pmc.
Our PLCs use a staged approach to homing which is reported back to the IOC via some P variables P1000 P1001.
The documentation for the homing approach is in a different module at present. I could extract it for you if you are interested in using our approach. However, I have not yet tried to translate the homing PLCs to Power Pmac so it is as yet untested on your controller.
(so if you want a quick answer then I would go with your SendCmd approach)
Hi Giles,
We do have a homing capability that we use at Diamond and you can see and example of it in use for the turbo pmac example IOC. The associated PLC is in etc/lab-home.pmc.
I would like to try the etc/lab-home.pmc
translated to our Power Pmac, thanks for the tip. I will try to run it on our Power Pmac applications here on LNLS.
Our PLCs use a staged approach to homing which is reported back to the IOC via some P variables P1000 P1001.
These global P-Variables are already mapped on controller or do you use the WriteVariables PVs to get the homing status and reports (I think that it is mapped on that different module that you mentioned I think)?
I would like to know if there is some document tha say about what P-Variables are already mapped by pmac IOC? I have some custom P-variables on some of our applications and I would like to avoid some conflicts between them.
The documentation for the homing approach is in a different module at present. I could extract it for you if you are interested in using our approach. However, I have not yet tried to translate the homing PLCs to Power Pmac so it is as yet untested on your controller.
Yes, I would like to try your approach! I would be flattered to test this for you. So, when you can, please send me this documentation and the module.
Thanks George
I'll put some information together for you, it may take a couple of days.
One point of interest is that we use a python script to generate the homing PLCs and we are currently working on re-writing that, I hope in the medium term for the new version to be able to generate both Turbo and Power Pmac compatible homing PLCs
Hi George, I'm going to provide you with the documentation that is available regarding our autohoming procedures at Diamond. Bear in mind that this is purely for turbo pmac at present but there is no reason that it would not work for power pmac with some tweaks to the PMC code.
First the PLC code can be automatically generated from a python script and the necessary python2 library (motorhome.py) can be found in this project https://github.com/dls-controls/pmacUtil. If you build the documentation for the pmacUtil module there is a page 'motorhome Namespace Reference' which describes in detail the various homing sequences that can be generated by motorhome.py. In case you have difficulty building the documentation I enclose a PDF of the relevant page pmacUtil_ motorhome Namespace Reference.pdf
Note that we are actively working on a new python3 version of motorhome.py with improved syntax and with the goal of creating both turbo and power pmac PLCs. This new module will use exactly the same API so any work you do in EPICS will not be wasted.
The EPICS template that you need to instantiate to communicate with the homing PLC is autohome.template in the pmac module. This is used by my example IOC in pmac. In both the template and the PLC you define numbered groups of motors that are required to be homed in unison - e.g. a 3 Jack system where there are tilt limits. You need to make the Groups in EPICs match the Groups in the PLC for everything to work. Group 1 is always 'Home Everything' which means it goes through each of the groups in turn.
The most comprehensive internal documentation I could find is enclosed here CNTRLS-86513593-240620-0819-60.pdf
I hope this comes in useful.
Regards, giles.
One more document may come in handy. Here is are PMAC standards document which is referred to in the motor homing documentation. It should answer your questions about PVariable allocation. BLS-GEN-CTRL-0005.pdf
Thak you Giles. I have a lot to study now and will try to include these implement on our next developments. Fell free to close the issue if you want!
@arvinderpalaha please can you push the latest motorhome code to dlscontrols organization on github and post a link here for @georginhow.
@georginhow we have almost finished the new project to generate homing routines and it might be useful to you.
Hi!
We have, sometimes, to enable some plc script to do the correct movements to find the encoder reference mark. We thought about sending a
enable plc xxxx
bySendCmd
PV, but I saw some home PVs. Is there a way to perform homing procedure from PV in a custom way?Thanks! George