Commit Graph

2773 Commits

Author SHA1 Message Date
Pete R Jemian eb3bf8fdde fixes #125 2019-01-26 17:20:58 -06:00
kpetersn 88079ac80c Corrected R6-11's release date. R6-11 2018-12-12 10:54:19 -06:00
kpetersn e704f89f23 Added R6-11 documentation 2018-12-12 10:52:25 -06:00
kpetersn 2a7544a7a0 Corrected SPDB documentation in motorRecord.html. Added SPDB to basic_motor_settings.req 2018-12-12 10:40:44 -06:00
kpetersn df11f3e153 Corrected the default DLLM value in motorSim.iocsh 2018-12-11 15:30:48 -06:00
Kevin Peterson 6f2f42305a Merge pull request #114 from EuropeanSpallationSource/add_SPDB_v1
Add field SPDB, "Set Point Dead Band"
2018-12-11 13:19:05 -06:00
Torsten Bögershausen 0ea2d9ec87 Add field SPDB, "Set Point Dead Band"
This is from Matthew Pearson, pearsonmr@ornl.gov

A number of users and staff have requested that the motor record have a
setpoint deadband field (eg. SPDB), which prevents any motion from
happening if the readback position is within SPDB.
Without a SPDB we have issues with motors moving unnecessarily.

For example, if the RBV is 0.001 and we set VAL to 0.0, if we have a
non-zero backlash correction then the motor will move unnecessarily
to take out backlash.
Even without backlash correction we often enable and disable the
drive amplifier for no good reason.

Currently the effective setpoint deadband is equal to MRES,
but this is often too small to be an effective setpoint deadband.

The new SPDB field would default to 0.0

The new code hooks into do_work():
When the new setpoint is within DPDB, set too_small and don't move.

The new code does not use snipptes like "abs(npos - rpos)", these
already produce warnings on 64 bit sytems.
abs() is declared to work on int, but we feed long values.
Simply compare the coordinates in engineering units.
2018-11-20 08:51:49 +01:00
Kevin Peterson ff8c74a6e8 Merge pull request #112 from EuropeanSpallationSource/base-3_16_typedef_rset
Base 3.16 typedef rset
2018-10-19 15:22:14 -05:00
Kevin Peterson 0481251e55 Merge pull request #119 from EuropeanSpallationSource/asyn_R32_deprecated_contructor
Deprecated constructor "asynPortDriver" since asyn R4.32.0
2018-10-16 16:22:40 -05:00
Kevin Peterson c38725e424 Merge pull request #116 from kmpeters/issue111
1.  Changed init function arguments in model-1 drivers to int
2.  Simplified the init function logic related to "after"
3.  Cast the pointer to the init function as DEVSUPFUN in the motor_dset structure
2018-10-16 13:40:46 -05:00
Torsten Bögershausen 8deb21c463 Deprecated constructor "asynPortDriver" since asyn R4.32.0
The asyn module make the constructor
asynPortDriver::asynPortDriver(const char *portNameIn, int maxAddrIn,
           int paramTableSize, int interfaceMask, int interruptMask,
           int asynFlags, int autoConnect, int priority, int stackSize)

obsolete in R4.32.0, the more modern version should be used, which does
not have the parameter paramTableSize.
Using a modern version of asyn for the motor gives a compiler warning.
As I don't like compiler warnings, add a #ifdef construct to suppress it
for asyn > R4.32, and still allow to compile agains asyn >= R4.32
2018-10-11 11:07:08 +02:00
kpetersn b6669de490 Cast pointer to *_init_record function as DEVSUPFUN in motor_dset structure for DeltaTau and Oms model-1 drivers. 2018-10-10 15:09:42 -05:00
kpetersn 66203a98cb Reverted most of the previous commit. Only use a release for base 3.15. 2018-10-10 14:20:48 -05:00
kpetersn 8c412e7db4 Use released versions of base instead of the development versions for Travis builds. Use EPICS base 7.0 instead of 3.16 2018-10-10 14:08:15 -05:00
kpetersn d6b1b64c35 Cast pointers to init functions as DEVSUPFUN to eliminate compile errors
like this:

../devOmsPC68.cc:74:1: error: invalid conversion from ‘long int
(*)(int)’ to ‘DEVSUPFUN {aka long int (*)(void*)}’ [-fpermissive]
 };

and this:

