[EXTERNAL] This email originated from outside of FRIB
Hej again,
I need to admit that the first version had a bug/typo; LONG was used
instead of SHORT.
That is fixed now.
The first testing went well - limit switches, homed, power on bits can
be fiddled into a soft motor.
And because of that, I made it a PR:
https://github.com/epics-modules/motor/pull/211
Feedback is welcome.
/Torsten
On 2023-12-06 18:42, Torsten Bögershausen via Tech-talk wrote:
> Hej all,
> I have done a first trial here:
>
> <
https://github.com/EuropeanSpallationSource/motor/pull/new/torsten/231206-add-MINP-for-softmotor>
>
> I am working to set up a test environment, but that is not finished yet.
> IOW: The patch is fully untested yet.
>
> Any feedback is welcome.
> BR
> /Torsten
>
> On 2023-12-06 16:27, Nariyoshi, Pedro wrote:
>> Hej Torsten,
>>
>>
>> I'd gladly test it. Earlier I was thinking about creating a virtual
>> motor support class and be able to control the MSTA with bo and other
>> records, but if the MINP solution is implement, I feel it'd be much
>> simpler. Thank you!
>>
>>
>> *Pedro Nariyoshi*
>>
>> Software Controls Engineer
>>
>> Facility for Rare Isotope Beams
>>
>> Michigan State University
>>
>> 640 South Shaw Lane
>>
>> East Lansing, MI 48824, USA
>>
>> Tel. 517-908-7352
>>
>> Email: nariyosh at frib.msu.edu <
mailto:nariyosh at frib.msu.edu>
>>
>>
>>
>> 1633986722804
>>
>>
>> ------------------------------------------------------------------------
>> *From:* Torsten Bögershausen <torsten.bogershausen at ess.eu>
>> *Sent:* Wednesday, December 6, 2023 1:46:55 AM
>> *To:* Pearson, Matthew; Nariyoshi, Pedro; Mark Rivers;
>> tech-talk at aps.anl.gov
>> *Subject:* Re: Simulated limit switches on motorSim motor
>> [EXTERNAL] This email originated from outside of FRIB
>>
>> Hej Matt, Hej Pedro,
>>
>> Once I had the similar problem:
>> The "homed" status could not be set for a soft motor.
>> Reading the question from below asking for the limit switches,
>> I am tempted to suggest one additional link for all 3 bits.
>>
>> A pragmatic way could be to allow MSTA field to be set for a soft motor,
>> addding one possible link.
>>
>> In my approach this would be a "MINP" field, where the MSTA field can be
>> "delivered" from an external record.
>> There are some comments:
>> As we already have DINP (for done move), the done bit needs to be
>> filtered out from MSTA/MINP.
>> (We may allow a pure MINP including DMOV, but that is probably a later
>> extension)
>>
>> For the limit switches we need to have the raw switches, RHLS, RLLS,
>> to be calculated to the proper bit position by a calc record.
>>
>> There is no real show-stopper, as far as I can see.
>> The MSTA field is well-defined and unchanged since a long time.
>> And any user-application can choose which bits that are needed.
>>
>> Does this makes sense ?
>> I am happy to make a prototype, is someone able to test it ?
>>
>> /Torsten
>>
>>
>> On 2023-12-01 23:59, Pearson, Matthew wrote:
>> [snip]
>>> The motor record already contains so many fields, but I wonder if it
>>> would be helpful to have an INLINK to set these limits (whether the
>>> RHLS/RLLS or LLS/HLS, I am not sure).
>>>
>>> That’s something I’ve wanted to do in the past as well. For example,
>>> if we have a PLC controlled motor, it would typically be integrated
>>> using separate records for the setpoint, readback, low limit switch,
>>> high limit switch, etc. And it would be nice to just layer a soft
>>> motor record on top and have the limit switch indicators work. The
>>> way around this is to develop a Asyn motor driver that can talk to
>>> the PLC directly (like any other motor controller driver). But having
>>> both options available would be nice. I don’t think there’s a
>>> technical reason why we couldn’t implement this, it’s just an edge
>>> case that no one has gotten round to yet.
>>>
>>> An alternative approach (which I’ve implement widely at our site) is
>>> to have a separate motor ‘status’ record and display it on the user
>>> level screen next to the high level gap/center motors. That could
>>> combine the various status fields from the soft motors and the
>>> underlying real motors.
>>>
>>> Cheers,
>>>
>>> Matt