This directory was accidentally omitted from the merge-release branch during the PSI code merge.
121 lines
6.8 KiB
XML
121 lines
6.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" type="xml"?>
|
||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||
version="5.0">
|
||
<info><title>Running an experiment</title><author>
|
||
<personname>Kirrily Rule</personname>
|
||
</author>
|
||
<date>2013-04-09 16:47</date>
|
||
</info>
|
||
<sect1>
|
||
<title> Creating and running batch files</title>
|
||
<para>Batch files are stored in /usr/local/nbi/sics/taipan/batch and are just text files
|
||
with the extension .tcl. You can edit these in a text editor, or the editing panel
|
||
of the left window. Your file, filename.tcl can be run by dragging and dropping into
|
||
the Buffer Queue and then run by pressing the “Play” button. </para>
|
||
<para>You can also queue additional files to run by dragging and dropping them into
|
||
Batch Queue window. These will then be run sequentially. Files can be removed and
|
||
edited or replaced as desired from the Batch Queue window. Once the file has been
|
||
read into the buffer, it can no longer be edited. For this reason it is recommended
|
||
that multiple short files are created. These can be run multiple times if necessary.
|
||
</para></sect1>
|
||
<sect1><title>Synchronising validation server with control server</title>
|
||
<para>There are actual 2 version of the SICS control server running, the one that does the
|
||
control, and one that you use to validate scripts, known as the validation server. The
|
||
validation server doesn't control real hardware. The hardware is virtual. Motors move
|
||
instantaneously. It is used to check that a batch file that you have written doesn't
|
||
violate the limits of motion, and to check that you haven't made syntactic errors. </para>
|
||
<para>With Taipan, the UB matrix has to be shared between the 2 versions of the server. To
|
||
do this, in the SICS validation terminal type:</para>
|
||
<para><command>> sync </command></para>
|
||
<para>Note that this is not the SICS control terminal. You'll need to open a connection to
|
||
SICS on port 60013 via a putty session. </para>
|
||
<para>Later versions of Gumtree for Taipan will include a button that synchronises the
|
||
servers. </para>
|
||
<para>Sync'ing may take some time. To ensure that you know when the sync has finished, you
|
||
can type</para>
|
||
<para><command>> getlog command </command></para>
|
||
<para><command>> getlog value </command></para>
|
||
<para><command>> sync </command></para>
|
||
<para>You will see something like the following feedback on the validator connection as the
|
||
sync command is running:</para>
|
||
<para><literallayout>
|
||
Executing -> sync <- from socket 16
|
||
Executing -> restore ../script_validator//log/status.tcl <- from dummy socket
|
||
pa_top = -102.499977
|
||
pa_bottom = -104.000000
|
||
pa_top = -102.499977
|
||
pa_bottom = -104.000000
|
||
pa_top = -102.499977
|
||
pa_bottom = -104.000000
|
||
pa_left = -24.699976
|
||
….
|
||
New en position: 46.434
|
||
New qm position: 6.048
|
||
Simulation Server has SYNCHRONIZED!
|
||
Fixed motors may not have correct positions</literallayout></para>
|
||
<para>Then
|
||
when the synchronisation is complete issue </para>
|
||
<para><command>> getlog kill</command></para>
|
||
<para>to kill the feedback, otherwise
|
||
you will see log messages for the commands that run when you validate the script, but
|
||
maybe that’s desirable. </para>
|
||
</sect1>
|
||
|
||
<sect1>
|
||
<title>Validation of scans</title>
|
||
<para>To check your script, you can validate it using the Validation tab in the Buffer
|
||
Queue. Drag your file into the Validate window and click on Validate. Information
|
||
about your file will scroll through the log screen. Use this to see if any errors or
|
||
motor limits have been reached. </para>
|
||
</sect1>
|
||
<sect1>
|
||
<title>Example experiment script</title>
|
||
<para>
|
||
<literallayout>
|
||
# This is a comment and will not be executed
|
||
drive qh 2.5 qk 0 ql 3.5 en 32
|
||
bmonscan clear
|
||
bmonscan add qh 2.5 0.1
|
||
bmonscan run 31 monitor 1000000
|
||
|
||
# This is another comment with important information
|
||
drive qh -2.5 qk 0 ql 3.5 en 32
|
||
bmonscan clear
|
||
bmonscan add s2 -55 -0.1
|
||
bmonscan run 31 monitor 1000000
|
||
clientput [m2 absenc] # (prints out the m2 absolute encoder value)
|
||
</literallayout>
|
||
</para>
|
||
</sect1>
|
||
<sect1>
|
||
<title>Motor errors</title>
|
||
<warning>
|
||
<title/>
|
||
<para>If you ever see the following error message:</para>
|
||
<para><command>> ERROR: THREAD ZERO NOT RUNNING ON CONTROLLER on m1</command></para>
|
||
<para> Type the following (this is case sensitive)</para>
|
||
<para><command>> m1 send RS </command></para>
|
||
<para> If you ever see the following error message:</para>
|
||
<para><command>> ERROR: MOTOR CONTROLLER RUN ERROR: -102 on m2 </command></para>
|
||
<para>Type the following (this is case sensitive)</para>
|
||
<para><command>> m2 send MG RUNF</command> and if this is a number not 0 or 1,
|
||
then:</para>
|
||
<para><command>> m2 send RUNF=0</command></para>
|
||
</warning>
|
||
</sect1>
|
||
<sect1>
|
||
<title>Creating and accessing log files</title>
|
||
<para>There are new log files written for each experiment. These are located in:
|
||
<computeroutput>J:\data\current\reports\exp#\LogFile.txt</computeroutput> on the
|
||
Microsoft Windows DAV computer. These will be updated as the experiment progresses
|
||
and should include both commands from the command line window and the batch file. </para>
|
||
<para>Use a program such as WinSCP to transfer files to your computer. The files will be
|
||
in
|
||
<computeroutput>/experiments/taipan/data/current/reports/exp#/LogFile.txt</computeroutput>.
|
||
These files are archived to a proposal directory at the end of each cycle e.g.
|
||
<computeroutput>/experiments/taipan/data/proposal/proposal#/reports/exp#/LogFile.txt</computeroutput>
|
||
</para>
|
||
</sect1>
|
||
</chapter>
|