./devPmac.cc:66: error: invalid conversion from 'long int (*)(int)' to
'long int (*)(void*)'
2018-10-10 11:08:54 -05:00
kpetersn e56f0585ba Changed XXX_init argument from void * to int. Some drivers fail to build. 2018-10-10 10:26:19 -05:00
Torsten Bögershausen dcf7b37c89 Avoid warnings with R3.16.1 in devSoft.cc and devMotorSim.c
Need to set USE_TYPED_RSET to avoid a warning whencompiling
against Base R3.16.1
Older Bases don't know the #define, and R3.16.1 seems to need it.
2018-10-02 16:11:37 +02:00
Torsten Bögershausen 5198a2d552 Clean up the EPICS_VERSION/rec sup, use motor_epics_inc.h
Refactor the changes for the deprecated RECSUP in later EPICS base
version, which need a typedef for struct rset.
Unite all common code and put it into a single include file.
Add motor_epics_inc.h.
2018-09-19 07:48:00 +02:00
Torsten Bögershausen 71e417b4db define VERSION_INT when using older EPICS bases
Newer EPICS base versions define VERSION_INT, but older don't.
Add a conditional #define to compile against those older bases, like 3.14
2018-09-18 18:04:05 +02:00
Torsten Bögershausen eb3566976d More adaptions to base-3.16/7.0 with typed rset
Remove more compiler warnings when compiling against the base 7.0 branch.
Note:
Some of the model1/2 drivers still give a warning. As I can not test the
code, leave those files untouched.
2018-09-18 16:30:25 +02:00
Ben Franksen 8eacc2f05a Adapt motorRecord.cc to base-3.16 with typed rset 2018-09-18 16:27:59 +02:00
Mark Rivers 9aba61b06c Changed definition of soft_init; it is passed an int, not a void * 2018-09-08 14:33:46 -05:00
Mark Rivers c6e655d8b3 Merge branch 'master' of github.com:epics-modules/motor 2018-09-08 14:04:29 -05:00
Mark Rivers 58354556aa Fixed soft_init: it is passed an int, not a (void *). 2018-09-08 14:04:15 -05:00
Mark Rivers ee9fca1dc3 Fixes for problems that showed up in base 7.0.
- It was using the value of mr->[link]->value.constantStr and mr->[link]->value.pv_link.pvname without checking the link types.
  This was incorrect, and led to errors because constantStr no longer has a defined value if the link type is not CONSTANT.
  Changed so that it only accesses these union fields if the link is the correct type.
- It did not check if pv_link.pvname was NULL before calling CA functions, though now that we check the link type perhaps this cannot occur.
- It did not lock the motor record before accessing the fields.
- Added Debug calls to show the link types and values.
2018-09-08 12:44:59 -05:00
Mark Rivers d5ada7b86f Added support for profile moves on Q8 controller which uses a different path for trajectory files than C8 2018-09-07 08:17:12 -05:00
Mark Rivers 9b046da878 Added support for profile moves on Q8 controller which uses a different path for trajectory files than C8 2018-09-07 08:17:03 -05:00
Mark Rivers 0b8da74ca3 Added stdarg.h, otherwise compiler error with va_start and va_end undefined if DEBUG is defined 2018-09-07 08:15:01 -05:00
Mark Rivers ae637292db Added stdarg.h, otherwise compiler error with va_start and va_end undefined if DEBUG is defined 2018-09-07 08:11:59 -05:00
Mark Rivers 8b5d5f92bd Added note at the end that the file is incomplete 2018-08-25 17:14:47 -05:00
Kevin Peterson f6e9f26209 Merge pull request #109 from kmpeters/issue100
Don't set "stop" field true if driver returns RA_PROBLEM true

Partially reverts commit 303a9208e3

Fixes issue #100:
> There have been multiple problems caused by the motor record sending a stop when the problem bit is set.
>
>    One problem is discussed here:
>    https://epics.anl.gov/tech-talk/2018/msg01338.php
>
>    The commit that introduced the stop is 303a920. I vaguely recall the change being a workaround for less-than-idea behavior of a motor controller, but neither @rsluiter nor I remember which controller that was.
>
>    Motor drivers should be modified to send the stop command when the condition that triggers the setting of the problem bit is detected, if needed.
2018-08-21 12:34:24 -05:00
kpetersn 26771f23dc Added a comment about reverting the change from .69 2018-08-21 12:05:30 -05:00
kpetersn 95c0a4caa2 Don't set "stop" field true if driver returns RA_PROBLEM true. It is
the driver's responsiblity to stop a motor if the condition that results
in the RA_PROBLEM bit being set doesn't result in the motor
automatically stopping.

