Il y a un problème avec le DS SIM/SY/DEG.sim qui stock des valeurs entières au lieu de valeures décimales.
Le problème peut être caractérisé avec le code ci-dessous:
import PyTango
#We create the proxy
tango_synchro = PyTango.DeviceProxy("SIM/SY/DEG.sim")
#we read and printthe delay array
delay_array=tango_synchro.read_attribute("delay")
print(delay_array)
delay_array_val=delay_array.value
#we check one value and modify it to a non interger value and wrote it
print(delay_array_val[2*25+9])
delay_array_val[2*25+9]=42.5
tango_synchro.write_attribute("delay",delay_array_val)
#and read it again
delay_array_val=tango_synchro.read_attribute("delay").value
print(delay_array_val[2*25+9])
#try again
delay_array_val[2*25+9]=44.5
tango_synchro.write_attribute("delay",delay_array_val)
delay_array_val=tango_synchro.read_attribute("delay").value
print(delay_array_val[2*25+9]) |