The file /online_dir/online.xml contains the Tango devices that are used by an online session. It is possible to use an alternative version of the file, e.g.:
online -tki -c online_galil.xml
Depending on the selections which are made by the alternative .xml file, it may be necessary to do some changes to /online_dir/exp_ini.exp and to /online_dir/TkIrc.pl. The following lines could be part of exp_ini.exp. They modify its behaviour depending on which .xml file is loaded:
beamline = haspp23 ! ! (1) ! if compare( "online_galil.xml", trnlnm( online_xml)) beamline = dummy_line endif ! ! (2) ! if compare( "online.xml", trnlnm( online_xml)) def vm1 def vm2 def vm3 endif
Here are the explanations:
(1) If the symbol beamline is set to dummy_line, online does not try to identify the monochromator device. |
(2) In this example the virtual motors are defined for the 'normal' session only. Most likely because the virtual motors use real motors that are not listed in online_galil.xml. |
Here is the begin of a TkIrc.pl file which is modified to take alternative .xml files into account:
if( $ENV{'ONLINE_XML'} eq "online.xml") { $Spc::res_h{ blsc} = "usr, lom500, pilatus, microscope, abs, det, bst, slit, pumpGL"; }
In short: beamline-specific code is enabled only, if online.xml was loaded. The reason is that the BLSC widgets may depend on devices which are not contained in the aternative .xml file.