Commit Graph

2275 Commits

Author SHA1 Message Date
Torsten Bögershausen a4a6dbddf4 motorRecord.cc: Post ueip if reset to false when encoder missing
commit 24a53e660e,
    "motorRecord: Reset UEIP to No if no encoder is present"
Seems to have introduced a typo:
When ueip is reset to false, because there is no encoder,
then db_post_events(ueip) should be called, not urip.
2024-10-22 12:05:44 +02:00
Kevin Peterson 148c943719 Set encoder ratio to 1 if ERES is 0 to avoid dividing by 0 2024-01-22 09:02:27 -06:00
Kevin Peterson d1ed86f128 Fixed a 9-year-old typo in trajectoryScan_settings.req 2023-08-04 10:15:18 -05:00
Kevin Peterson ed474417a1 Corrected typo in comment 2023-06-07 15:21:40 -05:00
Mark Rivers 5eb994dc5e Add readController() functions 2023-05-29 08:53:01 -05:00
Kevin Peterson 6f277cc9dc Updated the version number in motorRecord.cc and documentation 2023-05-23 10:07:11 -05:00
Kevin Peterson 04a5ee70e7 Merge pull request #203 from epics-modules/add_accs_field_with_accu_control
Add ACCS field with ACCU control
2023-05-22 11:49:20 -05:00
Kevin Peterson 7c0ef61f72 Merge pull request #122 from EuropeanSpallationSource/torsten/181203_1217_add_ACCS_field
Add ACCS field with ACCU indicator
2023-05-22 11:45:54 -05:00
Torsten Bögershausen fd808eb252 RHLM, RLLM: Fix when MRES is negativ
Fix the situation when MRES < 0 and either the softlimits
are changed (and RHLM and RLLM are garbled) or when
MRES itself is negative and changed, so that DHLM and DLLM
needed to be updated from the constant RHLM/RLLM.
Based on the update of DHLM/DLLM HLM/LLM will be updated as well.

The current implementation around RHLM/RLLM did not consider
MRES < 0 at all. And even if this configuration is not often
used, it is still supported.
Beside that we want to avoid RHLM=-40 RLLM=50 when it should be
the other way around
2023-05-22 16:37:07 +02:00
Kevin Peterson 7291b5569b Improved ACCS initialization. Update ACCS or ACCL (determined by ACCU) when VBAS (or SBAS) changes. 2023-05-19 15:50:09 -05:00
Kevin Peterson c18f7b1ee9 Removed prop(YES) from fields in motorRecord.dbd that didn't need it; added comments to the ones that do. 2023-05-19 08:35:09 -05:00
Mark Rivers c3d6c6ee43 Minor fixes to change text widgets from decimal to string; DTYP and EGU we not displaying correctly in Phoebus 2023-05-18 16:41:32 -05:00
Kevin Peterson 63bfe5d077 Changed ACCU from a readback to a control. ACCU can be optionally specified when motor databases are loaded and is autosaved by default. 2023-05-18 15:32:42 -05:00
Kevin Peterson 0907dbbab0 Also add prop(YES) for the PREC field 2023-05-18 10:39:20 -05:00
Kevin Peterson b77c331f78 Added prop(YES) for floating-point fields in motorRecord.dbd that should update when the PREC changes. 2023-05-18 10:20:28 -05:00
Kevin Peterson ba769e5285 Merge branch 'torsten/181203_1217_add_ACCS_field' of github.com:EuropeanSpallationSource/motor into add_accs_field 2023-05-17 09:33:05 -05:00
Torsten Bögershausen ddf1095b5f motorRecord.cc: Correct usage of accEGUfromVelo()
The function accEGUfromVelo() returns acceleration in EGU,
but we need it expressed in steps.
Thanks to Kevin Peterson for noticing.
Correct this and divide by fabs(pmr->mres).
And while there, correct a typo in a comment
2023-05-15 22:53:25 +02:00
Torsten Bögershausen 1c500830fd Merge branch 'motor/master' into HEAD
Merge the master branch,
commit 891a66e680,
into torsten/181203_1217_add_ACCS_field

Conflicts:
    motorApp/MotorSrc/motorRecord.dbd
