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: 110     Entry time: Wed Feb 19 14:01:04 2025     In reply to: 109     Reply to this: 111
 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: RE: Problème avec le DS SIM/SY/DEG.sim 
 Icon:  

$ ls /data/shared/tangoscripts/DeviceServer/Calibrations/DS/SY
create_ds.sh         ds_GeneRetard2_int.py     ds_GeneRetard.py    launch_ds_Freq.sh           loop_create_ds.py
DS_GeneRetard         ds_GeneRetard2.py     fill_GeneRetard.py  launch_ds_gene_retard_loc.sh
DS_GeneRetard2         ds_GeneRetard_float.py  Freq             launch_ds_gene_retard_new.sh
ds_GeneRetard2_float.py  ds_GeneRetard_int.py     Freq.py         launch_ds_gene_retard.sh

On voit qu'il existe deux versions de ds_GeneRetard, l'une entière et l'autre flottante.

head -50 DS_GeneRetard montre la version de DS_GeneRetard dans tangoscript est la bonne (dtype=float).

$ cat launch_ds_gene_retard.sh
#!/bin/bash

PYTHON=/usr/bin/python
DIR=/data/shared/DS_CALC/gene_retard

$PYTHON $DIR/ds_GeneRetard.py DS_GENERETARD &
$PYTHON $DIR/ds_GeneRetard2.py DS_GENERETARD2 &

On voit que le script execute la version dans DS_CALC et non la version dans tangoscript.

Sur client5:

$ ps -aux | grep ds_Gene
operate+ 48899  0.0  0.1 1465728 118380 ?      Sl   Jan09   8:47 /usr/bin/python /data/shared/DS_CALC/gene_retard/ds_GeneRetard.py DS_GENERETARD
operate+ 50690  0.0  0.2 1959808 146012 ?      Sl   Jan09  44:33 /usr/bin/python /data/shared/tangoscripts/DeviceServer/Calibrations/DS/SY/ds_GeneRetard2.py DS_GENERETAR2
nicolas+ 54085  0.0  0.0  12780   952 pts/1    S+   14:02   0:00 grep ds_Gene

On voit que la version de ds_GeneRetard.py qui s'execute est celle de /data/shared/DS_CALC/gene_retard/ et non celle de /data/shared/tangoscripts

Il faudrait l'arrêter et lancer la bonne version.

Sur client5 (à faire):

 kill -9 48899

ps -aux | grep ds_Gene

cd /data/shared/tangoscripts/DeviceServer/Calibrations/DS/SY

ipython /data/shared/tangoscripts/DeviceServer/Calibrations/DS/SY/ds_GeneRetard.py DS_GENERETARD &

 

 

 

Entered by Nicolas Delerue from 80.119.21.73 on Wed Feb 19 13:59:11 2025 wrote:

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