-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What imposes the high limit switch value for this soft asynMotor? #59
Comments
My motivation is to set the MRES for soft motors to some ridiculous precision (say 1e-5 or so) and the raw motor count seems to be limited. |
The ridiculous precision corresponds to motors that simulate a Bragg angle rotation. These rotations require precision of 10 microdegrees to step the motor through the effective energy resolution. |
The RMP field of the motor record is limited to 32-bits: Changing it will break compatibility with EPICS base 3.15, iirc. |
Ok. I'll try to stay within that limit. Will report if additional problem identified. |
Specifically, -2147483648 <= RMP <= 2147483647, correct? |
So, with MRES=1e-5, then travel between user soft limits of +/- 20,000 should be possible with tripping the (simulated) limit switch, correct? |
Could RMP be changed to DBF_DOUBLE? That allows exact representation of integers up to about 52 bits. |
Yes. |
I don't know what the unintended consequences of changing it to DBF_DOUBLE would be. I am unlikely to have time to test that change until the APS upgrade is complete. |
With motor 7.2.2, synApps 6.2.1, asyn 4.42, XXX master, just downloaded and built within the hour, using these motors:
And the substitutions file (built from bash script) has these lines:
|
@prjemian, is there a problem on those caQtDM screens? If so, it isn't jumping out at me. |
That comes from this line, specifically HIGH_LIM=32000, which is setting the limit in counts:
|
|
No. It is an argument passed to motorSimCreate to allow hardware limits to be simulated by the motor driver: |
Oh. In raw motor pulses, not user units, correct? I'll reconfigure with 1000x the default numbers and retry. |
Correct. |
I'm trying with |
To stay within (2^31)-1, I'll dial that down to 20,000,000 |
That will fix this issue, thanks! |
What confused me is that the value for HIGH_LIM becomes the HLM value when the IOC is first booted (unless the DHLM macro is provided to asyn_motor.db). I was expecting the IOC to consider the MRES between these numbers. Similar for LOW_LIM and LLM. |
It should probably be considered a bug that the HIGH_LIM and LOW_LIM values are also used as the default values for DHLM & DLLM: |
Right. I suggest adding
|
I've created a branch for improving the motorMotorSim examples. That is a change I plan to make to motorSim.iocsh. |
Originally posted by @prjemian in #46 (comment)
The text was updated successfully, but these errors were encountered: