bliss issueshttps://gitlab.esrf.fr/bliss/bliss/-/issues2024-03-05T11:06:59+01:00https://gitlab.esrf.fr/bliss/bliss/-/issues/4194tostring() deprecated2024-03-05T11:06:59+01:00Cyril Guilloudtostring() deprecatedseen in logs:
```python
2024-02-03 20:22:28,567 py.warnings
WARNING /home/blissadm/local/bliss.git/bliss/controllers/motors/icepap/comm.py:110:
DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
full_cmd = b"%s\n%s...seen in logs:
```python
2024-02-03 20:22:28,567 py.warnings
WARNING /home/blissadm/local/bliss.git/bliss/controllers/motors/icepap/comm.py:110:
DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
full_cmd = b"%s\n%s%s" % (cmd, header, data.tostring())
```
```
[(bliss) guilloud@pcsht]$ git grep tostring
comm/gpib/_gpib.py: return msg.tostring()
common/image_tools.py: data = arry.tostring()
common/image_tools.py: if hasattr(pil, "tostring"):
common/image_tools.py: data = pil.tostring() # PIL
controllers/ct2/card.py: return self.pwrite(array.tostring(), offset)
controllers/motors/icepap/comm.py: full_size = header_size + len(data.tostring())
controllers/motors/icepap/comm.py: bin_header + data.tostring() + b"\0" * (aligned_full_size - full_size),
controllers/motors/icepap/comm.py: full_cmd = b"%s\n%s%s" % (cmd, header, data.tostring())
controllers/pepu.py:def ChannelConfig_tostring(cfg):
controllers/pepu.py:ChannelConfig.tostring = ChannelConfig_tostring
controllers/pepu.py:def BissConfig_tostring(cfg):
controllers/pepu.py:BissConfig.tostring = BissConfig_tostring
controllers/pepu.py:def Trigger_tostring(trigger):
controllers/pepu.py:Trigger.tostring = Trigger_tostring
controllers/pepu.py:def StreamInfo_tostring(s):
controllers/pepu.py: result += "TRIG", s.trigger.tostring()
controllers/pepu.py:StreamInfo.tostring = StreamInfo_tostring
controllers/pepu.py: _config = ChannelAttr("CHCFG", ChannelConfig.fromstring, ChannelConfig.tostring)
controllers/pepu.py: biss_config = ChannelAttr("BISSCFG", BissConfig.fromstring, BissConfig.tostring)
controllers/pepu.py: "BISSCFG", BissConfig.fromstring, lambda x: x.tostring().rsplit(" ", 1)[0]
controllers/pepu.py: "TRIG", decode=lambda x: x.trigger, encode=lambda x: x.tostring()
controllers/pepu.py: type(self).__name__, self.pepu.name, self.info.tostring()
controllers/pepu.py: self.raw_write_read("DSTREAM " + stream_info.tostring())
flint/flint.py: MESSAGE = "DeprecationWarning: tostring() is deprecated. Use tobytes() instead."
physics/diffraction.py:HKL.tostring = hkl_to_string
physics/diffraction.py: return "{}({})".format(self.crystal, self.plane.tostring())
physics/diffraction.py: self._planes[plane.tostring()] = plane
```Cyril GuilloudCyril Guilloudhttps://gitlab.esrf.fr/bliss/bliss/-/issues/3955icepapmotor._hw_position is using a cached value2023-09-29T16:55:16+02:00Yves Watieryves.watier@esrf.fricepapmotor._hw_position is using a cached valueHello,
On an icepap motor.
When one use mymotor._hw_position one would expect a read on the controller. Instead a cached value is returned.
To get the expected feature, I have to use mymotor.controller.read_position(translation, cach...Hello,
On an icepap motor.
When one use mymotor._hw_position one would expect a read on the controller. Instead a cached value is returned.
To get the expected feature, I have to use mymotor.controller.read_position(translation, cache=False)
`mymotor.controller.read_position(translation, cache=False)/ mymotor.steps_per_unit*translation.sign + mymotor.offset`
My guess is that the cache=False is omitted somewhere.
To debug this just have a motor moving and poll "_hw_position" as fast as possible. You will see multiples lines with the same position. With the cache=False, you have a different position at each line.
Cheers,
Yveshttps://gitlab.esrf.fr/bliss/bliss/-/issues/2560icepap: add command to get config values2021-05-01T21:58:44+02:00Matias Guijarroicepap: add command to get config valuesMatias GuijarroMatias Guijarrohttps://gitlab.esrf.fr/bliss/bliss/-/issues/2193Icepap shutter initialisation2022-07-27T11:56:15+02:00Antonia BetevaIcepap shutter initialisationThree problems with the Icepap shutter:
- [ ] The shutter is set CLOSED when starting bliss session (```bliss/controllers/motors/icepap/shutter.py, line 82```) - should be rather leave the shutter as it is.
- [ ] The INPOS is set to 0 wh...Three problems with the Icepap shutter:
- [ ] The shutter is set CLOSED when starting bliss session (```bliss/controllers/motors/icepap/shutter.py, line 82```) - should be rather leave the shutter as it is.
- [ ] The INPOS is set to 0 when setting the tracking (```bliss/controllers/motors/icepap/__init__.py, line 722```) - this is not valid if open/close hardware signals are inverted.
- [ ] The shutter open/close position is only updated in the icepap if apply_config and _set_mode(EXTERNAL) is executed for the shutter. If this not done, the shutter uses previously set values, which are false. The solution could be that _load_position is called when apply_config executed, if the open/close values have changed.