2023-05-15 22:16:36 +02:00
Kevin Peterson f92ed6f4fc Added a missing }, probably caused by merging 2023-05-15 11:04:01 -05:00
Kevin Peterson 87f44d9e66 Merge branch 'torsten/181203_1217_add_ACCS_field' of github.com:EuropeanSpallationSource/motor into add_accs_field 2023-05-15 10:55:34 -05:00
Kevin Peterson 891a66e680 Merge pull request #167 from EuropeanSpallationSource/asynMotor-remove-initEvent
devMotorAsyn: remove initEvent in init_record()

Fixes #164 (problem 2)
2023-05-15 09:36:43 -05:00
Kevin Peterson cd09677d2a Merge pull request #193 from rerpha/rawlimits
Add raw limits so that soft limits are synced with motor resolution change.  Fixes #191
2023-05-12 14:58:52 -05:00
Kevin Peterson 99d0c41415 Fix for CA clients not seeing updates to RHLM and RLLM 2023-05-12 14:15:40 -05:00
Kevin Peterson f75ace4079 Added model2-specific motor databases to work around unknown command errors. 2023-04-06 11:30:15 -05:00
Jack Harper 141d8aa430 add to changelog 2022-11-21 13:10:40 +00:00
Jack Harper 2e89b55279 Add raw limits so that soft limits are synced with motor resolution change 2022-11-21 13:03:46 +00:00
keenanlang 96509caba2 req file for basic asyn motor. Fixes #183 2022-08-02 13:16:23 -05:00
Freddie Akeroyd 524696a8d0 Fix negative backlash with relative moves in a negative direction
A negative BDST was correctly applied to negative direction moves
if moves are absolute. When retries are enabled all moves become
relative and backlash was not applied correctly for negative direction
moves.
2021-11-26 18:23:29 +00:00
Torsten Bögershausen 24a53e660e motorRecord: Reset UEIP to No if no encoder is present
When a database is loaded with UEIP=Yes and the controller says that there is no
encoder present, reset UEIP to No
2021-11-17 08:42:23 +01:00
Torsten Bögershausen 784e41927b motordrvCom.h needs shareLib.h
We can't compile motor against this commit of EPICS base:
  commit 0f428ea3346d89719b03a6419319c85afb0fee13
  Author: Michael Davidsaver <mdavidsaver@gmail.com>
  Date:   Thu Apr 1 10:57:19 2021 -0700

      use DBCORE_API

Solution: Include <shareLib.h>
2021-04-19 14:19:50 +02:00
Torsten Bögershausen 90643807f3 devMotorAsyn: remove initEvent in init_record()
When the motorRecord is initialized, init_record() is called.
For asynMotors init_record() calls init_controller() in devMotorAsyn.c

From here, the encoder ratio is send to the driver.
After doing that, the code "locks" the execution waiting for a callback
to call epicsEventSignal(pPvt->initEvent) which "unlocks" the code.

As Mark Clift points out, this code can be simplified and the initEvent
can be removed.

Mark Rivers suggested to use the asynFloat64SyncIO interface,
which locks the asyn port when calling the driver.
2020-10-12 06:25:03 +02:00
Mark Rivers 394998bb1b Add shareLib.h 2020-09-04 11:01:47 -05:00
kpetersn 4e9aae4e3e Allow the RSTM field to be specified when motor records are loaded with dbLoadRecords or dbLoadTemplate 2020-06-11 17:57:16 -05:00
Kevin Peterson 90efeda22a Added RSTM to basic_motor_settings.req 2020-06-11 17:34:38 -05:00
Torsten Bögershausen 2906f3d8f9 Add field RSTM: Restore Mode
Partly revert the following commit:
  commit 3090983c31
  Author: Ron Sluiter <rsluiter@users.noreply.github.com>
  Date:   Wed Jul 29 15:50:23 2015 +0000
      Bug fix for target position (VAL/DVAL/RVAL) initialization error
      when the motor record is configured to do retries.
And from the release notes:

