I'm playing around with the motor record (motorMotorSim) and how one could abort the motion in progress.
With initial position at 0 I do the following in three terminals ; executing commands one after another:
TERM1:
$ camonitor IOC:m1.RBV
IOC:m1.RBV 2024-04-19 14:17:15.641496 0
IOC:m1.RBV 2024-04-19 14:17:22.458046 0.02
IOC:m1.RBV 2024-04-19 14:17:22.558330 0.09
...
IOC:m1.RBV 2024-04-19 14:17:37.500906 14.99
IOC:m1.RBV 2024-04-19 14:17:37.601177 15
TERM2:
$ caput -l -c -w 20 IOC:m1.VAL 15
Old : IOC:m1.VAL 2024-04-19 14:17:15.641496 0
New : IOC:m1.VAL 2024-04-19 14:17:37.601294 15
TERM3:
$ caput -l -c -w 20 IOC:m1.STOP 1
Old : IOC:m1.STOP 2024-04-19 14:17:23.059605 0
New : IOC:m1.STOP 2024-04-19 14:17:37.601294 0
The TERM3 caput to .STOP is waiting TERM2 caput to .VAL to finish.
If the caput command in TERM3 is not using the ca_put_callback then the motor motion is aborted immediately as seen below:
TERM1:
$ camonitor IOC:m1.RBV
IOC:m1.RBV 2024-04-19 14:24:48.447635 0
IOC:m1.RBV 2024-04-19 14:24:54.863364 0.02
IOC:m1.RBV 2024-04-19 14:24:54.963617 0.09
...
IOC:m1.RBV 2024-04-19 14:24:57.269834 2.3
IOC:m1.RBV 2024-04-19 14:24:57.370032 2.31
TERM2:
$ caput -l -c -w 20 IOC:m1.VAL 15
Old : IOC:m1.VAL 2024-04-19 14:24:48.447635 0
New : IOC:m1.VAL 2024-04-19 14:24:57.370032 2.31
TERM3:
$ caput -l -w 20 IOC:m1.STOP 1
Old : IOC:m1.STOP 2024-04-19 14:24:57.069324 0
New : IOC:m1.STOP 2024-04-19 14:24:57.085839 0
can someone explain what is going on in the first case with caput command both using ca_put_callback ?
Thanks,
//hinko