HOME Prise de donnees MML Controle commande Simulations Notes Hardware Ligne X Laser Interaction Diagnostiques Synchronisation
Synchronisation
  Elog synchro  Not logged in ThomX    logo
Entry   Entered by Nicolas Delerue from 80.119.21.73 on Wed Feb 19 13:59:11 2025; Problème avec le DS SIM/SY/DEG.sim 
    Reply   Entered by Nicolas Delerue from 80.119.21.73 on Wed Feb 19 13:59:11 2025; RE: Problème avec le DS SIM/SY/DEG.sim 
       Reply   Entered by Nicolas Delerue from 80.119.21.73 on Wed Feb 19 13:59:11 2025; RE: RE: Problème avec le DS SIM/SY/DEG.sim 
Message ID: 109     Entry time: Wed Feb 19 13:59:26 2025     Reply to this: 110
 Author: Entered by Nicolas Delerue from 80.119.21.73 on Wed Feb 19 13:59:11 2025 
 Status:  
 Type: Problem 
 Category: Timing 
 Important:
 Subject: Problème avec le DS SIM/SY/DEG.sim 
 Icon:  

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])

ELOG V3.1.4-395e101