6) Kevin Peterson discovered an initialization bug when the motor record is
    configured to do retries. When configured to do retries, the motor
    record issues incremental rather than absolute moves. If the motor
    behaves badly (e.g., a piezo stiction motor) the controller's absolute
    step count can be far from its' absolute readback position. The motor
    record initialization logic that determines how the target positions
    are initialized at boot-up was not taking into consideration whether
    or not the motor record is configured to do retries, and therefore,
    whether or not absolute or incremental moves were issued by the motor
    record. With this release, if the motor record is configured to do
    retries, then the controller's absolute position is ignored (because
    the controller's absolute position was "corrupted" by retries) and the
    autosave/restore position is used to set the controllers position.

    Switching between retries on and off (relative vs. absolute moves)
    between reboots will cause unpredictable results and is not covered
    by this bug fix.

   Files modified: motor_init_record_com() in MotorSrc/motordevCom.cc
                   init_controller()       in MotorSrc/devMotorAsyn.c

Commit 3090983c improves the situation for setups where autosave is
used, and makes things worse when autosave is not used.
When autosave is not used and the motor is configured to do retries,
the the DVAL field is loaded into the controller regardless.
And because DVAL is 0.0 at startup, the controller position is lost.

The first issue report is found here:
"Problem with R6-10 issue 6 fix - controller position can be lost on reboot"
https://github.com/epics-modules/motor/issues/85

And the we have another issue report here:
"IOC zeroes encoder on startup"
https://github.com/motorapp/Galil-3-0/issues/13

A possible way forward is discussed here:
"Add a field to the motor record to allow always restoring the
 autosaved position"
https://github.com/epics-modules/motor/issues/151

This commit adds the "RSTM" field:
- 0 Disables restoring the autosaved position
- 1 Always restores the autosaved position
- 2 Uses the same logic as motorRecord 6.9 (or older)
- 3 Uses the same logic as motorRecord 6.10

This numbering maps 0 and 1 somewhat to false/true, uses 2/3 for
special handlings and leaves room for more choices.

E.g. "use the encoder value, if valid, fall back to autosave if not.
Or "use the URIP/RDBL" if possible.
I am getting off-topic,
those improvements should be done in later commits anyway.
2020-06-10 07:55:22 +02:00
Kevin Peterson d472dd10f5 Updated the motor record version to 7.2 2020-05-13 17:30:57 -05:00
Mark Rivers 84caef3ba4 Merge branch 'master' of github.com:epics-modules/motor 2020-05-11 09:41:55 -05:00
Mark Rivers 700a338fd5 New autoconvert 2020-05-11 09:41:01 -05:00
keenanlang 129e7f075a Install iocsh files 2020-05-06 13:21:37 -05:00
Kevin Peterson ffa6a19382 Converted adls to edl, opi, and ui 2020-03-16 16:26:59 -05:00
Pete Jemian bcd11fdba1 Lower the cosmetic rectangle 2020-03-15 15:39:17 -05:00
Mark Rivers bc531bc8fa Latest converter 2020-01-28 16:43:00 -06:00
Mark Rivers 4a878d29f4 New autoconverted file 2020-01-28 16:42:41 -06:00
Mark Rivers 5642bb1089 Initialize some parameters to avoid errors reading them 2020-01-28 16:32:56 -06:00
Mark Rivers 56f0952b4f New file for autoconvert 2020-01-28 16:18:48 -06:00
Mark Rivers 6768b2514f Add op 2020-01-28 16:18:18 -06:00
Torsten Bögershausen 8b43d40d18 send_mess() uses 'const char *' (and more const char*)
The 2nd and 3rd parameter in send_mess() can and should
be a 'const char *' instead of just 'char *'.
Modern compilers complain here, so that the signature now
gets the const.

Update drivers from the following list to use the new send_mess():
    modules/motorAcs
    modules/motorAcsTech80
    modules/motorAerotech
    modules/motorFaulhaber
    modules/motorIms
    modules/motorKohzu
    modules/motorMclennan
    modules/motorMicos
    modules/motorMicroMo
    modules/motorNewFocus
    modules/motorNewport
    modules/motorOms
    modules/motorOriel
    modules/motorPI
    modules/motorParker
    modules/motorPiJena
    modules/motorSmartMotor
    modules/motorThorLabs

And while there, fix one more "const char *" in motordrvCom.cc
2019-09-30 13:15:35 +02:00
kpetersn 1a9a123698 Changed REQ to DB so that *.req files get installed when motor is built outside of synApps 2019-08-27 15:01:58 -05:00
kpetersn d809076a32 Incremented the version number (for the first time since commit 0ef39053aa) 2019-08-15 09:52:15 -05:00
klang b7eae96a76 install req files 2019-05-08 15:42:36 -05:00