APS-2BM-MIC / ipython-user2bmb

ipython configurations for the tomography instrument
2 stars 5 forks source link

get timeouts on 2bmb:PSOFly:fly #38

Closed prjemian closed 6 years ago

prjemian commented 6 years ago

during a tomo_scan(), receive this message sometimes:

computed rotation speed: 1 degrees / s                                                                                                                                            
computed blur angle/image: 0.1 degrees
computed blur pixel/image: 0.0014621632437865628 pixels
10 Darks, Shutter OFF
10 Flats, Shutter ON                                                                                                                                                              
0.00s - flying   x = 0.0000  y = 1.6000  r = -0.6000  theta = 359.4000  image # 0                                                                                                 
5.01s - flying   x = 0.0000  y = 1.6000  r = 3.7895  theta = 3.7895  image # 32
10.02s - flying   x = 0.0000  y = 1.6000  r = 8.7855  theta = 8.7855  image # 74
15.03s - flying   x = 0.0000  y = 1.6000  r = 13.7915  theta = 13.7915  image # 116
/home/beams/USER2BMB/Apps/BlueSky/lib/python3.6/site-packages/epics/ca.py:1306: UserWarning: ca.get('2bmb:PSOFly:fly') timed out after 1.00 seconds.
  warnings.warn(msg % (name(chid), timeout))
18.42s - flying   x = 0.0000  y = 1.6000  r = 16.2405  theta = 16.2405  image # 144
prjemian commented 6 years ago

Since Signal.value is exactly Signal.get(), replace pso.fly.value with pso.fly.get(timeout=2) to extend the timeout period. This is called in def progress_reporting().

prjemian commented 6 years ago

Got another exception trace:

130.41s - flying   x = 0.0000  y = 1.6000  r = 129.2330  theta = 129.2330  image # 1077
135.41s - flying   x = 0.0000  y = 1.6000  r = 134.2365  theta = 134.2365  image # 1119
140.42s - flying   x = 0.0000  y = 1.6000  r = 139.2320  theta = 139.2320  image # 1161
145.43s - flying   x = 0.0000  y = 1.6000  r = 144.2325  theta = 144.2325  image # 1202
150.43s - flying   x = 0.0000  y = 1.6000  r = 149.2675  theta = 149.2675  image # 1244
/home/beams/USER2BMB/Apps/BlueSky/lib/python3.6/site-packages/epics/ca.py:1306: UserWarning: ca.get('2bmb:PSOFly:fly') timed out after 1.00 seconds.
  warnings.warn(msg % (name(chid), timeout))
153.14s - flying   x = 0.0000  y = 1.6000  r = 150.9075  theta = 150.9075  image # 1267
prjemian commented 6 years ago

could wrap that call with a try..except clause so it does not quit

prjemian commented 6 years ago

seems to work by adding longer timeout -- try..except not used ... yet