@@ -792,12 +792,30 class ABSConfiguration(Configuration): | |||||
792 |
|
792 | |||
793 | # Se manda a cero RC para poder realizar cambio de beam |
|
793 | # Se manda a cero RC para poder realizar cambio de beam | |
794 | confs = Configuration.objects.filter(experiment = self.experiment) |
|
794 | confs = Configuration.objects.filter(experiment = self.experiment) | |
795 |
conf |
|
795 | confdds = '' | |
796 | for conf in confs: |
|
796 | confjars = '' | |
797 | if conf.device.device_type.name == 'rc': |
|
797 | confrc = '' | |
798 | confrc = conf |
|
798 | ||
799 | confrc.stop_device() |
|
799 | #TO STOP DEVICES: DDS-JARS-RC | |
800 | break |
|
800 | for i in range(0,len(confs)): | |
|
801 | if i==0: | |||
|
802 | for conf in confs: | |||
|
803 | if conf.device.device_type.name == 'dds': | |||
|
804 | confdds = conf | |||
|
805 | confdds.stop_device() | |||
|
806 | break | |||
|
807 | if i==1: | |||
|
808 | for conf in confs: | |||
|
809 | if conf.device.device_type.name == 'jars': | |||
|
810 | confjars = conf | |||
|
811 | confjars.stop_device() | |||
|
812 | break | |||
|
813 | if i==2: | |||
|
814 | for conf in confs: | |||
|
815 | if conf.device.device_type.name == 'rc': | |||
|
816 | confrc = conf | |||
|
817 | confrc.stop_device() | |||
|
818 | break | |||
801 |
|
819 | |||
802 | if beam_pos > 0: |
|
820 | if beam_pos > 0: | |
803 | beam_pos = beam_pos - 1 |
|
821 | beam_pos = beam_pos - 1 | |
@@ -851,10 +869,14 class ABSConfiguration(Configuration): | |||||
851 | sock.close() |
|
869 | sock.close() | |
852 | sock = None |
|
870 | sock = None | |
853 |
|
871 | |||
854 | #Start RC |
|
872 | #Start DDS-RC-JARS | |
|
873 | if confdds: | |||
|
874 | confdds.start_device() | |||
855 | if confrc: |
|
875 | if confrc: | |
856 | #print confrc |
|
876 | #print confrc | |
857 | confrc.start_device() |
|
877 | confrc.start_device() | |
|
878 | if confjars: | |||
|
879 | confjars.start_device() | |||
858 |
|
880 | |||
859 | self.message = "ABS Beam has been changed" |
|
881 | self.message = "ABS Beam has been changed" | |
860 |
|
882 |
General Comments 0
You need to be logged in to leave comments.
Login now