diff --git a/examples/ControlSystem/tango/main.py b/examples/ControlSystem/tango/main.py index 864ebedad..2c315da92 100644 --- a/examples/ControlSystem/tango/main.py +++ b/examples/ControlSystem/tango/main.py @@ -1,4 +1,11 @@ from pyaml.accelerator import Accelerator sr = Accelerator.load("config.yaml") -print(sr.live.get_bpm("BPM_C01-01").positions.get()) + +# print the BPM position +bpm = sr.live.get_bpm("BPM_C01-01") # bpm is a BPM +print(bpm.positions.get()) + +# Direct access to control system +da = sr.live.get_device("srdiag/bpm/c01-01/SA_HPosition") # da is a DeviceAccess +print(f"h={da.get()} {da.unit()}")