This partially reverts commit 303a9208e3
2018-08-21 11:56:25 -05:00
Kevin Peterson 741d4292cd Merge pull request #108 from kmpeters/issue27
Set LVIO=1 if DLLM > DHLM
2018-08-21 09:59:42 -05:00
kpetersn 270347dfb3 Set LVIO=1 if DLLM > DHLM, since at least one limit being violated 2018-08-20 17:41:34 -05:00
Kevin Peterson a21b1ccbd6 Merge pull request #99 from EuropeanSpallationSource/JOG_LVIO_JOG_nolockup
motorRecord.cc: Jogging against to LVIO in LVIO

This change resets the JOGF/JOGR fields to zero when a limit violation occurs, rather than when the JOGF/JOGR fields get reset to zero by the user.
2018-08-20 14:50:07 -05:00
Kevin Peterson c09b49c245 Merge pull request #107 from lnls-sol/fixAero
Add devAerotechSeq.dbd to WithAsyn example
2018-08-20 12:10:00 -05:00
Torsten Bögershausen 9e5b54323a motorRecord.cc: Jogging against to LVIO in LVIO
When jogging has stopped because the motor is close to a softlimit,
the record seems to be locked up when the same jog button is pressed again.

The user must release the jog button, before doing any other action.
STOP doesn't help, neither does jog into the opposite direction work.

Solution:
Clear the JOGF and JOGR button in the record.
2018-08-20 09:08:22 +02:00
Gabriel Fedel 36a9351dba Add devAerotechSeq.dbd to WithAsyn example
This change allow to use Trajector Scan state machine from Aerotech.
2018-08-17 14:38:00 -03:00
Kevin Peterson 000082b55a Merge pull request #105 from kmpeters/XPS_mutex_id_init
Fix for segfault when XPSConfigAxis isn't called before using a motor (Fixes #104)
2018-08-10 12:22:59 -05:00
kpetersn 1477975057 Patch from Takashi Nakamoto of the National Astronomical Observatory of
Japan:

"While I was developing an EPICS application on the top of the motor
module, my application died for segmentation fault. The reason was my
mistake: I forgot to call XPSConfigAxis before I start to use that axis,
but it took time for me to find it out (e.g. compiled the motor module
and my application with debug option, running gdb, ...). So, I thought
it would be nice if an error message is shown in the console instead of
sudden death only with segmentation fault message, and the attached
patch does it."
2018-08-10 10:47:02 -05:00
kpetersn c0c5b5b351 Multiple improvements to the Aerotech A3200 driver from Ron Sluiter:
* .04 03-15-18 rls - Restored "Task number" argument to
A3200AsynConfig.
* .05 05-01-18 rls - Do not check the limit switches of virtual axes.
*                  - Added "single-axis" (MOVE{ABS/INC} or "multi-axis"
(LINEAR) user selectable move option.
2018-08-08 16:27:33 -05:00
kpetersn 6fb6f171de Bug fix for ImsMDrivePlusMotorController.cpp from Ron Sluiter on
2018-07-16
2018-08-08 16:22:06 -05:00
kpetersn 4fb9e1c934 Changes to motor_notes.txt from Ron Sluiter on 2018-01-10 2018-08-08 16:18:48 -05:00
Kevin Peterson 548a013a38 Merge pull request #103 from kmpeters/ensemble-stuck-on-limit-fix
Ron's fix for ensemble-stuck-on-limit problem
2018-08-06 16:32:07 -05:00
kpetersn 8e8e559606 Changes from Ron Sluiter on 2018-06-28:
"If disabling torque due to a fault, clear motorAxisProblem so that user
can Jog off limit switch."
2018-08-06 16:09:51 -05:00
kpetersn 70b489f2de Corrected my email address. 2018-08-03 09:51:53 -05:00
kpetersn 58976fa288 Corrected path to new docs directory in README.md 2018-08-01 13:52:03 -05:00
Kevin Peterson 09fcb5986c Merge pull request #101 from kmpeters/github-pages-docs
Make motor documentation compatible with github pages
2018-08-01 13:41:26 -05:00
kpetersn d739f5c1dd Use github pages links instead of htmlpreview links 2018-08-01 13:37:13 -05:00