Commit Graph

2244 Commits

Author SHA1 Message Date
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
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
kpetersn 45b87d7448 Added build rule to allow *.req files to be installed when building against base 3.14 2019-04-25 17:20:54 -05:00
kpetersn 6a12e28e96 Removed MXmotorSrc; Added motorMXmotor submodule 2019-04-15 14:44:56 -05:00
kpetersn c711e15100 Removed MotorSimSrc; Added motorMotorSim submodule 2019-04-15 14:29:45 -05:00
kpetersn 187080ce94 Removed PC6KSrc; Added motorPC submodule 2019-04-12 15:58:25 -05:00
kpetersn 4ec8c9247c Removed SmarActMCSSrc; Added motorSmarAct submodule 2019-04-12 15:42:57 -05:00
kpetersn f7e18b0b8e Removed PIGCS2Src; Added motorPIGCS2 submodule 2019-04-12 10:31:38 -05:00
kpetersn 6c4619d784 Removed AMCISrc; Added motorAMCI submodule 2019-04-12 10:12:27 -05:00
kpetersn bf083f5d43 Removed ACRSrc; Added motorACR submodule 2019-04-11 13:44:28 -05:00
kpetersn b8eec1e23f Removed ScriptMotorSrc; Added motorScriptMotor submodule 2019-04-11 13:26:16 -05:00
kpetersn 8f9d18e008 Removed AerotechSrc; Added motorAerotech submodule 2019-04-11 12:59:05 -05:00
kpetersn aae6cacd3e Removed PhytronSrc; Added motorPhytron submodule 2019-04-10 15:35:57 -05:00
kpetersn 09fd304443 Removed OmsAsynSrc; Added motorOmsAsyn submodule 2019-04-10 15:11:11 -05:00
kpetersn 4fd59be3c4 Also remove IMS_extra.db from motorApp/Db/Makefile 2019-04-10 14:46:23 -05:00
kpetersn b1886641e0 Removed ImsSrc; Added motorIms submodule 2019-04-10 14:40:31 -05:00
kpetersn 2784be1ffb Removed NewFocusSrc; Added motorNewFocus submodule 2019-04-09 16:38:24 -05:00
kpetersn ecbb008597 Removed MicosSrc; Added motorMicos submodule 2019-04-09 15:14:04 -05:00
kpetersn 27fca6f1cd Removed AcsSrc; Added motorAcs submodule 2019-04-09 11:53:37 -05:00
kpetersn c184a2375a Removed ThorLabsSrc; Added motorThorLabs submodule 2019-04-08 16:32:50 -05:00
kpetersn 8c11e38d5b Removed SmartMotorSrc; Added motorSmartMotor submodule 2019-04-08 16:08:15 -05:00
kpetersn 041f13119f Removed PiSrc; Added motorPi submodule 2019-04-08 15:17:59 -05:00
kpetersn f1c366b80a Removed PiJenaSrc; Added motorPiJena submodule 2019-04-08 14:14:10 -05:00
kpetersn 50f621df43 Removed MicronixSrc; Added motorMicronix submodule 2019-04-08 13:32:37 -05:00
kpetersn 1e2695a461 Removed OrielSrc; Added motorOriel submodule 2019-04-05 16:48:22 -05:00
kpetersn cca5f63a8d Removed NPointSrc; Added motorNPoint submodule 2019-04-05 16:22:19 -05:00
kpetersn ab0a01efb7 Removed MicroMoSrc; Added motorMicroMo submodule 2019-04-05 15:42:41 -05:00
kpetersn 2481133ed3 Removed MclennanSrc; Added motorMclennan submodule 2019-04-05 14:50:36 -05:00
kpetersn 48725897f7 Removed KohzuSrc; Added motorKohzu submodule 2019-04-05 13:51:03 -05:00