We have resorted to some extra Database to achieve:
# Motor resolution for this axis
record(ao,"$(P)$(M)Resolution") {
field(DESC,
"$(M) resolution")
field(DOL, "$(P)$(M).MRES CP MS")
field(OMSL,
"closed_loop")
field(DTYP,
"asynFloat64")
field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_REC_RESOLUTION")
field(PREC,
"$(PREC)")
}
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
Sent: 07 February 2020 11:05
To: mark.koennecke <mark.koennecke at psi.ch>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: asynMotorAxis
I know the resolution is available to the Newport XPS driver, because it uses it for profile moves.
I forget how I did that, and don’t have good search tools available from my phone. I seem to recall functions at some layer that send that motor record information to the drivers. Search for motorResolution in MotorSrc and NewportSrc.
Mark
Sent from my iPhone
> On Feb 7, 2020, at 10:33 AM, Koennecke Mark (PSI) via Tech-talk <tech-talk at aps.anl.gov> wrote:
>
> Hi,
>
> I am writing a motor driver for an old piece of french equipment called EuroMove.
> This is going well. But the thing does not implement homing in the controller. I try
> to implement this in the asynAxis driver. To that purpose, I need the motor resolution.
> It is in principle there, in the MRES field of the motor record. I tried:
>
> pC_->getDoubleParm(axisNo_, pC_->motorResolution_, &resolution);
>
> but this gave me a 0 instead of the .01 to which the MRES field had been configured in the
> motor substitutions file. I know the record sees this because the conversion for physical
> units to motor steps is working.
>
> I also tried motorEncoderRatio_ which returned infinity.
>
> My question now is how I can get at that information in an asynMotorAxis driver?
>
> Or is my only option to write a configuration command or axis creation command which
> passes the resolution value in?
>
> This is against base3.14.12 and motor6.9 on RHEL7 linux.
>
> Best Regards,
>
> Mark Koennecke
>
>
>
>
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
|