![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||||
|
Hi, I think I found the cause of the problem. ThetaM axis(motor) is Bragg angle of double crystal monochromator. I created a pseudo motor Energy for it. There is a conversion formula between ThetaM and Energy motors. For calibration, in the formula there is an offset which can be modified by the endstation scientists. Energy = formula(ThetaM + offset) ThetaM = reversed_formula(Energy) - offset And the offset has been set to 0.02. So the value in the motor controller is indeed "the value in motor record - 0.02". However, after ioc reboot, it's not always the case "-0.02", sometimes it's the original value. Well, now the problem is how to solve/remedy this issue. >My understanding is that the problem with the theta motor is that when you restart the IOC the motor position is different from where it was before the IOC shut down. As Mark said, that is the issue. Thank you. >I can think of 3 reasons for this: > The position that you motorAxis::poll() function is reading before iocInit is indeed different. > The position has been set with motorAxis::setPosition() > Something has told the motor to actually move with motorAxis::move() Very helpful suggestions indicating where I need to look at. >Once back to work, could you add a monitor to the .DMOV and the .RCNT fields ? I did more ioc reboot with monitoring DMOV and RCNT and in the middle set sleep time to 5.0. It seemed nothing different from previous. epicsThreadSleep(1.0) $ camonitor DCM:ThetaM.VAL DCM:ThetaM.RBV DCM:ThetaM.DMOV DCM:ThetaM.RCNT DCM:ThetaM.VAL 2025-01-03 10:00:33.506822 7.55376 DCM:ThetaM.RBV 2025-01-03 10:00:33.506822 7.55381 DCM:ThetaM.DMOV 2025-01-03 10:00:33.506822 1 DCM:ThetaM.RCNT 2025-01-03 10:00:33.506822 2 ioc reboot CA.Client.Exception............................................... Warning: "Virtual circuit disconnect" Context: "172.16.1.1:40803" Source File: ../cac.cpp line 1215 DCM:ThetaM.VAL 2025-01-06 10:03:29.738414 *** disconnected Current Time: Mon Jan 06 2025 10:03:29.738356427 .................................................................. DCM:ThetaM.RBV 2025-01-06 10:03:29.738436 *** disconnected DCM:ThetaM.DMOV 2025-01-06 10:03:29.738448 *** disconnected DCM:ThetaM.RCNT 2025-01-06 10:03:29.738457 *** disconnected DCM:ThetaM.VAL 2025-01-06 10:03:37.362640 7.55376 <-- ok DCM:ThetaM.RBV 2025-01-06 10:03:37.362640 7.55376 <-- original VAL, not RBV DCM:ThetaM.DMOV 2025-01-06 10:03:37.362640 1 DCM:ThetaM.RCNT 2025-01-06 10:03:37.362640 0 ioc reboot CA.Client.Exception............................................... Warning: "Virtual circuit disconnect" Context: "172.16.1.1:45612" Source File: ../cac.cpp line 1215 Current Time: Mon Jan 06 2025 10:07:58.862712293 DCM:ThetaM.VAL 2025-01-06 10:07:58.862746 *** disconnected .................................................................. DCM:ThetaM.RBV 2025-01-06 10:07:58.862773 *** disconnected DCM:ThetaM.DMOV 2025-01-06 10:07:58.862794 *** disconnected DCM:ThetaM.RCNT 2025-01-06 10:07:58.862809 *** disconnected DCM:ThetaM.VAL 2025-01-06 10:08:08.813621 7.53375 <-- -0.02 DCM:ThetaM.RBV 2025-01-06 10:08:08.813621 7.53371 DCM:ThetaM.DMOV 2025-01-06 10:08:08.813621 0 DCM:ThetaM.RCNT 2025-01-06 10:08:08.813621 2 DCM:ThetaM.RCNT 2025-01-06 10:08:08.963770 3 DCM:ThetaM.RBV 2025-01-06 10:08:09.113744 7.53376 DCM:ThetaM.DMOV 2025-01-06 10:08:09.113744 1 DCM:ThetaM.RBV 2025-01-06 10:08:09.284151 7.53381 ioc reboot CA.Client.Exception............................................... DCM:ThetaM.VAL 2025-01-06 10:10:42.046330 *** disconnected Warning: "Virtual circuit disconnect" Context: "172.16.1.1:58118" DCM:ThetaM.RBV 2025-01-06 10:10:42.046368 *** disconnected Source File: ../cac.cpp line 1215 Current Time: Mon Jan 06 2025 10:10:42.046296206 DCM:ThetaM.DMOV 2025-01-06 10:10:42.046384 *** disconnected .................................................................. DCM:ThetaM.RCNT 2025-01-06 10:10:42.046401 *** disconnected DCM:ThetaM.VAL 2025-01-06 10:10:51.365415 7.51376 <-- -0.02 DCM:ThetaM.RBV 2025-01-06 10:10:51.365415 7.51351 DCM:ThetaM.DMOV 2025-01-06 10:10:51.365415 0 DCM:ThetaM.RCNT 2025-01-06 10:10:51.365415 0 DCM:ThetaM.RBV 2025-01-06 10:10:51.685311 7.51356 DCM:ThetaM.RBV 2025-01-06 10:10:52.015723 7.51376 DCM:ThetaM.DMOV 2025-01-06 10:10:52.015723 1 epicsThreadSleep(5.0) ioc reboot CA.Client.Exception............................................... Warning: "Virtual circuit disconnect" Context: "172.16.1.1:56451" Source File: ../cac.cpp line 1215 Current Time: Mon Jan 06 2025 10:13:59.020537090 .................................................................. DCM:ThetaM.VAL 2025-01-06 10:13:59.020585 *** disconnected DCM:ThetaM.RBV 2025-01-06 10:13:59.020614 *** disconnected DCM:ThetaM.DMOV 2025-01-06 10:13:59.020631 *** disconnected DCM:ThetaM.RCNT 2025-01-06 10:13:59.020647 *** disconnected DCM:ThetaM.VAL 2025-01-06 10:14:13.087376 7.49377 <-- -0.02 DCM:ThetaM.RBV 2025-01-06 10:14:13.087376 7.49376 DCM:ThetaM.DMOV 2025-01-06 10:14:13.087376 1 DCM:ThetaM.RCNT 2025-01-06 10:14:13.087376 0 On Sun, Jan 5, 2025 at 6:45 AM Mark Rivers <rivers at cars.uchicago.edu> wrote:
| ||||||||||||||||
ANJ, 06 Jan 2025 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |