diff --git a/site_ansto/manual/db5SICSInstallationManual.xml b/site_ansto/manual/db5SICSInstallationManual.xml new file mode 100644 index 00000000..3b8b4d9e --- /dev/null +++ b/site_ansto/manual/db5SICSInstallationManual.xml @@ -0,0 +1,19 @@ + + + + + SICS Installation Manual + DRAFT ANSTO version 0.1 + 20th May 2009 + Ferdi Francheschini + Nick Hauser + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + diff --git a/site_ansto/manual/db5SICSUserGuideQuokka.xml b/site_ansto/manual/db5SICSUserGuideQuokka.xml new file mode 100644 index 00000000..2bf7e93b --- /dev/null +++ b/site_ansto/manual/db5SICSUserGuideQuokka.xml @@ -0,0 +1,66 @@ + + + + UNDER CONSTRUCTION User Guide for Small Angle Scattering. Quokka + EditionANSTO version 0.2. May 2013 + + Katy WoodNick + Hauser + Manually maintained from this source ie. can't Xinclude a book into a book. + + + This is a cover + This guide is not intended to replace your local contact, but to jog your memory + if you are operating independently. Anything strange, call your local + contact… + + + + QUICK START + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + SAMPLE ENVIRONMENT + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + diff --git a/site_ansto/manual/db5SICSUserGuideTaipan.xml b/site_ansto/manual/db5SICSUserGuideTaipan.xml new file mode 100644 index 00000000..547e631a --- /dev/null +++ b/site_ansto/manual/db5SICSUserGuideTaipan.xml @@ -0,0 +1,68 @@ + + + + User Guide for Triple Axis Spectrometer. Taipan EditionANSTO + version 0.2. May 2013 + + Kirrily Rule + + This is a cover. Does not appear in the pdf or HTML versions. Why??? + This guide is not intended to replace your local contact, but to jog your memory + if you are operating independently. Anything strange, call your local + contact… + + Manually maintained from this source ie. can't Xinclude a book into a book. + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + EXPERIMENT + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + diff --git a/site_ansto/manual/db5SICSUserManual3Axis.xml b/site_ansto/manual/db5SICSUserManual3Axis.xml new file mode 100644 index 00000000..96bab1d6 --- /dev/null +++ b/site_ansto/manual/db5SICSUserManual3Axis.xml @@ -0,0 +1,155 @@ + + + + + SICS User Manual for Triple Axis Spectrometers + DRAFT ANSTO version 0.2 27 June 2012 + 27 June 2012 + Mark Koennecke + Heinz Heer + Ferdi Franceschini + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + INTRODUCTION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + COMMANDS IN DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + OVERVIEW OF SICS DESIGN AND IMPLEMENTATION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + diff --git a/site_ansto/manual/db5SICSUserManualPelican.xml b/site_ansto/manual/db5SICSUserManualPelican.xml new file mode 100644 index 00000000..7efe63de --- /dev/null +++ b/site_ansto/manual/db5SICSUserManualPelican.xml @@ -0,0 +1,159 @@ + + + + + SICS User Manual for Pelican TOF Polarisation spectrometer + DRAFT ANSTO version 0.1 13 May 2013 + 27 June 2012 + Mark Koennecke + Heinz Heer + Ferdi Franceschini + Jing Chen + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + INTRODUCTION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + COMMANDS IN DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + OVERVIEW OF SICS DESIGN AND IMPLEMENTATION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + diff --git a/site_ansto/manual/db5SICSUserManualPlatypus.xml b/site_ansto/manual/db5SICSUserManualPlatypus.xml new file mode 100644 index 00000000..f6ac967a --- /dev/null +++ b/site_ansto/manual/db5SICSUserManualPlatypus.xml @@ -0,0 +1,166 @@ + + + + + SICS User Manual for Reflectometry. Platypus Edition + ANSTO version 0.2. 1 August 2012 + 1st August 2012 + Mark Koennecke + Heinz Heer + Ferdi Franceschini + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + INTRODUCTION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + PLATYPUS SPECIFIC COMMANDS + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + COMMANDS IN DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + diff --git a/site_ansto/manual/db5SICSUserManualPowder.xml b/site_ansto/manual/db5SICSUserManualPowder.xml new file mode 100644 index 00000000..df91945e --- /dev/null +++ b/site_ansto/manual/db5SICSUserManualPowder.xml @@ -0,0 +1,142 @@ + + + + + SICS User Manual for Diffractometers + DRAFT ANSTO version 0.1 + 6th April 2009 + Mark Koennecke + Heinz Heer + Ferdi Franceschini + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + INTRODUCTION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + COMMANDS IN DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + diff --git a/site_ansto/manual/db5SICSUserManualQuokka.xml b/site_ansto/manual/db5SICSUserManualQuokka.xml new file mode 100644 index 00000000..9663dae4 --- /dev/null +++ b/site_ansto/manual/db5SICSUserManualQuokka.xml @@ -0,0 +1,194 @@ + + + + + SICS User Manual for Small Angle Scattering. Quokka Edition + ANSTO version 0.2. 1 August 2012 + 1st August 2012 + Mark Koennecke + Heinz Heer + Ferdi Franceschini + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + INTRODUCTION + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + QUOKKA SPECIFIC COMMANDS + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + COMMANDS IN DETAIL + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + diff --git a/site_ansto/manual/db5SICSUserManualSampleEnvironment.xml b/site_ansto/manual/db5SICSUserManualSampleEnvironment.xml new file mode 100644 index 00000000..9e994914 --- /dev/null +++ b/site_ansto/manual/db5SICSUserManualSampleEnvironment.xml @@ -0,0 +1,49 @@ + + + + + SICS User Manual for Sample Environment + DRAFT ANSTO version 0.1 30 October 2012 + 30 October 2012 + Mark Koennecke + Heinz Heer + Ferdi Francheschini + Jing Chen + Nick Hauser + db5SICSUserManual.xml plus instrument specific chapters. + Manually maintained from this source ie. can't Xinclude a book into a book. + + SAMPLE ENVIRONMENT + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + diff --git a/site_ansto/manual/db5alignment_taipan.xml b/site_ansto/manual/db5alignment_taipan.xml new file mode 100644 index 00000000..9fa5007e --- /dev/null +++ b/site_ansto/manual/db5alignment_taipan.xml @@ -0,0 +1,412 @@ + + + + Preparing the spectrometer + Kirrily Rule + + 2013-04-09 16:47 + + + Aligning the spectrometer + + 12T magnet + When using the 12T magnet on TAIPAN, you must work in fixed Ki mode, as the + magnet is too heavy to move M2. Consider the energy transfer range required to + determine the appropriate Ei for these experiments. + + After discussing your instrument preferences with your local contact, they will align + the spectrometer in the following way: + + + Drive the spectrometer to the required incident energy (for elastic mode) = + e.g. 14.87meV + + + Drive the analyser arm to the straight-through position (s2=0, a1=0, a2=0, + atrans=19) + + + Visually check the straight-through arm and change any motors + accordingly + + + Place the Ni sample on the sample stage, and Borated Al sheets over the + analyser collimator. (the detector saturates at ~35,000 counts/sec) + + + Check M1 alignment with a rocking scan + + + Check S2=0 alignment with a rocking scan + + + Check A2=0 alignment with a rocking scan + + + Remove the Al attenuator and insert collimators if they need changing + + + Perform the Ni powder calibration, using 5 peaks + + + From the least squares fitting of these peaks, update the new M1 offset, M2 + offset and S2 offset. + + + With the spectrometer at S2=-50, and atrans=0 (to view the Vanadium incoherent + peak from the Ni sample can), perform an A1 scan and an A1/A2 scan around the + elastic position. + + + Perform an En scan (where Ei will move if Ef is fixed). Here the FWHM of the + peak will give you the resolution of your instrument. + + + + + + + + + + + + + + + + + Focusing monochromator and analyser + Currently the continuous focusing mechanism is not implemented on Taipan. If you wish + to use focusing for your inelastic measurement, consider the following parameters sets. + + + + + + + + + + + + Focus condition + mvfocus + mhfocus + avfocus + ahfocus + + + + + Flat + 50 + 220 + 0 + 0 + + + Optimal for 14.87meV + 125 + 155 + 125 + 80 + + + Optimal for 30.5meV + 150 + 170 + 180 + 65 + + + +
+
+ + + <para>When driving Ei or Ef in this stage of the setup, the software calculates a + constant-Q instrument position based on the current UB matrix (usually from the + previous experiment). This will often drive S1, S2, sgu and sgl to unexpected + positions. To constrain these so that they don’t move unexpectedly, fix the motors + so they don't move. </para> + <para>Motors can be fixed (1) or unfixed (-1) and their status checked by typing the + motor name </para> + <para><command>> S1 fixed 1 (fixes S1) </command></para> + <para><command>> S1 fixed -1 (unfixes S1)</command></para> + <para>Alternatively you can drive vei which drives only the M1 and M2 motors – this + cannot be used in a scan command. </para> + <para><command>> drive vei 14.87 </command></para> + <para><command>> tasub update </command></para> + <para><command>> ei </command></para> + <para/> + </warning> + <warning> + <title/> + <para>You will often need to “home” the slits if they have been unplugged or removed + during the setup. The pa_left and pa_right slits can vary between -27 (open) and 0 + (closed), while the pa_top and pa_bottom slits can vary between -200 (open) and 0 + (closed). The same limits apply for the ps_slits. </para> + <para><command>> pa_left homerun 1 </command> (this will do all of the slits)</para> + </warning> + <para/> + <para>Confirm the following setup for your experiment. </para> + <para><command>> tasub ss </command> (Scattering sense = M+1, S-1, A+1) </para> + <para><command>> tasub ana ss </command> (Scattering sense = M+1, S-1, A+1) </para> + <para><command>> tasub outofplane </command> (Confines the scattering sense to be in the + plane) </para> + <para><command>> tasub const </command> (Defines whether Ei or Ef are fixed, or if both + are fixed) </para> + <para/> + </sect1> + <sect1> + <title>Aligning your sample + At the beginning of an experiment load the “Experimental setup” script (in the + scripts window, right screen) to list the most important configuration identifiers for + the experiment. These should appear in the header lines in your data files. For + instance, these include: + + + Proposal number and title + + + User’s name, and research team present + + + Local contact’s name + + + Sample information including number of samples and sample environment + requirements + + + Particular instrument setup features (scattering sense, collimation, filters, + slits etc) + + + Next the UB matrix needs to be set. To do this, you need to input the cell parameters + and at least 2 reflections which will define your scattering plane. These can be + calculated for your system using the file “/home/taipan/calculatedDspaceTAIPAN.xls” or + something similar, such as the ICSD website. + + + > tasub listub + + shows the current UB matrix, cell parameters and reference peaks + + + + > tasub cell a b c alpha beta gamma + + + input new lattice parameters + + + + > tasub addref qh qk ql + + adds a new reflection to the list when Taipan is at the reflection + + + + > tasub addref qh qk ql a3 a4 sgu sgl ei ef + + adds a new reflection from a calculation + + + + > tasub addauxref qh qk ql + + adds a new reflection where S2 is calculated from the lattice parameters + only. This will also calculate the relative S1 positions + + + + > tasub del num + + deletes one of the previously stored reflections + + + + > tasub listref + + lists the reflections that have been input + + + + > tasub makeub 1 2 + + calculates new UB matrix from reflections 1 and 2 + + + + > tasub calcang qh qk ql ei ef + + calculates reflection from UB matrix – be careful when changing lattice + parameters, as this command won’t use them! Output: M2 S1 S2 sgu sgl + A2 + + + + + Sample alignment + For Ei = Ef = 14.87 meV + > tasub cell 5.011 5.85 10.353 90 92.4 90 + + > tasub calcang 1 0 0 14.87 14.87 (calculated S2 = 27.1) + > tasub calcang 1 1 0 14.87 14.87 (calculated S2 = 35.9) + > tasub calcang 0 2 0 14.87 14.87 (calculated S2 = 47.3) + Drive the instrument to the calculated S2 value of a particular peak. The other + motor positions are not correctly set at this point. This will also give you a + relative s1 position between the peaks. + Scan S1 until you find the peak. + > bmonscan clear + > bmonscan add S1 -10 0.2 (motor name, starting point, step + size) + > bmonscan run 60 timer 5 (scans 60 points, for a time of 5 + seconds per point) + OR + > runscan s1 -10 0 101 time 5 (motor, start, stop, # pts, + time (the mode in secs)) + (this does not work for multiple motors yet) + (This step should hopefully be replaced by the differential scan, or the + rate-meter) + Once the peak position (S1) has been optimised, scan sgu and sgl + > runscan sgl -10 10 21 time 1 + > runscan sgu -10 10 21 time 1 + Once the peak has been optimised with SGU and SGL (and you are sitting at the peak + position!!) you can set this as one of your reference peaks, where the current motor + values define the peak position. + > tasub addref 1 0 0 + Calculate the values of S1 and S2 for the next peak – use the + > tasub calcang qh qk ql ei ef + command to see the relative values of S1 and S2 as calculated from the lattice + parameters! + + + Repeat for at least one other peak, preferably one orthogonal to the first. + > tasub addref 0 0 1 + > tasub listref (to see the observed peaks in your list + (e.g. number 4 and 5)) + > tasub makeub 4 5 (this used peaks 4 and 5 to calculate the + UB matrix) + > tasub update + > tasub listub + Once this has been set, then you should be able to drive your spectrometer to any + accessible qh, qk, ql and en. + + + + At the end of each change, be sure to type > tasub + update + + +
+ + Reducing background with a slit scan + Once your sample has been aligned, add the PG filter to the instrument. You could test + the effectiveness of the filter by scanning a peak that will display higher order + scattering – e.g. (½ 0 0) which does not exist except from higher order scattering from + the (1 0 0 ). Sometimes you might want to add an additional filter. Finally you can scan + your slits to reduce the background scattering. + > runscan pa_left -15 -2 27 time 1 (scans 27 points, for a time + of 1 seconds per point) + After this, consider if you need to add more shielding to the detector drum or any + other part of the instrument (e.g. manual slits on analyser arm, additional PG + filters). + + + Setting the (new) lattice parameters + During your experiment you may need to change the lattice parameters (due to a phase + transition, thermal expansion etc). If this is the case you MUST find and optimise two + new reflections to make your UB-matrix from. For example, scan a Qh peak as follows: + > drive qh 4 qk 0 ql 0 en 0 + > runscan qh 3.985 4.015 31 time 5 + The centre of this scan should be close to 4, but could be shifted. This will be the + fit value from the scan. Then you can change the a lattice parameter accordingly in tasub + + anew=aold(peakcalculated/peakcentre + from scan) + + + + + + a + + + n + e + w + + + = + + + a + + + old + + + + ( + + + + + + peak + + + calculated + + + + + + + peak + + + centre from scan + + + + + ) + + + + + > tasub cell a b c alpha beta gamma + The next peak can be aligned in the same way + > drive qh 0 qk 4 ql 0 en 0 + > runscan qk 3.985 4.015 31 time 5 + Once you have changed your unit cell parameters, you need to add the two new peaks + into your reference list, optimise the goniometers again and re-make your UB matrix with + these new peaks + > tasub cell + 3 9 15 90 90 90 + > tasub cell 2.9 8.7 14.5 90 90 90 + > tasub addauxref 0 0 4 + > tasub addauxref 0 4 0 + +NO QH QK QL S1 S2 SGU SGL EI EF +1 0.00 0.00 4.00 22.62 -27.10 0.00 0.00 25.86 14.87 (old lattice parameters) +2 0.00 4.00 0.00 -65.74 -51.21 0.00 0.00 25.86 14.87 (old lattice parameters) +3 0.00 0.00 4.00 -156.85 -28.38 0.00 0.00 25.86 14.87 (new lattice parameters) +4 0.00 4.00 0.00 -66.10 -53.30 0.00 0.00 25.86 14.87 (new lattice parameters) + + You can see already that by changing the lattice parameters the scattering angles + change. So you need to optimise these peaks again, as before and add the new reflections + to the list before re-making your UB-matrix. + If your sample is cubic (and remains cubic at low temperatures) and you are in the HK0 + scattering plane, then the lattice parameters are best set with a peak that involved + both H and K – for instance the 110 peak. + Make sure after you have changed your lattice parameters, and both peaks have been + added to the reference list that you remake your ub matrix! + +
diff --git a/site_ansto/manual/db5environment_config_taipan.xml b/site_ansto/manual/db5environment_config_taipan.xml new file mode 100644 index 00000000..b05730bd --- /dev/null +++ b/site_ansto/manual/db5environment_config_taipan.xml @@ -0,0 +1,241 @@ + + + + Sample environment configuration (Local contact only) + Kirrily Rule + + 2013-04-09 16:47 + + + How to edit configuration files + On ics1-taipan, you'll be editing SICS configuration files so that SICS will load the + driver for a device. The editor is vim. This process will be done + through a graphical interface in the future. + + <command>vim</command> commands + + :colorscheme ron + + Change the color scheme. This make editing easier + + + + /tasub + + This searches for the string “tasub” + + + + i + + insert mode. Add text. + + + + r + + replace. Replace a character. + + + + x + + delete + + + + ESC key + + escape out of the current mode + + + + + + Lakeshore 340 configuration + When using the Lakeshore 340, various things need to be changed in the + configuration files. This should only be done by the local contact. + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + Remove both the # in the following four lines + #catch + #add_sct_… + # hsetprop + #}msg + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + + High voltage configuration + When using the High voltage setup, various things need to be changed in the + configuration files. This should only be done by the local contact. + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + Remove both the # in the four lines + # Make AsyncP… + # Make AsyncP… + # pulser delay + # pulser timeout + + + Save and quit by typing :wq + + + + Make sure that the IP on the function generator is set to the following: + 137.157.203.149 + + + Get an electrician such as Dan Bartlett to confirm the setup is safe! + + + + > runsics stop + + + > runsics start + + + + + 12T magnet configuration + When using the 12T magnet, various things need to be changed in the configuration + files. This should only be done by the local contact. + + + Turn on the magnet laptop – check that the Ethernet cable and grey cable + are connected. + + + Click on “SICS oxford instruments” to bring up the front panel. + + + Click on ITC503 Front Panel + + + open a Putty terminal + + + > cd /usr/local/nbi/sics/taipan/server + + + > sudo vim taipan_configuration.tcl + + + On line 59, remove the # from # fileeval ../aerotech.tcl + + + On line 61 is s1 in the TASUB command. Change this to vs1. + + + Save and quit by typing :wq + + If you made a mistake, quit without changing by typing + :q! and start again. + + + > cd config/motors/ + + + > sudo vim motor_configuration.tcl + + + /magnet + + Search for the string “magnet” + + + The following {0} should change to {1} for the magnet: + If {0}{ + # Convert magnet angle to s1 angle + VarMake vs1speed float user + vs1speed 1 + + } } + + + Save and quit by typing :wq + + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + #--------------- + # 12T magnet + #--------------- + Remove the # in the following lines (choose which temp controller method + you require – running with the Mercury, or as Legacy mode) + #add_oxford_magnet "magnetic" 137.157.203.153 + #add_oxford_mercury "tc9" 137.157.203.151 7020 2.0 "\r" + #add_itc500 tc1 137.157.203.151 7020 2.0 "@8" This is for running in + Legacy Mode (to look like ITC500) + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + + <superscript>3</superscript>He configuration + When using the 3He setup, various things need to be + changed in the configuration files. This should only be done by the local contact. + When using the 3He setup, you need to switch to the + appropriate speeds and accelerations for the elongated instrument. To do this, in + the PuTTy window, go to + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim taipan_setup.txt + + + Change the 0 to 1 to turn on this file + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + diff --git a/site_ansto/manual/db5environment_control_taipan.xml b/site_ansto/manual/db5environment_control_taipan.xml new file mode 100644 index 00000000..1804d3b1 --- /dev/null +++ b/site_ansto/manual/db5environment_control_taipan.xml @@ -0,0 +1,207 @@ + + + + Sample environment control + Kirrily Rule + + 2013-04-09 16:47 + + + Cryo-furnace with Lakeshore 340 controller + The typical closed cycle cryo-furnace used on Taipan is cryo-furnace #1 (CF1). This + uses a Lakeshore 340 controller. SICS is capable of reading and driving the temperature + on this device. The Moxa box must be installed, and connected to the Lakeshore hardware. + In the future, the Lakeshores will have a dedicated Moxa box. + + + + > tc1_driveable2 + + shows the sample temperature from channel A + + + + > run tc1_driveable 200 + + drives the regulation temperature (B) to 200K + + + + > wait 600 + + shows wait in seconds + + + + > drive tc1_driveable 200 + + drives the regulation temperature (B) to 200K and waits for it to be + within 1K of this value before continuing to the next command + + + + >sct_ls340_tc1 send "RANGE?" + + this will query the heater power range – 0 = off, 5 = 100W + + + + >sct_ls340_tc1 send "RANGE 1" + + this will set the heater power range. Set to a value between 0-5 + + + + The fine control of the temperature parameters, such as tolerance, heater power range, + etc, can be adjusted by clicking on the SIC Server tree view. Alternatively you can use + certain commands listed below in a batch file: + Check the heater power range of the closed cycle. To heat the sample relatively + quickly you need to have the heater range to 5. To reach base temperature (10K or less), + the heater range should be set to 4 or lower. +
+ Setting temperature + + + +
+ These detailed commands can be used (also in batch files) to control the temperature + parameters: + + + + > hlist –val /sics/tc1/sensor + + shows set points and sensors etc + + + + + > hget /sics/tc1/sensor/setpoint1 + + to show the temperature + + + + + > hset /sics/tc1/sensor/setpoint1 200 + + to set the temperature to 200K – there is no blockage of the drive + functions when this command is used + + + + + > > hset /sample/tc9/Loop1/setpoint 200 + + to set the temperature of the 12T magnet to 200K + + + + + > hget /sample/tc9/Loop3/sensor + + to read the temperature of the 12T magnet + + + + + > hset /sics/tc1/heater/heaterRange 5 + + for 100W power, or 4 for 10W power + + + + + > hset /sics/tc1/control/tolerance 1 5 + + to set the tolerance of 5K to reach desired temperature + + + +
+ + High voltage control + Sics and gumtree can also control the high voltage rig which is also set up on CF1. + The following commands will be useful + + + + > pulseron + + turn on HV + + + + + > pulseroff + + turn off HV + + + + + > getvolt + + + + + + + > setvolt 100 + + sets the voltage to 100V + + + + + + 12T magnet control. Important procedures before ramping the field. + + Protect the slits + Once you have set your slits, turn the motion control OFF (on the same box as the shutter control) and unplug the 4 cables. Turn the motion control ON again. The slits are + now in a safe mode for driving the field. + + + Stop magnet quenching + To perform field ramps safely (without risk of quenching), you should put the beam + stop down. To do this, turn the motion control OFF (on the same box as the shutter + control), ramp the field into persistent mode and then turn the motion control ON + again. Once you have reached your new field, drive to a new Q-E position to ensure + that all the motors still behave correctly after the motion OFF. If not, you might + have to reset particular motors: + > m1 send RS (this will reset the m1 motor controller) + To keep the beam stop down + + + Turn off motion control + + + Close valve located at the base of the beam stop + + + Turn on motion control + + + + + + 12T magnet control. Driving s1 + There are two parameters you will need for driving the s1 via the + sample stick. vs1 drives the motor from the command line, while + dummy_s1 is in the UB matrix and scan parameters. So use these in + the following way: + > drive vs1 30 (in the command line – this drives the motor to a + value) + > runscan dummy_s1 25 35 101 time 1 + + > runscan qh + + When running a powder sample in the magnet, fix dummy_s1 + + > dummy_s1 fix 1 (> dummy_s1 fix 0 to unfix) + +
diff --git a/site_ansto/manual/db5experiment_taipan.xml b/site_ansto/manual/db5experiment_taipan.xml new file mode 100644 index 00000000..331cd110 --- /dev/null +++ b/site_ansto/manual/db5experiment_taipan.xml @@ -0,0 +1,120 @@ + + + + Running an experiment + Kirrily Rule + + 2013-04-09 16:47 + + + Creating and running batch files + 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. + 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. + + Synchronising validation server with control server + 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. + 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: + > sync + 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. + Later versions of Gumtree for Taipan will include a button that synchronises the + servers. + Sync'ing may take some time. To ensure that you know when the sync has finished, you + can type + > getlog command + > getlog value + > sync + You will see something like the following feedback on the validator connection as the + sync command is running: + + 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 + Then + when the synchronisation is complete issue + > getlog kill + 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. + + + + Validation of scans + 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. + + + Example experiment script + + + # 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) + + + + + Motor errors + + + <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 + There are new log files written for each experiment. These are located in: + J:\data\current\reports\exp#\LogFile.txt 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. + Use a program such as WinSCP to transfer files to your computer. The files will be + in + /experiments/taipan/data/current/reports/exp#/LogFile.txt. + These files are archived to a proposal directory at the end of each cycle e.g. + /experiments/taipan/data/proposal/proposal#/reports/exp#/LogFile.txt + + + diff --git a/site_ansto/manual/db5quickstart_quokka.xml b/site_ansto/manual/db5quickstart_quokka.xml new file mode 100644 index 00000000..4b8b5b92 --- /dev/null +++ b/site_ansto/manual/db5quickstart_quokka.xml @@ -0,0 +1,64 @@ + + + + Quick Start Guide + Katy Wood + + 2013-04-09 16:47 + + + Running Gumtree + To start running Gumtree, double click on the icon on the desktop. Two windows will + automatically open and you will be logged in as “Manager”. (Why manager, why not + user???) + This quick start guide assume SICS is configured for your experiment, and that it is + running. If it is not, go to the section + + + To edit and run a batch file +
+ Script Perspective + + + +
+ Open one of the previous batch files by double clicking on a .tcl file in the Project + Explorer window. This will appear in the Tree View panel above. You can edit this and + save it with a new file name (File -> Save as). + To run this file, drag it into the Buffer Queue. You can either press Play, or + Validate to check the file. + All commands listed with > + should be typed into the SICS command line in Gumtree, or in the black + sicsclient window opened via PuTTy (Taipan ICS profile). Either of these will drive the + instrument. Only those commands executed from Gumtree will be printed into the Log file. + +
+ + Live visualisation of data +
+ Analysis Perspective + + + +
+ In the Scripting control window, choose + Load Script -> analysis -> live data to show a live plot as the + counts are taken. + In this window, you can tick (or untick) autofit (for a Gaussian fit), and normalise + (which normalises to time) You can also change which detector you wish to see the counts + in: + bm1_counts = monitor + bm2_counts = detector + You can also control the fitting range in this window + You can add past data sets to the Plot 2 window (beneath the liveplot window). + Highlight the plots you wish to add, be sure you have the correct detector choice and + x-axis parameter selected, then click on the button “Import Data Files to Plot2”. + Stopping the instrument + At any time, to interrupt SICS you can click on the red button, or type >>INT1712 + 3 + +
+
diff --git a/site_ansto/manual/db5quickstart_taipan.xml b/site_ansto/manual/db5quickstart_taipan.xml new file mode 100644 index 00000000..14f59168 --- /dev/null +++ b/site_ansto/manual/db5quickstart_taipan.xml @@ -0,0 +1,64 @@ + + + + Quick Start Guide + Kirrily Rule + + 2013-04-09 16:47 + + + Running Gumtree + To start running Gumtree, double click on the icon on the desktop. Two windows will + automatically open and you will be logged in as “Manager”. (Why manager, why not + user???) + This quick start guide assume SICS is configured for your experiment, and that it is + running. If it is not, go to the section + + + To edit and run a batch file +
+ Script Perspective + + + +
+ Open one of the previous batch files by double clicking on a .tcl file in the Project + Explorer window. This will appear in the Tree View panel above. You can edit this and + save it with a new file name (File -> Save as). + To run this file, drag it into the Buffer Queue. You can either press Play, or + Validate to check the file. + All commands listed with > + should be typed into the SICS command line in Gumtree, or in the black + sicsclient window opened via PuTTy (Taipan ICS profile). Either of these will drive the + instrument. Only those commands executed from Gumtree will be printed into the Log file. + +
+ + Live visualisation of data +
+ Analysis Perspective + + + +
+ In the Scripting control window, choose + Load Script -> analysis -> live data to show a live plot as the + counts are taken. + In this window, you can tick (or untick) autofit (for a Gaussian fit), and normalise + (which normalises to time) You can also change which detector you wish to see the counts + in: + bm1_counts = monitor + bm2_counts = detector + You can also control the fitting range in this window + You can add past data sets to the Plot 2 window (beneath the liveplot window). + Highlight the plots you wish to add, be sure you have the correct detector choice and + x-axis parameter selected, then click on the button “Import Data Files to Plot2”. + Stopping the instrument + At any time, to interrupt SICS you can click on the red button, or type >>INT1712 + 3 + +
+
diff --git a/site_ansto/manual/db5sics_login.xml b/site_ansto/manual/db5sics_login.xml new file mode 100644 index 00000000..1c5b1644 --- /dev/null +++ b/site_ansto/manual/db5sics_login.xml @@ -0,0 +1,99 @@ + + + + SICS status and login + Kirrily Rule + + 2013-04-09 16:47 + + + Login to the SICS computer from a PuTTy terminal + Before you can control the instrument, there are 2 programs that need to be running, + SICS and Gumtree. SICS should already be configured and set running by the local + contact. This procedure allows you to check this. + + + On the Microsoft Windows computer in the instrument cabin, find the putty + program.
+ PuTTy icon on the Microsoft Windows desktop + + + +
+
+ + Choose the ICS computer from the list of Saved Sessions + + + Load and open + + + Use your NBI username and password, supplied by the Bragg Institute User + Office + + + You will now have a command prompt to a Linux operating system + +
+
+ + Check SICS status + Normally SICS will be running. You can check if SICS is running by using the PuTTy + window and at the Linux operating system command prompt type + > runsics status + + If the status shows that SICS is not running, or if there is a change in the SICS + configuration files e.g. a piece of sample environment has been added, you should + contact your local contact. + If the local contact has confirmed it is OK to restart SICS, then in the PuTTy window + type + > runsics stop + + > runsics start + + + + Login to SICS using the putty session + In the previous section, you logged into the ICS (instrument control server) computer + using putty. At the Linux operating system command prompt, you will run a program that + will give you a sics command prompt. + For most cases, you won't have to do this. A SICS command prompt is available in + Gumtree. + At the Linux operating system command prompt type + > sicsclient + You should see OK on the screen. + You now have a SICS command prompt. It may look strange since the cursor will be on a + blank line. You will not have access to the Linux operating system command prompt until + you log off. + Next step is to login to sics by typing + > user password where user is literally the word "user" and the + password will be supplied by the local contact + You can replace user with spy. The spy login provides read-only access to SICS. + + + + Login to SICS from Gumtree +
+ Gumtree connected to SICS + + + +
+ Normally, Gumtree will be connected to SICS, as in the figure above. + In Gumtree you reconnect to SICS if you restart SICS. This is done by clicking on the + little man at the bottom of the Gumtree screen when logged in to SICS. He will be + standing still, and you will see the word Disconnected when not connected. He will be + running when connected as in the figure. You will then need to start a new Sics terminal + in Gumtree. From the left screen, in the project explorer window, Right click on SICS + and choose the option to start a new “SICS telnet terminal”. + + Reconnection won't work properly if SICS has changed configuration e.g. you've + added a piece of sample environment. In this case, when you restart SICS you should + also restart Gumtree + + +
+
diff --git a/site_ansto/manual/dbSICSch0_TEMPLATE.xml b/site_ansto/manual/dbSICSch0_TEMPLATE.xml new file mode 100644 index 00000000..6d81992a --- /dev/null +++ b/site_ansto/manual/dbSICSch0_TEMPLATE.xml @@ -0,0 +1,63 @@ + + + + Chapter Title + Ferdi Franceschini + + 2008-08-29 16:47 + + + Configuration + How to get this running in SICe.g. edit + + /usr/local/sics/extraconfig.tcl file + select_environment_controller "11TMagnet" + Make sure that the other entries are commented out, save the file and restart SICS. + This will set up the lakeshore temperature controller as well as the magnet power + supply control. They will appear as tc1 and ips120 + under the sample group in GumTree. + + + Commands + General description of commands are doing. + + + hset /sample/ips120/Control/A 0 + + What the command does + + + + drive ips120_driveable n + + Drive the magnet to n Tesla + + + + + + Parameters + + + /sample/ips120/sensor/value + + Parameters that set the state of the command object. + + + + + + Description + Explanation of what a command is doing when it is more than just setting a target + value. e.g. changing magnetic field in a superconducting magnet. + + + Known Issues + Alerts the user to known operational problems + + + Troubleshooting + What to do if things go wrong + + diff --git a/site_ansto/manual/dbSICSch10_tcl_commands.xml b/site_ansto/manual/dbSICSch10_tcl_commands.xml new file mode 100644 index 00000000..3514d67f --- /dev/null +++ b/site_ansto/manual/dbSICSch10_tcl_commands.xml @@ -0,0 +1,209 @@ + + + + TCL command language interfaceFerdi + Franceschini + 2006-08-17 14:01 + + Common commands & exclusions + From the PSI SANS documentation by Dr. Joachim Kohlbrecher and Dr. Mark Könnecke with + slight modifications. + The macro language implemented in the SICS server is John Ousterhout Tool Command + Language TCL . Tcl has control constructs, + variables of its own, loop constructs, associative arrays and procedures. Tcl is well + documented by several books, online + tutorials and manuals.  All SICS commands are available in the macro language. + Some potentially harmful Tcl commands have been deleted from the standard Tcl + interpreter. These are: + + exec + source + puts + vwait + exit + gets + socket + Below only a small subset of the most important Tcl commands like assigning variables, + evaluating expressions, control and loop constructs are described. For complete + description of Tcl commands have a look on the manual pages or on one of the many + books about Tcl/Tk. + + + set varName value + set arrName(index) value + + Set/get scalar variables or array elements.  Arrays in Tcl are actually + associative arrays, this means that their indices are not restricted to + integers.  The following examples demonstrate setting a scalar variable and + a couple of array elements.  Note the third array example which shows that + the same array can have mixed indices (the number 1 and 'one') as well as + mixed data types (the number 10 and 'ten') in the same array. + set a 3 +set arr(1) 10 +set arr(one) ten + + + + expr arg arg arg + + Concatenates arg’s (adding separator spaces between them), evaluates the + result as a Tcl expression, and returns the value. The operators permitted + in Tcl expressions are a subset of the operators permitted in C expressions, + and they have the same meaning and precedence as the corresponding C + operators. Expressions almost always yield numeric results (integer or + floating-point values). For example, the expression + expr 8.2 + 6 + evaluates to 14.2. For some examples of simple expressions, suppose the + variable a = 3 and b = 6. Then the commands shown below will produce the + value after the -> + + set a 3 +set b 6 +expr 3.1 + $a -> 6.1 +expr 2 + "$a.$b" -> 5.6 +expr [ splitreply [omega] ] / 2.0 -> + omega axis position / 2.0 + Note the use of square brackets [] for command substitution. + + + + + + Math functions + Tcl supports the following mathematical functions in + expressions: + + + + + acos + cos + hypot + sinh + + + asin + cosh + log + sqrt + + + atan + exp + log10 + tan + + + atan2 + floor + pow + tanh + + + ceil + fmod + sin +   + + + + Note you must use the expr command to invoke these + functions  eg, + expr cos(0) +set pi [expr acos(-1)] +expr sin($pi) + Each of these functions invokes the math library function of the same name; see the + manual entries for the library functions for details on what they do. Tcl also + implements the following functions for conversion between integers and floating-point + numbers and the generation of random numbers: + abs(arg), + double(arg) , + int(arg), + rand(arg), + round(arg), + srand(arg). + + + if - execute scripts conditionally + if expr1 then + body1 +elseif expr2 then + body2 +elseif... +else + bodyN + + The if command evaluates expr1 as an + expression (in the same way that expr evaluates its argument). The + value of the expression must be a boolean (a numeric value, where 0 is false and + anything is true, or a string value such as "true" or "yes" for true and "false" or "no" + for false); if it is true then body1 is executed by passing + it to the Tcl interpreter. Otherwise expr2 is evaluated as an + expression and if it is true then body2 is executed, and so + on. If none of the expressions evaluates to true then bodyN + is executed. The then and else arguments are + optional "noise words" to make the command easier to read. There may be any number of + elseif clauses, including zero. BodyN + may also be omitted as long as else is omitted too. The return value + from the command is the result of the body script that was executed, or an empty string + if none of the expressions was non-zero and there was no + bodyN. + + "if" + set a 3 + if {$a == 3} {puts "a equals three"} + + + + for - "for" loop + for start test + next + body + + for is a looping command, similar in structure to the C + for statement. The start, next, and + body arguments must be Tcl command strings, and + test is an expression string. If a + continue command is invoked within body + then any remaining commands in the current execution of body + are skipped; processing continues by invoking the Tcl interpreter on + next, then evaluating test , and + so on. If a break command is invoked within + body or next , then the + for command will return immediately. The operation of + break and continue are similar to the + corresponding statements in C. for returns an empty string. + + "for" + for {set x 0} {$x<10} {incr x} {puts "x is $x"} + + + + while - execute script repeatedly as long as a condition is met + while test + body + The while command evaluates test as an + expression (in the same way that expr evaluates its argument). The + value of the expression must be a proper boolean value; if it is a true value then + body is executed by passing it to the Tcl interpreter. + Once body has been executed then + test is evaluated again, and the process repeats until + eventually test evaluates to a false boolean value. + continue commands may be executed inside + body to terminate the current iteration of the loop, and + break commands may be executed inside body to + cause immediate termination of the while command. The + while command always returns an empty string. + + "while" + set x 0 + while {$x<10} { + puts "x is $x" + incr x +} + + + diff --git a/site_ansto/manual/dbSICSch11_julabo.xml b/site_ansto/manual/dbSICSch11_julabo.xml new file mode 100644 index 00000000..58523091 --- /dev/null +++ b/site_ansto/manual/dbSICSch11_julabo.xml @@ -0,0 +1,279 @@ + + + + Julabo Temperature Control + Nick Hauser + + 2009-03-27 15:50 + + + Commands + The Julabo temperature controller is a SICS script context object. There are 2 parts, + the script context object, which has the name /sample/tc1 and the + driveable interface to the object, which has the name tc1_driveable + ie. "tee-cee-one". Note this name can change in the configuration. Hence you can + drive and run + tc1_driveable. To get and set other parameters use + hget or hset /sample/tc1 + + + + run tc1_driveable + temp1 + + + Runs the temperature controller tc1 to + temp1 + + + + + drive tc1_driveable + temp1 + + + Is the same as run but it blocks the client that + requested the drive from issuing commands until the task + has finished. + + + + hlist /sample/tc1 + + + Lists all the tc1 nodes. Nodes can be get and set using + hget and hset + + + + The temperature controller is usually put under the + /sample node in hipadaba, which is where it will be + found when using the Gumtree SICS. This complies with the NeXus standard. + + + Parameters + Use hget and hset on these parameters. Parameter + without val are read only and therefore cannot be set. + + + + /sample/tc1/setpoint + val + + + Privilege = User + Units = Celsius + Get/Set the temperature setpoint. If the setpoint is set, the controller + will change the temperature to this value, subject to constraints including + operate remote_ctrl hitemp lotemp upperlimit lowerlimit + + + + + + + /sample/tc1/overtemp_warnlimit + val + + + Privilege = User + Units = Celsius + Get/Set the controller's temperature upper limit. When the temperature is + > + val, SICS will veto + counters until the temperature fall below val + . + + + + + /sample/tc1/subtemp_warnlimit + val + + + Privilege = User + Units = Celsius + Get/Set the controller's temperature lower limit. When the temperature is + < val, SICS will + veto the histogram memory and counters until the temperature rises above + val . + + + + + /sample/tc1/sensor/value + + + Units = Celsius + Get the controller's temperature sensor value + + + + + /sample/tc1/heating_power_percent + val + + + Units = percent + Get the controller's current heating power + + + + + /sample/tc1/operate + val + + + Privilege = User + Get/Set the operate state. + Allowed val: + Controller doesn't control temperature. Will still + report parameters + Controller provides control. + + + + + /sample/tc1/status + + + Get the controller's operate state + Allowed val: + Equivalent to tc1 + operate + + + Equivalent to tc1 + operate + + + + + + + /sample/tc1/remote_ctrl + val + + + Privilege = User + Get/Set remote control enable/disable + Allowed val: + + tc1 remote control enabled + + tc1 remote control disabled + + + + + /sample/tc1/lh45_lasterror + + + Get the last error recorded on the controller. Note that this error + condition is not cleared if the error no longer exists. This value is only + overwritten by another error state. + Example of an error state: + -04 LOW TEMPERATURE WARNING + + + + + + /sample/tc1/tolerance + val + + + Privilege = User + Units = Celsius + Get/Set tolerance. + overtemp_warnlimit and + subtemp_warnlimit will be set when you use the + run or drive + tc1 temp1. Control is dependent on the + overtemp_warnlimit and + subtemp_warnlimit values, not on tolerance. Setting + overtemp_warnlimit or + subtemp_warnlimit will override + tolerance + + + + + /sample/tc1/apply_tolerance + val + + + Privilege = User + Get/Set apply_tolerance Don't know what this + does + Allowed val: + + + + + + + + + /sample/tc1/lowerlimit + val + + + Privilege = Manager + Get/Set the lower limit for setpoint. If you try to set + setpoint below this value, will return. + ERROR: setpoint violates limits + + + + + /sample/tc1/upperlimit + val + + + Privilege = Manager + Get/Set the lower limit for setpoint. If you try to set + setpoint above this value, will return. + ERROR: setpoint violates limits + + + + + /sample/tc1/emon/monmode + + + Get emon's monitor mode Don't know what this + does + Returned values: + + + + + + + + /sample/tc1/emon/isintol + + + Get if the value is within tolerance (but which tolerance?) hitemp lotemp + or tolerance + Returned values: + out of tolerance + in tolerance + + + + /sample/tc1/emon/errhandler + + + Get if the value is within tolerance (but which tolerance?) hitemp lotemp + or tolerance + Returned values: + ??? + ??? + + + + + diff --git a/site_ansto/manual/dbSICSch12_velsel.xml b/site_ansto/manual/dbSICSch12_velsel.xml new file mode 100644 index 00000000..3505b758 --- /dev/null +++ b/site_ansto/manual/dbSICSch12_velsel.xml @@ -0,0 +1,276 @@ + + + + Astrium Velocity Selector + Nick Hauser + + 2009-03-31 15:50 + + + Commands + The Astrium velocity selector is a SICS script context object. There are 2 parts, the + script context object, which has the name + /instrument/velocity_selector and the 2 driveable interfaces to the + object, which have the names nvs_speed and + nvs_lambda. Hence you can drive and + run + nvs_speed and nvs_lambda. To get and set other + parameters use hget or hset + /instrument/velocity_selector/ + + + run nvs_lambda + wavelength + + + Units: Angstroms + Runs the velocity selector to wavelength + + + + drive nvs_lambda + wavelength + + + Units: Angstroms + Is the same as run but it blocks the client that + requested the drive from issuing commands until the task + has finished. + + + + hset /instrument/velocity_selector/setstate + + + Set the state. The state can be read using hget + /instrument/velocity_selector/state + If the state is set to brake , then hget + /instrument/velocity_selector/state will return + BRAKING even when the rotor has + stopped. + You can use run nvs_speed to run the rotor again + Allowed values: + + + + + + hget /instrument/velocity_selector/state + + Get the state. The normal operating state under SICS control is + CONTROL + + + + hlist /instrument/velocity_selector + + + Lists all the velocity_selector nodes + + + + hset + /instrument/velocity_selector/node + val + + + Set val on a + node + + + + hget + /instrument/velocity_selector/node + + Get the value of a node + + + + hset /instrument/velocity_selector/setspeed + val + + Privilege = User + Units = rpm + Set the rotor set speed. + Once this is set, the velocity selector will attempt to run to this speed. + If called with no argument, will return an error + + + + The velocity selector is under the + /instrument/velocity_selector node in hipadaba, which + is where it will be found when using the Gumtree TableTree. This complies with the NeXus + standard. + + + Parameters + For more detailed description of these parameter, please see the ASTRIUM velocity selector manual on ANSTOnet. + + + hget /instrument/velocity_selector/wvalv + + + Privilege = User + Get the state of the water valve. The water valve will open in once the + velocity selector has reached 3000 rpm. The valve will close again and the + selector will brake to 0 rpm if the water flow is not within tolerance. + Water valve open + Water valve closed + + + + hget /instrument/velocity_selector/rtemp + + + Privilege = User + Units = Celsius + Get the rotor temperature. + + + + hget /instrument/velocity_selector/state + + + Privilege = User + Get the state. + Is not being controlled. Should be at zero rpm. + A reset has been issued by the velocity selector + client program + Control has been requested by SICS or the + velocity selector client program + The velocity selector has the brake applied due + to an hset setstate brake request, the + Brake button applied on the velocity selector client + program, or due to a fault condition + + Powerloss measurement button applied on the velocity + selector client program + + Emergency stop button applied on the velocity + selector client program + + + + hget + /instrument/velocity_selector/aspeed + + + Units = rpm + Get the actual speed + + + + hget /instrument/velocity_selector/sspeed + val + + + Privilege = User + Units = rpm + No idea ??? + + + + hget /instrument/velocity_selector/winlt + + + Units = Celsius + Get the cooling water inlet temperature + + + + hget /instrument/velocity_selector/wflow + + + Units = litres/min + Get the cooling water flow rate + + + + hget /instrument/velocity_selector/ploss + + + Units = Watts + Get the last measured power loss + + + + hget /instrument/velocity_selector/splos + + + Units = rpm + Get the speed of the last measured power loss + + + + hget + /instrument/velocity_selector/rspeed + + + Units = rpm + Get the requested speed, set using run nvs_speed + + + + + hget /instrument/velocity_selector/woutt + + + Units = Celsius + Get the cooling water outlet temperature + + + + + hget /instrument/velocity_selector/vacum + + + Units = 10-3bar + Get the vacuum + + + + hget /instrument/velocity_selector/bcuun + + Get the BCU units + + + + hget /instrument/velocity_selector/ttang + + Units = degrees + Get the turntable angle. 999.99 if not initialised + + + + hget /instrument/velocity_selector/vibrt + + Units = mm/s + Get the vibration + + + + hget /instrument/velocity_selector/vvalv + + Get the vacuum valve state + Returned values: + + + + + + + + hget /instrument/velocity_selector/aveto + + Get the veto state + Returned values: + not OK + OK + + + + + diff --git a/site_ansto/manual/dbSICSch13_echidna_motor_names.xml b/site_ansto/manual/dbSICSch13_echidna_motor_names.xml new file mode 100644 index 00000000..7ee17ec8 --- /dev/null +++ b/site_ansto/manual/dbSICSch13_echidna_motor_names.xml @@ -0,0 +1,234 @@ + + + + Echidna Motor Names + Ferdi Franceschini + + 2007-02-07 15:50 + + + Commands + Motor names used in SICS. + + Monochromator Motors + + + + + motor + axis + + + + + monochromator translation 1 (upper) + my + + + monochromator translation 2 (lower) + mx + + + monochromator tilt 1 (upper) + mphi  + + + monochromator tilt 2 (lower) + mchi + + + monochromator rotate + mom + + + + + Sample Stage Motors + + + + + motor + axis + + + + + sample translation 1 (upper) + sy + + + sample translation 2 (lower) + sx + + + sample tilt 1 (upper) + sphi + + + sample tilt 2 (lower) + schi + + + sample rotate + som + + + + + + Detector and Sample Stage Movement + + + + + + motor + axis + + + + + Detector Rotate + stth + + + Sample Stage (Take-off angle) + mtth + + + + + + + + First Slit Package + + + + + + motor + axis + + + + + + Left slit blade + + + ss1l + + + + + Right slit blade + + + ss1r + + + + + Upper slit blade + + + ss1u + + + + + Lower slit blade + + + ss1d + + + + + Horizontal gap width + + + ss1hg + + + + + Horizontal gap offset + + + ss1o + + + + + Vertical gap width + + + ss1vg + + + + + Vertical gap offset + + + ss1vo + + + + + + + Second Slit Package + + + + + + + motor + axis + + + + +  Left slit blade + ss2l + + +  Right slit blade +  ss2r + + +  Upper slit blade +  ss2u + + +  Lower slit blade +  ss2d + + +  Horizontal gap width +  ss2hg + + +  Horizontal gap offset +  ss2ho + + +  Vertical gap width +  ss2vg + + +   Vertical gap offset +  ss2vo + + + + + + + diff --git a/site_ansto/manual/dbSICSch14_troubleshooting.xml b/site_ansto/manual/dbSICSch14_troubleshooting.xml new file mode 100644 index 00000000..d2188490 --- /dev/null +++ b/site_ansto/manual/dbSICSch14_troubleshooting.xml @@ -0,0 +1,138 @@ + + + + Motor Troubleshooting + Ferdi Franceschini + + 2006-09-04 15:50 + + You can check for problems between SICS and the instrument by running the troubleshoot.tcl + application in the /usr/local/sics/server/common directory.The trouble-shooter constructs a + control panel from information in the SICS configuration file and from information in the + troubleshoot_setup.tcl file.  The trouble-shooter setup file specifies the expected + configuration for the motor controllers, this file should be updated whenever the motor + controller configuration is changed. + + A Troubleshooting Session + + This chapter requires testing. nha. 1 May 2009 + + If you have a computer with an X server then you can troubleshoot your instrument via + remote terminal session.  If you are running linux on your computer then the following + will just work.  If you are using an Apple computer you should have the X11 support + installed.  If you are running windows you will need to have something like X-Win32 or + or Cygwin (with X11) installed.  Otherwise you will have to run this on the instrument + control computer locally. + + + Starting the troubleshooter + First log on to the instrument control computer by entering the following in a + terminal (linux or cygwin) + ssh -Y uname@ic-instname.nbi.ansto.gov.au + Where uname is your ANSTO user id and instname is the name of your instrument (eg + echidna, wombat). + Once you have logged in, go to the sics server directory, + cd /usr/local/sics/server + There should be a troubleshoot.tcl script and troubleshoot_setup.tcl file in this + directory, check this by listing the directory contents with the 'ls' command. + + + An example showing failures + This example uses the following troubleshoot_setup.tcl file for Echidna.  + # ECHIDNA setupset configFileName "hrpd_configuration.tcl"# These subroutines should be installed on the controllersset contSubs(dmc2280_controller1) "#AUTO #ABC #LIMSWI #SOLCTRL #TCPERR"set contSubs(dmc2280_controller2) "#AUTO #LIMSWI #SOLCTRL #TCPERR"set contSubs(dmc2280_controller3) "#AUTO #HOME #LOOPER #RES #TCPERR"set contSubs(dmc2280_controller4) "#AUTO #HOME #LIMSWI #LOOPER #TCPERR"# These threads should be running on the controllers.set contThreads(dmc2280_controller1) "0"set contThreads(dmc2280_controller2) "0"set contThreads(dmc2280_controller3) "0"set contThreads(dmc2280_controller4) "0" + Two simulated failures and one real failure are demonstrated in what follows.  I have + simulated a missing subroutine error by adding a dummy subroutine name "#ABC" to + controller one in the setup file above.  A network failure is simulated by simply + unplugging the ethernet cable from controller two.  There is a real failure on + controller three, a necessary thread was not running on that controller because a + command failed in the auto start subroutine. + Start the troubleshooter  with the following command + common/troubleshoot.tcl + You will see this dialog box which lets you specify the name of your instrument's + configuration file. + + + Note: The default file name can be set in the "troubleshoot_setup.tcl" script. + When you press the "Load config" button a control window will be constructed from the + information in the instrument configuration file and the "troubleshoot_setup.tcl" file. + + + + There is a column for each of the motion controllers specified in the instrument + configuration file (hrpd_configuration.tcl in this example).  The control buttons allow + you to test the connection to each controller and then perform some tests on the + controllers. + To test the communications and motor controller status just click on the buttons in + each column from top to bottom.  If the test succeeds the button lights up green, if it + fails a message box describing the failure will pop-up.  Following are some examples of + the failure messages. + + + Motor Controller Communications Failure Example + When you press the connect button it should light up green if everything is OK, + otherwise you will see the following message. + + + + + + Missing motor controller subroutine example + Assuming that the connection has succeeded (ie the "connect" button is now green) then + you can click on the "Check subs" button.  If the check succeeds the button will light + up green, if not you will see the following message. + + + + This means the a required subroutine named "#ABC" was not found on controller + one. + + + Motor controller thread not running example + You can if necessary threads are running on the motor controller by clicking on the + "Check threads" button.  If the check succeeds then the button should now be green.  On + failure you will see the following message. + + + + This means that something should be running in thread zero but it's not.  Typically + the #AUTO subroutine will be running an empty loop in thread zero to trigger trip points + in the controller software. + + + Final status display + After completing all the tests for this example you will see the following display.  + This means that controller one is missing one or more subroutines, the connection failed + on controller two, one or more required threads are not running on controller three, and + all the tests succeeded on controller four. + + + + + + Using sicsclient for troubleshoot + The sicsclient command line can be used for troubleshooting motors. + There can be circumstances when a third party, such as the handle-held wireless Galil + controller, or a terminal client is used to control motors. In these cases, the values + in SICS can be out of sync with those on the controller. The Galil controller can be + interrogated using send. + + mot1 + send + "MG _SP`" + + In this example, the controller and axis of motor mot1 will + the sent a command which will return the speed _SP of the + motor. Note that a substitution is made in SICS of the controller and axis using the + backtick character ` + The values from the controller can be compared manually with the values from SICS + mot1 + list + + diff --git a/site_ansto/manual/dbSICSch15_beamstop.xml b/site_ansto/manual/dbSICSch15_beamstop.xml new file mode 100644 index 00000000..0af510ba --- /dev/null +++ b/site_ansto/manual/dbSICSch15_beamstop.xml @@ -0,0 +1,87 @@ + + + + Beamstops + Ferdi Franceschini + + 2008-12-15 + + + Commands + Raising and lowering of beamstops is implemented via the selbs  + command. + selbs raises the selected beamstop in a safe manner. It will leave + the previously selected beamstop in place until the selected stop is fully raised and + then lower the other beamstop. + If you are changing the coordinates there is no safe + sequence. You should set maximum attenuation or close the fast shutter before moving + the beamstops. + You can monitor the beamstop position via GumTree as it is being raised, and you can + also see the state by reading angles. + The odd and even numbered beamstops are on separate parallel axes which are + horizontally offset by about 10cm. This means that beamstops must be raised to an angle + which is a few degrees of vertical so that the odd and even beamstops will overlap, you + will see that the odd numbered stops will be at roughly 93 degrees and the even numbered + ones will be at 86 degrees to vertical when raised. + + + selbs n x + z + + Allowed n + where + 1 = largest beamstop + 6 = smallest beamstop + = beam x position in detector coordinates + = beam z position in detector coordinates + The beam position (x,z) is optional + + This is a blocking command. You will not be able to run other commands + in the session running selbs until it has + finished. + + + + + + selbs example + selbs 1 487.7 490 + Select beamstop one and position it over the middle of the detector. + selbs 2 + Leave the beamstop carriage in place and select beamstop two. + + + + Parameters + + + beamstop + + selbs also sets a variable called + beamstop and saves it in the data file. + Possible values for beamstop + + selbs has never been run or the sics status.tcl file has + been cleared + + selbs failed while driving the beamstops + n + selbs completed driving successfully and has selected + beamstop n + The value of the "beamstop" variable persists between restarts of SICS. + + If someone drives the beamstops directly then the + beamstop variable may be wrong + + + + + + + Troubleshooting + Beamstop position can be checked visually (by eyes) from the vessel port with touch.  + To do this,  you should drive the detector to position 9300mm, and view from the middle + vessel port. + + diff --git a/site_ansto/manual/dbSICSch16_ordela_hv.xml b/site_ansto/manual/dbSICSch16_ordela_hv.xml new file mode 100644 index 00000000..4b1ea082 --- /dev/null +++ b/site_ansto/manual/dbSICSch16_ordela_hv.xml @@ -0,0 +1,133 @@ + + + + Ordela Detector Voltage Control + Ferdi Franceschini + + 2008-08-29 16:47 + + + Commands + The High Voltage controller for the Ordela detector has been implemented as a standard + SICS environment controller object with a driveable interface. It has been configured + differently to other SICS objects in several ways. Firstly, you use + up and down commands to drive the voltage to its + upper and lower limits. This is a blocking + task i.e. no other task can started until this is complete. Secondly, the instrument has + been configured with the SICS anticollider to prevent you from moving the detector when + the voltage is above a certain threshold, which will lead to damage of the detector. + This is important for Quokka as the detector is moved frequently. + + + dhv1 up + + Raise the voltage + + + + dhv1 down + + Lower the voltage + + NOTE This command blocks until the power supply reaches the "upper" or + "lower" running voltages, see below. + + + + + INT1712 1 + + If this commands hang SICS you can interrupt it with by entering this at + the SICS command line, or by pressing the interrupt button at the bottom of + GumTree + + + + dhv1 reset + + Reset the controller + + + + dhv1 list + + Displays the values of the various parameters + + + + dhv1 send command + + Sends a command to the unit and displays the + response + + + + dhv1 off + + Drives the output voltage to zero + + + + + + Parameters + + + dhv1 upper voltage + + Sets the running voltage for the up command. This would + normally be the operating voltage for the equipment to which the power + supply is connected. + + + + dhv1 lower voltage + + Sets the standby voltage for the down command. This + would normally be the standby voltage for the equipment to which the power + supply is connected. + + + + dhv1 max voltage + + Sets the hardware maximum for the power supply. For the Ordela power + supplies, it is important that this is the correct full-scale value of the + power supply itself. This is used to convert between the voltage step and + voltages and to calculate the step period from the voltage slew rate. + + + + dhv1 rate voltage + + The volts per second at which the power supply slews between voltages. For + the Ordela power supplies, this is used to calculate the time between + voltage steps based on the parameter + + + + dhv1 debug val + + Allowed val + No debug information in log + Debug information in log + + + + dhv1 lock + + This locks the device from being set by users. Users can use up + down and off commands to set + voltages + + + + dhv1 unlock + + Managers may unlock the device + + + + + diff --git a/site_ansto/manual/dbSICSch17_control_and_interrupt.xml b/site_ansto/manual/dbSICSch17_control_and_interrupt.xml new file mode 100644 index 00000000..a4c76af2 --- /dev/null +++ b/site_ansto/manual/dbSICSch17_control_and_interrupt.xml @@ -0,0 +1,896 @@ + + + + Control, interrupt and system commands + Mark Koennecke + + + + + + + + from The SICS Master User manual. userrefman. converted to tex using + html2tex (from Mark Koennecke) converted to docbook4using htlatex converted to + docbook5 using the transform available in Oxygen hand edited to remove lint and put + into + Introduction + In the previous chapter, you learnt how to start and stop SICS, and how to login. Now + you'll learn how to control the instrument. + The first part of this chapter deals with some of the most used commands in SICS. This + includes system commands and control commands. This provides you with a soft start. + The second part of the chapter deals with logging activity and configuring your + connection to SICS. + The next chapter will go more deeply into the how SICS executes those commands, + through a sequence of states. You may want to skip the next chapter if you don't require + a deeper understanding of SICS. + This chapter and the next are from the master user manual for SICS. It gives an + overview over all commands implemented, independent of a specific instrument. This is to + be used as the source for more instrument specific user manuals and gives an overview of + the commands available within SICS. Please note, that many instruments have special + commands realized as scripts in the SICS built in scripting language. Only the most + common of such commands are listed here. + + + + System Commands and Concepts + + + + Authorisation + + A client server system is potentially open to unauthorised hackers who might mess + up the instrument and your valuable measurements. A known problem in instrument + control is that less knowledgeable user accidentally change instrument parameters + which ought to be left fixed. In order to solve these two problems SICS supports + authorisation on a very fine level. As a user you have to specify a username and + password in order to able to access SICS. Some clients already do this for you + automatically. SICS support four levels of access to an instrument: + + Roles + + Spy + + may look at everything, request any value, but may not actually + change anything. No damage potential here. + + + + User + + is privileged to perform a certain amount of operations necessary to + run the instrument. + + + + Manager + + has the permission to mess with almost everything. A very dangerous + person. + + + + Internal + + is not accessible to the outside world and is used to circumvent + protection for internal uses. However some parameters are considered to + be so critical that they cannot be changed during the runtime of the + SICS-server, not even by Managers. + + + + All this is stated here in order to explain the common error message: You are not + authorised to do that and that or something along these lines. + + + + + General Structure + SICS is a client server system. The application the user sees is usually some form + of client. A client has two tasks: the first is to collect user input and send it to + the SICS server which then executes the command. The clients second task is to + listen to the server messages and display them in a readable format. This approach + has two advantages: clients can reside on machines across the whole network thus + enabling remote control from everywhere in the world. The second advantage is that + new clients (such as graphical user interface clients) can be written in any + feasible language without changes to the server. + + + + + + SICS Command Syntax + + SICS is an object oriented system. This is reflected in the command syntax. SICS + objects can be devices such as motors, single counters, histogram memories or other + hardware variables such as wavelength or Title and measurement procedures. + Communication with these objects happens by sending messages to the target object. + This is very simply done by typing something like: object message par1 par2 .. parn. + For example, if we have a motor called A1: + +A1 list + + will print a parameter listing for the motor A1. In this example no parameters + were needed. There exist a number of one-word commands as well. For compatibility + reasons some commands have a form which resembles a function call such as: + +drive a1 26.54 + + This will drive motor a1 to 26.54. All commands are ASCII-strings and usually in + english. SICS is in general CASE INSENSITIVE. However, this does not hold for + parameters you have to specify. On a unix system for instance file names are case + sensitive and that had to be preserved. Commands defined in the scripting language + are lower case by convention. + Most SICS objects also hold the parameters required for their proper operation. + The general syntax for handling such parameters is: + +objectname parametername + + prints the current value of the parameter + +objectname parametername newvalue + + sets the parameter value to newvalue if you are properly authorized. + + + + + + SICS Variables + + Most of the parameters SICS uses are hidden in the objects to which they belong. + But some are separate objects of their own right and are accessible at top level. + For instance things like Title or wavelength. They share a common syntax for + changing and requesting their values. This is very simple: The command objectname + will return the value, the command objectname newvalue will change the variable. But + only if the authorisation codes match. + + + + + Commonly Used SICS Commands + The most used commands in SICS are: + + + status + + Prints SICS state. Useful for troubleshooting. + Possible return values can be: + Eager to execute commands + Scanning + Counting + Running + Halted + Note that if a command is executing which takes some time to complete + the server will return an ERROR: Busy + message when further commands are issued. + This does not take into account the state of the PLC. See + plc_ready + + + + + plc_ready + + Prints the state of the PLC. Useful for troubleshooting. + If FALSE, you won't be able to open a shutter or move a motor. It + means that you should look at the PLC panel in the instrument cabin and + see what exactly is need to be attended to and fix it e.g. Enable + Motion. You can't access operations on this panel remotely. + Possible return values can be: + FALSEInstrument not ready + TRUEInstrument ready + + + + sicslist interface drivable + + + prints a list of all drivable objects. This is more than motors and + includes virtual motors, sample environment devices and wavelength + + + + + run + device value + + run a device to a + value + runs any object listed using sicslist interface + drivable in non-blocking/asynchronous mode + + + + drive + device value + + drive a device to a + value + drives any object listed using sicslist interface + drivable in blocking/synchronous mode + + + + stopexe + device + + interrupts a drive or run + command. In the case of motors, the motor will decelerate. It won't stop + immediately, as this can cause damage to the instrument + + This will not interrupt a scan e.g. runscan. + SICS will continue to accept commands from a client + + + + + stopexe all + + interrupts all devices. In the case of motors, the motor will + decelerate. It won't stop immediately, as this can cause damage to the + instrument + + This will not interrupt a scan e.g. runscan. + SICS will continue to accept commands from a client + + + + + + runscan + scanvar start stop numpoints mode preset [force datatype + savetype] + Arguments must be in the order described. See more detail in the "Simple Scans" + chapter. + + + + scanvar + + + a drivable device, ie a motor or temperature controller etc + + + + + start + + + the start position for the scan variable + + + + + stop + + + the stop position for the scan variable + + + + + numpoints + + + the number of scan points (the start and stop positions will be + included in the scan) + + + + + mode + + + Allowed mode one of: + + time + + + unlimited + + + period + + + count + + + frame + + MONITOR_n (where n=1,2,3 ...) + If you set the mode to MONITOR_1 then the histogram server will stop + when MONITOR_1 reaches the preset number of counts which has been set + with the following preset parameter + + + + + preset + + + the acquisition duration at each scan point, this is in second if the + mode is time, or counts if the mode is count or MONITOR_n + + + + + + INT1712 3 + + interrupts a runscan command. In the case of + motors, the motor will decelerate. It won't stop immediately, as this + can cause damage to the instrument + + + + + + + SICS System Commands + + + + + sics_exitus + + A single word commands which shuts the server down. Only managers may + use this command. + + + + + wait time + + waits time seconds before the next command is executed. This does not + stop other clients from issuing commands. + + + + resetserver + + resets the server after an interrupt. + + + + sicslist + + Prints a list of all SICS objects. + + + + sicslist server + + Prints a list of all server options. + + + + sicslist sicsobject + + Prints all the metadata associated with the SICS object + sicsobject. + + + + sicslist sicsobject key + + Prints the value of the key associated with + the SICS object sicsobject. + + + + sicslist setatt sicsobject key + value + + Sets a user defined attribute with the name + key and the value + value for the SICS object + sicsobject. + + + + sicslist metadatakey + + List all unique entries for the specified metadata key. + System supplied metadata keys are: + The object class + The object interfaces implemented by SICS + e.g. sicslist type will print all the objects + classes available in the SICS server + This list may be augmented with user generated keys as defined through + using the sicslist setatt obj key value + command + + + + sicslist metadatakey value + + + List all the SICS objects which match the value for the + metadatakey given as parameters. + e.g. sicslist interface drivable will print all + objects implementing the drivable interface in the SICS server. + + + + sicslist objstatus + obj + + + Will query the current state of the SICS object + obj. This makes sense for things like motors, + counter etc. which can be run asynchronously. The result can be: + idle, fault, busy etc. + + + + sicslist match mask + + + Will print the names of all SICS objects where the name matches the + wildcard given as mask + + + + status + + A single word command which makes SICS print its current status. + Possible return values can be: + Eager to execute commands + Scanning + Counting + Running + Halted + Note that if a command is executing which takes some time to complete + the server will return an ERROR: Busy + message when further commands are issued. + + + + status interest + + initiates automatic printing of any status change in the server. This + command is primarily of interest for status display client implementors. + + + + + backup + + saves the current values of SICS variables and selected motor and + device parameters to the disk file specified as parameter. If no file + parameter is given the data is written to the system default status + backup file. The format of the file is a list of SICS commands to set + all these parameters again. The file is written on the instrument + computer relative to the path of the SICS server. This is usually + /home/INSTRUMENT/bin. + + + + backup motsave + + toggles a flag which controls saving of motor positions. If this flag is + set, commands for driving motors to the current positions are included + in the backup file. This is useful for instruments with slipping motors. + + + + + restore + + reads a file produced by the backup command described above and + restores SICS to the state it was in when the status was saved with + backup. If no file argument is given the system default file gets read. + + + + + restore listerr + + prints the list of lines which caused errors during the last restore. + + + + + killfile + + decrements the data number used for SICS file writing and thus + consequently overwrites the last datafile. This is useful when useless + data files have been created during tests. As this is critical command + in normal user operations, this command requires managers privilege. + + + + + sicsidle + + prints the number of seconds since the last invocation of a counting + or driving operation. Used in scripts. + + + + + + + + Deprecated commands + + + + dir + + DEPRECATED: use sicslist a + command which lists objects available in the SICS system. Without + any options prints a list of all objects. The list can be restricted + with: + + + + + dir var + + + DEPRECATED: use sicslistprints + all SICS primitive variables + + + + dir mot + + + DEPRECATED: use sicslistprints a + list of all motors + + + + dir inter driv + + DEPRECATED: use sicslistprints a + list of all drivable objects. This is more than motors and includes + virtual motors such as environment devices and wavelength as well. + + + + + dir inter count + + DEPRECATED: use sicslistShows + everything which can be counted upon. + + + + dir inter env + + DEPRECATED: use sicslistShows all + currently configured environment devices. + + + + dir match wildcard + + + DEPRECATED: use sicslistlists all + objects which match the wildcard string given in wildcard - + doesn't work + + + + + + + + + Logging your activity + + SICS offers not less then three different ways of logging your commands and the SICS + server’s responses + + + You may create a similar per client log file on the computer running the SICS + server through the logbook command. + + + Then there is a way to log all activity registered from users with either user + or manager privilege into a file. This means all commands which affect the + experiment regardless from which client they have been issued. This is + accomplished with the commandlog command. + + + the GetLog command receives messages from all active + clients. This allows you to view all events on your connection, and is intended + for debugging. + + + + + LogBook command + + Some users like to have all the input typed to SICS and responses collected in a + file for further review. This is implemented via the LogBook + command. LogBook is actually a wrapper around the config file + command. LogBook understands the following syntax: + + + + LogBook + + + alone prints the name of the current logfile and the status of event + logging. + + + + + LogBook file + filename + + + sets the filename to which output will be printed. Please note that + this new filename will only be in effect after restarting logging. + + + + + + LogBook on + + This command turns logging on. All commands and all answers will be + written to the file defined with the command described above. Please + note, that this command will overwrite an existing file with the same + name. + + + + + LogBook off + + + This command closes the logfile and ends logging. + + + + + + + The Commandlog + + The Commandlog is a file where all communication with clients having user or + manager privilege is logged. This log allows to retrace each step of an experiment. + This log is normally configured in the startup file or can be configured by the + instrument manager. There exists a special command, Commandlog, + which allows to control this log file. + + + + Commandlog new + filename + + + starts a new commandlog writing to + filename. Any prior files will be closed. The + log file can be found in the directory specified by the ServerOption + LogFileDir. Usually this is the log directory. + + + + + Commandlog + + + displays the status of the commandlog. + + + + + Commandlog close + + + closes the commandlog file. + + + + + Commandlog auto + + + Switches automatic log file creation on. This is normally switched on. + Log files are written to the log directory of the instrument account. + There are time stamps any hour in that file and there is a new file any + 24 hours. + + + + + Commandlog tail + n + + + prints the last n entries made into the + command log. n is optional and defaults to 20. Up to 1000 lines are held + in an internal buffer for this command. + + + + + Commandlog intervall + minutes + + + Queries and configures the intervall in + minutes at which time stamps are written to + the commandlog. + + + + It is now possible to have a script executed whenever a new log file is started. + In order to make this work a ServerOption with the name logstartfile must exist in + the instrument configuration file. The value of this option must be the full path + name of the file to execute. + Note: with the command config listen 1 you can have the output + to the command log printed into your client, too. With config listen + 0 you can switch this off again. This is useful for listening into a + running instrument. + + + + + GetLog Command + The SICS server logs all its activities to a logfile, regardless of what the user + requested. This logfile is mainly intended to help in server debugging. However, + clients may register an interest in certain server events and can have them + displayed. This facility is accessed via the GetLog command. It + needs to be stressed that this log receives messages from all active clients. + GetLog understands the following messages: + + + + GetLog All + + achieves that all output to the server logfile is also written to the + client which issued this command. + + + + GetLog Kill + + stops all logging output to the client. + + + + GetLog OutCode + + request that only certain events will be logged to the client issuing + this command. Enables only the level specified. Multiple calls are + possible. + Possible values for OutCode are: + Internal internal errors such as + memory errors etc. + Command all commands issued from any + client to the server. + HWError all errors generated by + instrument hardware. The SICS server tries hard to fix HW errors in + order to achieve stable operations and may not generate an error message + if it was able to fix the problem. This option may be very helpful when + tracking dodgy devices. + InError All input errors found on any + clients input. + Error All error messages generated by + all clients. + Status some commands send status + messages to the client invoking the command in order to monitor the + state of a scan. + Value Some commands return requested + values to a user. These messages have an output code of Value. + + + + + + + + Connection Configuration Commands + + SICS has a command for changing the user rights of the current client server + connection, control the amount of output a client receives and to specify additional + logfiles where output will be placed. All this is accessed through the following + commands: + + Config command + The config command configures various aspects of the current + client server connection. Basically three things can be manipulated: The connections + output class, the user rights associated with it, and output files. + + + config OutCode val + + sets the output code for the connection. By default all output is sent + to the client. But a graphical user interface client might want to + restrict message to only those delivering requested values and error + messages and suppressing anything else. In order to achieve this, this + command is provided. + Possible values: Values for val are + + + + + + + + This list is hierarchical. For example specifying + for val lets the + client receive all messages tagged and , but not and messages. + + + + config Rights + Username Password + + Each connection between a client and the SICS server has user rights + assocociated with it. These user rights can be configured at runtime + with the command config Rights + Username Password. If a matching entry can be + found in the servers password database new rights will be set. + + + + config File + name + + Scientists are not content with having output on the screen. In order + to check results a log of all output may be required. The command + config File + name makes all output to the client to be + written to the file specified by name as + well. The file must be a file accessible to the server, i.e. reside on + the same machine as the server. Up to 10 logfiles can be specified. + Note, that a directly connected line printer is only a special filename + in unix. + + + + config close + num + + + closes the log file denoted by num again. + + + + config list + + + lists the currently active values for outcode and user rights. + + + + config myname + + + returns the name of the connection. + + + + config myrights + + + prints the rights associated with your connection. + + + + config listen + val + + switches listening to the commandlog on or off for this conenction. If + this on, all output to the commandlog, i.e. all interesting things + happening in SICS, is printed to your connection as well. + val = is off + val = is on + + + + + + diff --git a/site_ansto/manual/dbSICSch18_programmer_overview.xml b/site_ansto/manual/dbSICSch18_programmer_overview.xml new file mode 100644 index 00000000..cb23fee6 --- /dev/null +++ b/site_ansto/manual/dbSICSch18_programmer_overview.xml @@ -0,0 +1,672 @@ + + + + The SICS programmers guide. overview.tex converted to docbook using + htlatex. SINQ specific content removed + SICS Overview + + Introduction + SICS, the SINQ Instrument Control System, meets the following specifications: + + + + Control the instrument reliably. + + + + Good remote access to the instrument via the internet. + + + + Portability across operating system platforms. + + + + Enhanced portability across instrument hardware. This means that it should + be easy to add other types of motors, counters or other hardware to the + system. + + + + Support authorization on the command and parameter modification level. + This means that certain instrument settings can be protected against random + changes by less knowledgeable users. + + + + Good maintainability and extendability. + + + + Be capable to accommodate graphical user interfaces. + + + + One code base for all instruments. + + + + Powerful macro language. + + + A suitable new system was implemented using an object oriented design which + matches the above criteria. + + + SICS Overall Design + In order to achieve the design goals stated above it was decided to divide the + system into a client server system. This means that there are at least two programs + necessary to run an instrument: a client program and a server program. The server + program, the SICS server, does all the work and implements the actual instrument + control. The SICS server usually runs on the ics (instrument control server) + computer. The client program may run on any computer on the world and implements the + user interface to the instrument. Any numbers of clients can communicate with one + SICS server. The SICS server and the clients communicate via a simple ASCII command + protocol through TCP/IP sockets. With this design good remote control through the + network is easily achieved. As clients can be implemented in any language or system + capable of handling TCP/IP the user interface and the functional aspect are well + separated. This allows for easy exchange of user interfaces by writing new clients. + + + + SICS Clients + SICS Clients implement the SICS user interface. The Gumtree client is implemented + in Java for platform independence. This is a real concern where MS Windows, + Macintosh and Unix users have to be satisfied. As many instrument scientists still + prefer the command line for interacting with instruments, the most used client is a + visual command line client. Status displays are another kind of specialized client + programs. + + + The SICS Server + The SICS server is the core component of the SICS system. The SICS server is + responsible for doing all the work in instrument control. Additionally the server + has to answer the requests of possibly multiple clients. The SICS server can be + subdivided into three subsystems: + + + The kernel + + + The SICS server kernel takes care of client multitasking and the + preservation of the proper I/O and error context for each client command + executing. + + + + SICS Object Database + + + SICS objects are software modules which represent all aspects of an + instrument: hardware devices, commands, measurement strategies and data + storage. This database of objects is initialized at server startup time + from an initialization script. + + + + The Interpreter + + + The interpreter allows to issue commands to the objects in the objects + database. + + + +
+ Schematic Representation of the SICS server structure + + + +
+
+ + The SICS Server Kernel + In more detail the SICS server kernel has the following tasks: + + + + Accept and verify client connection requests. + + + + Read and execute client commands. + + + + Maintain the I/O and error context for each client connection. + + + + Serialize data access. + + + + Serialize hardware access. + + + + Monitor HW operations. + + + + Monitor environment devices. + + + Any program serving multiple clients has the problem how to organize multiple + clients accessing the same server and how to prevent one client from reading data, + while another client is writing. The approach used for the SICS server is a + combination of polling and cooperative multitasking. This scheme is simple and can + be implemented in an operating system independent manner. One way to look at the + SICS server is as a series of tasks in a circular queue executing one after another. + The servers main loop does nothing but executing the tasks in this circular buffer + in an endless loop. There are several system tasks and one such task for each living + client connection. Thus only one task executes at any given time and data access is + efficiently serialized. + One of the main system tasks, and the one which will be always there, is the + network reader. The network reader has a list of open network connections and checks + each of them for pending requests. What happens when data is pending on an open + network port depends on the type of port: If it is the servers main connection port, + the network reader will try to accept and verify a new client connection and create + the associated data structures. If the port belongs to an open client connection the + network reader will read the command pending and put it onto a command stack + existing for each client connection. When it is time for a client task to execute, + it will fetch a command from its very own command stack and execute it. This is how + the SICS server deals with client requests. + The scheme described above relies on the fact that most SICS command need only + very little time to execute. A command needing time extensive calculations may + effectively block the server. Implementations of such commands have to take care + that control passes back to the task switching loop at regular intervals in order to + prevent the server from blocking. + Another problem in a server handling multiple client requests is how to maintain + the proper execution context for each client. This includes the clients I/O-context + (socket), the authorisation of the client and possible error conditions pending for + a client connection. SICS does this via a connection object, a special data + structure holding all the above information plus a set of functions operating on + this data structure. This connection object is passed along with many calls + throughout the whole system. + Multiple clients issuing commands to the SICS server may mean that multiple + clients might try to move motors or access other hardware in conflicting ways. As + there is only one set of instrument hardware this needs to be prevented. This is + achieved by a convention. No SICS object drives hardware directly but registers it's + request with a special object, the device executor. This device executor starts the + requested operation and reserves the hardware for the length of the operation. + During the execution of such an hardware request all other clients requests to drive + the hardware will return an error. The device executor is also responsible for + monitoring the progress of an hardware operation. It does so by adding a special + task into the system which checks the status of the operation each time this tasks + executes. When the hardware operation is finished this device executor task will + end. A special system facility allows a client task to wait for the device executor + task to end while the rest of the task queue is still executing. In this way time + intensive hardware operations can be performed by drive, count or scan commands + without blocking the whole system for other clients. + The SICS server can be configured to support another security feature, the token + system. In this scheme a client can grab control of the instrument. With the control + token grabbed, only the client which has the token may control the instrument. Any + other client may look at things in the SICS server but does not have permission to + change anything. Passing the control token requires that the client which has the + token releases the token so that another client may grab it. There exists a password + protected back door for SICS managers which allows to force the release of a control + token. + Most experiments do not happen at ambient room conditions but require some special + environment for the sample. Mostly this is temperature but it can also be magnetic + of electric fields etc. Most of such devices can regulate themselves but the data + acquisition program needs to monitor such devices. Within SICS, this is done via a + special system object, the environment monitor. A environment device, for example a + temperature controller, registers it's presence with this object. Then a special + system task will control this device when it is executing, check for possible out of + range errors and initiates the proper error handling if such a problem is + encountered. + + + + + The SICS Interpreter + When a task belonging to a client connection executes a command it will pass the + command along with the connection object to the SICS interpreter. The SICS + interpreter will then analyze the command and forward it to the appropriate SICS + object in the object database for further action. The SICS interpreter is very much + modeled after the Tcl interpreter as devised by John Ousterhout + For each SICS object visible from the interpreter there is a wrapper function. + Using the first word of the command as a key, the interpreter will locate the + objects wrapper function. If such a function is found it is passed the command + parameters, the interpreter object and the connection object for further processing. + An interface exists to add and remove commands to this interpreter very easily. Thus + the actual command list can be configured easily to match the instrument in + question, sometimes even at run time. Given the closeness of the design of the SICS + interpreter to the Tcl interpreter, the reader may not be surprised to learn that + the SICS server incorporates Tcl as its internal macro language. The internal macro + language may use Tcl commands as well as SICS commands. + + + + + SICS Objects + As already said, SICS objects implement the true functionality of SICS instrument + control. All hardware, all commands and procedures, all data handling strategies are + implemented as SICS objects. Hardware objects, for instance motors deserve some + special attention. Such objects are divided into two objects in the SICS system: A + logical hardware object and a driver object. The logical object is responsible for + implementing all the nuts and bolts of the hardware device, whereas the driver + defines a set of primitive operations on the device. The benefit of this scheme is + twofold: switching to new hardware, for instance a new type of motor, just requires + to incorporate a new driver into the system. Internally, independent from the actual + hardware, all hardware object of the same type, for example motors look the same and + can be treated the same by higher level objects. No need to rewrite a scan command + because a motor changed. + In order to live happily within the SICS system SICS object have to adhere to a + system of protocols. There are protocols for: + + + + Input/Output to the client. + + + + Error handling. + + + + Interaction with the interpreter. + + + + For identification of the object to the system at run time. + + + + For interacting with hardware, see device executor above. + + + + For checking the authorisation of the client who wants to execute the + command. + + + SICS objects have the ability to notify clients and other objects of internal + state changes. For example when a motor is driven, the motor object can be + configured to tell SICS clients or other SICS objects about his new position. + SICS uses NeXus, the upcoming standard for data exchange for neutron and xray + scattering as its raw data format. + + + + + SICS Working Examples + In order to get a better feeling for the internal working of SICS the course of a + few different requests through the SICS system is traced in this section. The + examples traced will be: + + + + A request for a new client connection. + + + + A simple command. + + + + A command to drive a motor in blocking mode. + + + + A command to drive a motor which got interrupted by the user. + + + + A command to drive a motor in non blocking mode. + + + For the whole discussion it is assumed that the main loop is running, executing + cyclically each single task registered in the server. Task switching is done by a + special system component, the task switcher. + + + + The Request for a new Client Connection + + + + + + The network reader recognizes pending data on its main server port. + + + + + The network reader accepts the connection and tries to read an + username/password pair. + + + + If such an username/password pair comes within a suitable time + interval it is checked for validity. On failure the connection is closed + again. + + + + If a valid connection has been found: A new connection object is + created, a new task for this client connection is introduced into the + system and the network reader registers a new client port to check for + pending commands. + + + + Control is passed back to the task switcher. + + + + + + + A Simple Command + + + + + + The network reader finds data pending at one of the client ports. + + + + + The network reader reads the command, splits it into single lines and + put those on top of the client connections command stack. The network + reader passes control to the task switcher. + + + + In due time the client connection task executes, inspects its command + stack, pops the command pending and forwards it together with a pointer + to itself to the SICS interpreter. + + + + The SICS interpreter inspects the first word of the command. Using + this key the interpreter finds the objects wrapper function and passes + control to that function. + + + + The object wrapper function will check further arguments, checks the + clients authorisation if appropriate for the action requested. Depending + on the checks, the wrapper function will create an error message or do + its work. + + + + This done, control passes back through the interpreter and the + connection task to the task switcher. + + + + The next task executes. + + + + + + + A "drive" Command in Blocking Mode + + + + + + The network reader finds data pending at one of the client ports. + + + + + The network reader reads the command, splits it into single lines and + put those on the top of the client connections command stack. The + network reader passes control to the task switcher. + + + + In due time the client connection task executes, inspects its command + stack, pops the command pending and forwards it together with a pointer + to itself to the SICS interpreter. + + + + The SICS interpreter inspects the first word of the command. Using + this key the interpreter finds the drive command wrapper function and + passes control to that function. + + + + The drive command wrapper function will check further arguments, + checks the clients authorisation if appropriate for the action + requested. Depending on the checks, the wrapper function will create an + error message or do its work. + + + + Assuming everything is OK, the motor is located in the system. + + + + The drive command wrapper function asks the device executor to run the + motor. + + + + The device executor verifies that nobody else is driving, then starts + the motor and grabs hardware control. The device executor also starts a + task monitoring the activity of the motor. + + + + The drive command wrapper function now enters a wait state. This means + the task switcher will execute other tasks, except the connection task + requesting the wait state. The client connection and task executing the + drive command will not be able to process further commands. + + + + The device executor task will keep on monitoring the progress of the + motor driving whenever the task switcher allows it to execute. + + + + In due time the device executor task will find that the motor finished + driving. The task will then finish executing. The clients grab of the + hardware driving permission will be released. + + + + At this stage the drive command wrapper function will awake and + continue execution. This means inspecting errors and reporting to the + client how things worked out. + + + + This done, control passes back through the interpreter and the + connection task to the task switcher. The client connection is free to + execute other commands. + + + + The next task executes. + + + + + + + A "drive" Command Interrupted + + + + + + The network reader finds data pending at one of the client ports. + + + + + The network reader reads the command, splits it into single lines and + put those on the top of the client connections command stack. The + network reader passes control to the task switcher. + + + + In due time the client connection task executes, inspects its command + stack, pops the command pending and forwards it together with a pointer + to itself to the SICS interpreter. + + + + The SICS interpreter inspects the first word of the command. Using + this key the interpreter finds the drive command wrapper function and + passes control to that function. + + + + The drive command wrapper function will check further arguments, + checks the clients authorisation if appropriate for the action + requested. Depending on the checks, the wrapper function will create an + error message or do its work. + + + + Assuming everything is OK, the motor is located in the system. + + + + The drive command wrapper function asks the device executor to run the + motor. + + + + The device executor verifies that nobody else is driving, then starts + the motor and grabs hardware control. The device executor also starts a + task monitoring the activity of the motor. + + + + The drive command wrapper function now enters a wait state. This means + the task switcher will execute other tasks, except the connection task + requesting the wait state. + + + + The device executor task will keep on monitoring the progress of the + driving of the motor when it is its turn to execute. + + + + The network reader finds a user interrupt pending. The interrupt will + be forwarded to all tasks in the system. + + + + In due time the device executor task will try to check on the progress + of the motor. It will recognize the interrupt. If appropriate the motor + will get a halt command. The task will then die. The clients grab of the + hardware driving permission will be released. + + + + At this stage the drive command wrapper function will awake and + continue execution. This means it finds the interrupt, tells the user + what he already knows: an interrupt was issued. + + + + This done, control passes back through drive command wrapper, the + interpreter and the connection task to the task switcher. + + + + The next task executes. + + + + + + + A "run" Command in Non Blocking Mode + + + + + + The network reader finds data pending at one of the client ports. + + + + + The network reader reads the command, splits it into single lines and + put those on the top of the client connections command stack. The + network reader passes control to the task switcher. + + + + In due time the client connection task executes, inspects its command + stack, pops the command pending and forwards it together with a pointer + to itself to the SICS interpreter. + + + + The SICS interpreter inspects the first word of the command. Using + this key the interpreter finds the drive command wrapper function and + passes control to that function. + + + + The "run" command wrapper function will check further arguments, + checks the clients authorisation if appropriate for the action + requested. Depending on the checks, the wrapper function will create an + error message or do its work. + + + + Assuming everything is OK, the motor is located in the system. + + + + The "run" command wrapper function asks the device executor to run the + motor. + + + + The device executor verifies that nobody else is driving, then starts + the motor and grabs hardware control. The device executor also starts a + task monitoring the activity of the motor. + + + + The run command wrapper function passes control through the + interpreter and the clients task function back to the task switcher. The + client connection can handle new commands. + + + + The device executor task will keep on monitoring the progress of the + motor driving whenever the task switcher allows it to execute. + + + + In due time the device executor task will find that the motor finished + driving. The task will then die silently. The clients grab of the + hardware driving permission will be released. Any errors however, will + be reported. + + + All this seems to be pretty complex and time consuming. But it is the + complexity needed to do so many things, especially the non blocking mode of + operation requested by users. Tests have shown that the task switcher manages + +900 cycles per second through the task list on a DigitalUnix machine and 500 + cycles per second on a pentium 2GHz machine running linux. Both data were + obtained with software simulation of hardware devices. With real SINQ hardware + these numbers drop to as low as 4 cycles per second if the hardware is slow in + responding. This shows clearly that the communication with the hardware is the + systems bottleneck and not the task switching scheme. + + +
+ \ No newline at end of file diff --git a/site_ansto/manual/dbSICSch19_interrupting_sics.xml b/site_ansto/manual/dbSICSch19_interrupting_sics.xml new file mode 100644 index 00000000..e6bcf176 --- /dev/null +++ b/site_ansto/manual/dbSICSch19_interrupting_sics.xml @@ -0,0 +1,149 @@ + + + + Interrupting SICS + Ferdi Franceschini + + 2006-09-04 15:50 + The SICS programmers guide. converted to docbook using htlatex. converted to + docbook5 by xslt in Oxygen. SINQ specific content removed + + + Safety + SICS is NOT a safety system! It will allow you to do + tasks that may damage persons and the instruments. + + + DO use the STAR + principle. STOP. THINK. ACT. REVIEW + Familiarise yourself the location of the Emergency + Stop buttons located near the cabin exit, or in several places within the instrument + enclosure. + Familiarise yourself with the instrument and its safe + operation. + DO NOT do anything with SICS that may risk damage to + persons or the instrument. + DO NOT rely on these commands to stop motors or close + shutters. If in any doubt, use the Emergency Stop button. + The commands in this chapter may fail for a variety of reasons. + + SICS has crashed + + + Your network connection to the SICS is blocked, due to network congestion + or failure + + + The motor controller is no longer accepting connections or has a rogue + process running + + + + + stopexe command + The stopexe command will stop drivable objects. It will NOT stop + scans or batch files. For that you'll have to use an interrupt as found in the next + section. + + + + stopexe + device + + interrupts a drive or run + command. In the case of motors, the motor will decelerate. It won't stop + immediately, as this can cause damage to the instrument + + This will not interrupt a scan e.g. runscan. + SICS will continue to accept commands from a client + + + + + stopexe all + + interrupts all devices. In the case of motors, the motor will + decelerate. It won't stop immediately, as this can cause damage to the + instrument + + This will not interrupt a scan e.g. runscan. + SICS will continue to accept commands from a client + + + + + + + + + Interrupting SICS + + On occasion, you as the user, or a SICS object may come to the conclusion that an + error is so bad that the measurement needs to be stopped. Clearly a means is needed to + communicate this to upper level code. This means is setting an interrupt on the + connection. The current active interrupt is located at the connection object (note for + SICS programmers, this can be retrieved with SCGetInterrupt and set with SCSetInterrupt. + Interrupt codes are defined in interrupt.h). These codes are ordered into a hierarchy + + + + + INT1712 0 + + Continue. Everything is just fine. eContinue + + + + INT1712 1 + + Abort Operation. + Stop the current scan point or whatever is done, but do not stop + altogether. eAbortOperation + + + + INT1712 2 + + Abort Scan. + Abort the current scan, but continue processing of further commands in + buffers or command files. eAbortScan + + + + INT1712 3 + + Abort Batch. + Aborts everything, operations, scans and batch processing and leaves the + system ready to enter new commands. eAbortBatch + + + + INT1712 4 + + Halt System. + As eAbortBatch, but lock the system. eHaltSystem + + + + INT1712 5 + + Free System + Unlocks a system halted with eHaltSystem. eFreeSystem + + + + INT1712 6 + + + For internal usage only + + Makes the SICS server run down and exit. . + + + + Higher level SICS objects may come to the conclusion that the error reported by lower + level code is actually not that critical and clear any pending interrupts by setting the + interrupt code to eContinue and thus consume the interrupt. + + diff --git a/site_ansto/manual/dbSICSch1_intro.xml b/site_ansto/manual/dbSICSch1_intro.xml new file mode 100644 index 00000000..5ef2d6de --- /dev/null +++ b/site_ansto/manual/dbSICSch1_intro.xml @@ -0,0 +1,260 @@ + + + + <application>SICS</application> - The Instrument Control Server + Ferdi Franceschini + + 2007-02-28 18:29 + + + Safety + SICS is NOT a safety system! It will allow you to do + tasks that may damage persons and the instruments. + + + DO use the STAR + principle. STOP. THINK. ACT. REVIEW + Familiarise yourself the location of the Emergency + Stop buttons located near the cabin exit, or in several places within the instrument + enclosure. + Familiarise yourself with the instrument and its safe + operation. + DO NOT do anything with SICS that may risk damage to + persons or the instrument. + DO NOT rely on these commands to stop motors or close + shutters. If in any doubt, use the Emergency Stop button. + The commands in this chapter may fail for a variety of reasons. + + SICS has crashed + + + Your network connection to the SICS is blocked, due to network congestion + or failure + + + The motor controller is no longer accepting connections or has a rogue + process running + + + + + What is SICS + Neutron scattering experiments require control of motors for instrument configuration, + control of histogram memory for counting neutrons, and control of sample environment. + SICS is a program that accepts human readable commands, and converts these to commands + that devices understand. For simplicity, much of the control for an experiment is done + in a sequence (synchronously), requiring that an operation completes successfully before + the next is commenced. SICS can also be used asynchronously, but more care has to be + exercised by the operator to ensure the desired result. + Instrument control is based on a client server architecture, each instrument has a + dedicated server, called SICS,  which receives commands from + client applications and then executes them by issuing control sequences to the + hardware.  SICS was originally developed at PSI to control the SINQ + spallation source instruments.  Drivers and site specific extensions have been developed + at ANSTO to control and provide status information for motors, sample environment and + histogrammed neutron event data from the detectors. + + Driving a device synchronously is done using the drive command. The + device could be a motor or sample environment e.g. temperature controller. + Driving a device asynchronously is done using the run command. + Stopping the device is done using the stopexe command. + Counting of histogrammed neutron events is done using the histmem + command. + Running scans that are a linear sequence of driving, counting and file saving tasks is + done using the runscan command. + Creating a new file is done using the newfile command, and saving + data to the file is done using the save command. + Detail for using each of these commands is provided in the next chapter. SICS provides + many other functions, but we won't cloud the issue at this stage. + + + Should I read further? + In general, the Bragg Institute instrument scientists manage SICS for the instrument + users. SICS should be running when you come to the instrument, and you should only need + to run the Gumtree program, which is a graphical user interface. You should read further if you think that SICS is not + running and you want to start it, you want to command a device directly with SICS (the + first half of this manual), or you would like to change the instrument configuration + (the second half). + + + Where is SICS? + SICS runs on an ICS computer (instrument control server). All ICS computers run the + Linux operating system, and have a name that looks like ics1-echidna.nbi.ansto.gov.au. + If you have an account on the NBI network, you can use that username and password to + login. You must login using ssh from a unix computer, or using an ssh + client on a Microsoft Windows computer like + putty or + F-Secure + + + Starting and stopping <application>SICS</application> using + <command>runsics</command> + To control the instrument, the SICS software must be running on the instrument control + computer. First, check to see if SICS is already running by calling the + runsics + command as shown below. Note: the "echidna@ics1-echidna:~>" is + just the command line prompt. + +echidna@ics1-echidna:~> runsics status +SICServer running +SICS script validator running + + This example shows SICS is already running. In this case, you should proceed to login + to SICS. + If the reply is + +echidna@ics1-echidna:~> runsics status +SICServer NOT running +SICS script validator NOT running + + then use the runsics + command + +echidna@ics1-echidna:~> runsics start + +Starting SICS +29087 +SUCCESS + + +Starting SICS Script Validator +29091 +SUCCESS + + + + Login to SICS + Most users won't want to login to SICS. However, if you do + need to get to the SICS command line, then use the + sicsclient command at the Linux prompt. + +echidna@ics1-echidna:~> sicsclient +OK + + Now you'll have to login to SICS with your and + . The role is , or + , and the instrument scientist will provide you with the + password. + +sics_username sics_password +Login OK + + When a correct username and password is entered, SICS announces that the login was + successful. SICS commands can now be entered. + + + Starting <application>SICS</application> from the command line + To start SICS you have to log on to the instrument control + computer and then + + cd /usr/local/sics/server + + and launch the server in the background with a command similar to the one shown below + + cd /usr/local/sics/server + + + nohup ./SICServer xxx_configuration.tcl & + + where xxx is the instrument name. + + The '&' is important, it runs the server in the + background, nohup logs output from SICS to a file called + nohup.out and ensures that SICS continues running when + you logout. The .tcl file specified on the command line is the configuration file + for your instrument, replace the xxx with your + instrument's ID.  The configuration file may source other .tcl files. + + + + The validation server and synchronisation with the instrument control server + You might be thinking, "What is the validation server used for?". You don't want to + run a script on the instrument control server that might be syntactically incorrect, or + hits the limits of the hardware. The validation server runs to allow scripts to be + tested without moving any hardware. The validation server runs with hardware that is + simulated in software. + The validation server has its own set of configuration files. It is important to keep + these files synchronised with the instrument control server, however there are times you + may want to have a different configuration on the validation server. + To synchronise the validation server + > socat READLINE,history=$HOME/history tcp4:127.0.0.1:60013,crlf + Login to the validation server using sics_username and + sics_password + Synchronising is slow but you can get feedback if you issue the following sequence of + commands when you synchronise + getlog command + getlog value + sync + You will see something like the following feedback on the validator connection as the + sync command is running, + + 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 + + + + <application>SICS</application> Directory Structure + SICS is installed on the /usr/local/sics/ directory of the + instrument control computer.  It has the following subdirectories + + + + /server + + + This contains the SICServer and the *.tcl configuration files + + + + + /data + + + Data files are stored here + + + + + /log + + + Server log files are stored here along with the status.tcl file.  The + status.tcl file preserves variable settings and some parameter values from + the last session with the SICServer + + + + + /tmp + + + The server keeps temporary files here + + + + + + <application>SICS</application> Configuration + SICS is configured via *.tcl files which initialise the + command objects which clients use to control the hardware.  Also,  the server's + functionality can be extended by defining new commands in the configuration files, we + can do this because SICS embeds a Tcl interpreter (hence the .tcl + extension). + + diff --git a/site_ansto/manual/dbSICSch20_file_commands.xml b/site_ansto/manual/dbSICSch20_file_commands.xml new file mode 100644 index 00000000..0cda526c --- /dev/null +++ b/site_ansto/manual/dbSICSch20_file_commands.xml @@ -0,0 +1,281 @@ + + + + File commands + Ferdi Franceschini + + + + + + + Introduction + + Filenames + SICS provides methods to create and save files. You can create a single file, and + save either a single dataset, or multiple datasets to the one file. You can also + create and manage collections of files, and save single or multiple datasets to + files in the collection + SICS automatically creates the filename. The filenames have the form + + xxxnnnnnnn.nx.hdf + + where xxx is a 3 letter abbreviation of the instrument + QKK - quokka + ECH - echidna + WOM - wombat + KOW - kowari + PLA - platypus + TPN - taipan + nnnnnnn is a 7 numeral sequence number, starting at 0000000 when + the facility commenced operation, and is automatically incremented + by SICS. + The file /usr/local/sics/DataNumber is used to keep track of the + number. DO NOT edit this file. + .nx denotes that the file is a NeXus file. + .hdf denotes the file is an hdf5 (binary) file. + + + + e.g. QKK0001234.nx.hdf + + + File Format. NeXus + Files are saved using the ANSTO interpretation of the NeXus standard. + SICS support both the xml and hdf5 form. For performance of reading and writing, + by default we write hdf5 binary. + SICS can also be configured to write xml. This is set in + nxscripts_common_1.tcl. Set the file,format element of the + state array to "xml" + + + File Content + This section will give only a very brief overview of NeXus. Further reading can be + found at the NeXus webite, + www.nexusformat.org + + NeXus is a hierachical data format; data is saved in groups and these groups live + under entries. It a similar structure to directories on a file system. We have made + a policy decision at the Bragg Institute to have only one entry per file. This entry + may contain a variable parameter or scan, where e.g. temperature is varied. If you + use the runscan command, histogram data is taken at discrete + temperatures. Temperature will be a vector in the file, and the histogram data may + be a data cube of 2 dimensional x,y or 3 dimensional x,y,t histogram arrays. + There are 4 groups in NeXus. User, Sample, Instrument and Data. SICS will write + the data it acquires to one of these groups. The content that is saved, and where in + the file it is saved to is controlled by configuration files. + /usr/local/sics/server/config/nexus contains + *.dic dictionary files. These files tell SICS how to map a SICS + object to a location in a NeXus file, and what type the data will be, and its + attributes e.g units. Below is an example from nexus.dic + + +samphi = /entry1,NXentry/sample,NXsample/SDS sample_phi +-type NX_FLOAT32 -rank 1 -dim {-1} +-attr {units,degrees} -attr {long_name,sample_phi} + + + Changes to configurations are done by the facility. Dictionaries can be checked + with check_instdict.tcl and check_sicsobj_attributes.tcl. + By default, if the SICS object exists and there is an entry in the dictionary, + then it will be saved to the data file. There is a second hierarchy of SICS objects + which is used by Gumtree for control. This is called hipadaba. We won't go into + detail about hipadaba in this manual, but it is important for this discussion to + know how hipadaba controls saving of SICS objects. Hipadaba has the same structure + as NeXus. The hipadaba tree when initially created by SICS is a complete NeXus tree, + which is then pruned to contain only those nodes that exist for that instrument. + This allows any node to be added to nexus.dic for an instrument + without having to change hipadaba. There are dictionary files for hipadaba found at + /usr/local/sics/server/config/hipadaba/. In general, there + is no instrument specific information in these files. Every node in hipadaba has + data and nxsave attributes. By default, nxsave is set to true, and if the node + contains data, data is set to true. If either of these is set to false, then the + data will not be saved. + + + File Locations + A mutable (read-write) copy of the file is made a few minutes after the + experiment, and is available at e.g. + /experiments/wombat/data/proposal/01234 where + 01234 is the proposal number for the current + experiment. An archive of the file is made to the cycle directory + e.g. /experiments/wombat/data/cycle/040 where + 040 is the reactor cycle number. + File are written to + /usr/local/sics/data of the + ics1-australian_fauna computer. This path is + configured in server_config.tcl by setting the + SicsDataPath variable. Posix symbolic links are used to link + the directory to the appropriate directory on filer.nbi.ansto.gov.au, under the + /experiments mount point e.g + /experiments/wombat/data/current. You can mount this + directory on the MS Windows machine + dav1-australian_fauna. Files in this location are + read-only. The facility requires an immutable version of the data. + + + + File Commands. Single Files + + newfile command + + + + newfile + file_type + scratch + + creates a new file of type file_type + ready to write to. The command does write any information to disk. + To save data, use the save command. + You can only hold a reference to one file. If you need to + reference a number of files, then use newfile_collection. + Only use the optional scratch if you want to + write data to a scratch file. The file will be overwritten with the + next invocation of this option + file_type may have the following + values: + Saves data from the configured beam + monitors, histogram memory data is not saved. + Saves histogram total time data and + beam monitor data. + Saves histogram x data and beam + monitor data. + Saves histogram x,t data and beam + monitor data. + Saves histogram y data and beam + monitor data. + Saves histogram y,t data and beam + monitor data. + Saves histogram x,y data and beam + monitor data. + Saves histogram total x,y,t data + and beam monitor data. + + + + + + + save command + + + + save + index + + + saves data to disk. + index is the index of data to be saved, + starting with 0. To save your first slice of data you would save 0. + This provides you with a complete NeXus file. You may be doing After + you acquire you next slice of data, you would save 1, then save 2 + etc. + + + + + + + Other single file commands + + + + killfile + + decrements the data number used for SICS file writing and thus + consequently overwrites the last datafile. This is useful when + useless data files have been created during tests. As this is + critical command in normal user operations, this command requires + managers privilege. + + + + + + + + File Collection Commands + + newfile_collection command + + + + newfile_collection + + {sample1 sample2} + + file_type + + save_type + + + Whereas newfile creates one file, newfile_collection will create + as many files as there are labels. The command does write any + information to disk. + To save data, use the save_collection command + Example: You have a multi-sample changer or robot. You want to do + a measurement on each sample at multiple temperatures. Your + experimental sequence has the sample changer as the fastest varying + parameter (inner loop), and temperature change as the slowest + varying parameter (outer loop). You want to record all temperature + data for a sample in one file. + + save_type may have the following values: + + writes to a normal data file + writes to a scratch file. The file will + be overwritten with the next invocation of this option. Used mainly + for testing. + + file_type may have the following values: + Saves data from the configured beam + monitors, histogram memory data is not saved. + Saves histogram total time data and + beam monitor data. + Saves histogram x data and beam + monitor data. + Saves histogram x,t data and beam + monitor data. + Saves histogram y data and beam + monitor data. + Saves histogram y,t data and beam + monitor data. + Saves histogram x,y data and beam + monitor data. + Saves histogram total x,y,t data + and beam monitor data. + + + + + + + save_collection command + + + + save_collection + + val + -labels + sample1 + + saves data to disk within a collection (multiple files) + -indexval is the + index of data to be saved, starting with 0. To save your first slice + of data you would save 0. This provides you with a complete NeXus + file. You may be doing After you acquire you next slice of data, you + would save 1, then save 2 etc. + -labels + sample1 will save to the file referenced + by the label sample1. You would put all + data relating to a sample into this one file. + + + + + + + diff --git a/site_ansto/manual/dbSICSch21_histogram_configuration.xml b/site_ansto/manual/dbSICSch21_histogram_configuration.xml new file mode 100644 index 00000000..072f399b --- /dev/null +++ b/site_ansto/manual/dbSICSch21_histogram_configuration.xml @@ -0,0 +1,46 @@ + + + + Histogram Configuration - under construction + Ferdi Franceschini + + 2008-01-25 09:46 + + + + http://gumtree:9080/nbicms/Members/ffr/journals/folder.2008-01-24.4596726577/histogram-memory/ + Histogram Configuration + Histograms are the most complex objects in SICS, and when doing configuration you must + have + The following uploads the text in the hmconfigscript dictionary variable as well as + the other dictionary variables to the histogram server. + +hmm configure init 1 +hmm init + The following just uploads the values in the dictionary variables to the histogram + server + +hmm configure init 0 +hmm init + The following simply updates the values of the dictionary variables listed in the + http://localhost:8080/admin/textstatus.egi page. + +hmm configure statuscheck true +hmm stop +hmm configure statuscheck false + Setting "statuscheck" to false prevents the dictionary variables from being updated + every time there is a start, pause or stop. + + + OAT_TABLE + The oat_table is setup in the instrument specific configuration, the current default + for all instruments is to set one large time bin with the upper bin boundary equal to + the frame period (ie 20msec). + + Histogram Data Axes + The x, y, theta, and time axes are calculated from the spatial and temporal bin + boundaries, and a scale factor and offset. + + + diff --git a/site_ansto/manual/dbSICSch22_installation.xml b/site_ansto/manual/dbSICSch22_installation.xml new file mode 100644 index 00000000..53deafcd --- /dev/null +++ b/site_ansto/manual/dbSICSch22_installation.xml @@ -0,0 +1,266 @@ + + + + SICS installation + Ferdi Franceschini + + 2008-01-25 09:46 + + + SICS installation + + Requirements + For your operating system, you must have these software components installed. The + links here are not maintained. They may or may not be up to date, and may or may not + link with the version of SICS you are trying to compile. The standard install + operating system for ANSTO is SuSE linux, version 9.2, 10, 10.2 + + HDF5 + from http://www.hdfgroup.org/HDF5/ + + + JSON-C from http://www.json.org/ + + mxml from http://mxml.sourceforge.net/ + + tcl8.4 - Get this from the RPMs for your operating system. Also requires + tcl-devel, zlib, zlib-devel, libghttp and libghttp-devel RPMs and tDOM + + + Getting SICS at ANSTO + To get sics you must have an account on boson and you need to belong to the nbip + group.  If you are using the command line cvs client you need to set the CVS_RSH + environment variable to ssh.  You can then check sics out with the following + command, + cvs -d:ext:uname@boson.ansto.gov.au:/projects/nbip/cvsroot co sics + where uname is your username on boson. + + + Getting a Release Branch + cvs -d:ext:uname@boson.ansto.gov.au:/projects/nbip/cvsroot +co -rRELEASE-<N>_0-BRANCH sics + where <N> is the branch number. + + + Compiling sics + After checking out sics cd to the site_ansto directory and + run make. This will build a SICServer binary + in the site_ansto directory. + + The build system is a work in progress.  I have manage to reduce it down to + two files a Makefile, and  make_gen_variables which is essentially a copy of the + variables in the sics core make_gen file.  The goal is to extract the variables + from make_gen and get rid of make_gen _variables. + + + + + http://gumtree:9080/nbicms/sics-control-system/ansto-sics/sics-configuration-and-deployment + Ferdi Franceschini + 2007-03-21 15:29 + Instrument Configuration and Deployment + + TODO + Create motion control checklists for Wombat, Koala, Kowari, and Platypus based on + the Echidna Motion Control Functional Test Checklist + + + SICS Configuration Source Files + site_ansto/instrument is the toplevel directory for the + instrument configuration source files along with the shared configuration + information, deployment scripts, test code and scaffolding. + The top level of the site_ansto/instrument directory contains + the common instrument configuration files.  All of the instruments depend on the + following files: + server_config.tcl defines paths, server options and variables + for all of the instruments.  + util/utility.tcl file contains some tcl procs which are + useful for defining instrument configurations. + /config directory contains task specific configuration files + which may be shared by two or more instruments. It has the following structure: + config +|-- counter +|-- hipadaba +|-- hmm +|-- nexus +`-- scan + The instrument specific configuration files are stored in subdirectories of + site_ansto/instrument name as follows: + + hipd (wombat) + hrpd (echidna) + pas (pelican) + qld (koala) + reflectometer (platypus) + rsd (kowari) + sans (quokka) + tas (taipan) + + TODO We should really rename these directories, but + doing that in CVS requires a cool clear head and a calm steady hand. + Each of the instrument specific subdirectories should have the following layout: + <inst> + |-- DMC2280 + |-- config + | |-- counter + | |-- hipadaba + | |-- hmm + | |-- nexus + | `-- scan + |-- script_validator + | `-- config + | |-- counter + | |-- hmm + | `-- motors + `-- util + `-- dmc2280 + Each <inst> directory contains the following files + + + sics_ports.tcl + + List of port names used by the SICS server for this instrument + + + extraconfig.tcl + + In the future we will be able to override values recorded in the + status.tcl file by setting them here. + + + MANIFEST.TXT + + List of files and subdirectories to be deployed to the ics1-<inst> + computer. + + + Makefile + + Generates a simulated motor configuration file for the script validator + during deployment. + + + <instrument-name>_configuration.tcl + + This is the main configuration file, it sources all the other + configuration files required to setup an instrument. + + + The <inst> directories are broken down into the following subdirectories, + + + DMC2280 + + Contains the programs which setup and run on the Galil motion + controllers. They will typically define subroutines and interrupt + handlers for limit switches, and motors. + + + + config + + Contains subdirectories which organise the instrument configuration + files by task.  As well as the following files: + + + + INSTCFCOMMON.TXT + + Lists common configuration files that this instrument depends + on. + + + + Makefile + + Composes nexus dictionary files into task specific dictionaries for an + instrument + + + + script_validator + + The port numbers and simulation drivers required by the script + validator are defined here. + + + + util + + Maintenence and diagnostic utilities which can be run independently of + SICS can be found here. + + + + + + + Deploying SICS + + Deploying to the TEST_SICS directory on bluegum from a working directory on + bluegum + The root directory for SICS for each instrument on bluegum is + /usr/local/TEST_SICS/<inst> + + Under each of these root directories is the following directory structure: + / +|-- batch +|-- data +|-- log +|-- script_validator +| |-- batch +| |-- data +| |-- log +| |-- server +| |-- tmp +|-- server +`-- tmp + + For a fresh install you have to create these directories. + Go to the source code directory site_ansto + cd instrument +./deploySICS.sh test/kowari localhost /usr/local/TEST_SICS/kowari/ + Edit /etc/services + Add lines for the motor services e.g. + +pmc1-kowari 62335/tcp +pmc2-kowari 62336/tcp +pmc3-kowari 62337/tcp +pmc4-kowari 62338/tcp + + After deploying a test setup you will need to configure the fake motors for SICS + cd /usr/local/TEST_SICS/kowari/fakeDMC +./mkSimAxes.tcl kowari + Then you can run the fake motors in separate terminals + ./cont.tcl -cont 1 -port pmc1-kowari +./cont.tcl -cont 2 -port pmc2-kowari +./cont.tcl -cont 3 -port pmc3-kowari +./cont.tcl -cont 4 -port pmc4-kowari + Then create the DataNumber file and launch SICS + cd /usr/local/TEST_SICS/kowari/sics/ +touch data/DataNumber +cd server +./SICServer kowari_configuration.tcl + + + Deploying to ics1-dev.nbi.ansto.gov.au and ics1-test.nbi.ansto.gov.au + The instrument dev and test computers must have the information in the + sics_test_hosts and the + sics_test_services files under + the site_ansto/instrument/TEST_SICS/ directory appended to + the services and hosts files.  This will allow us to run multiple instances of sics + on the test computer without changing the instrument configuration files. + cd instrument +./deploySICS.sh echidna/test ics1-dev.nbi.ansto.gov.au + + + Deploying to an instrument control server + cd instrument +./deploySICS.sh echidna + + + diff --git a/site_ansto/manual/dbSICSch23_extraconfig.xml b/site_ansto/manual/dbSICSch23_extraconfig.xml new file mode 100644 index 00000000..f9c4723f --- /dev/null +++ b/site_ansto/manual/dbSICSch23_extraconfig.xml @@ -0,0 +1,117 @@ + + + + Personal configuration + Nick Hauser + + + + + Personalised configuration. extraconfig.tcl + You can add your own variables and functions to sics. Start by opening + /usr/local/sics/extraconfig.tcl in a text editor (this is on the ics computer). + The purpose of the extraconfig.tcl file is to allow instrument scientists and users to + create personal configurations, that can be stored in the user's home directory and + reused later if required. It also allows users to experiment with additional features, + that once proven, can be migrated to an appropriate configuration file + Edit the file using the patterns provided below. + For the changes to take effect, you'll need to save the file and stop and restart + sics. + + Adding a procedure + To add a procedure to SICS. Say you want to add the procedure + movdet to sics and set by a user, + + proc movedet {pos} { + + drive dhv1 600 + drive det $pos + drive dhv1 2350 + } + publish movedet user + + This function will drive the high voltage controller to 600 volts, move the motor + det to position pos and drive the + high voltage controller to 2350 volts + publish is a SICS manager command which makes a Tcl command or + procedure visible in the SICS interpreter. publish provides a + special wrapper for a Tcl command, which first checks the user rights of the client + connection which wants to execute the Tcl command. If the user rights are + appropriate the command is invoked in the Tcl–interpreter. + + + Adding a variable + To add a variable, use the mkVar procedure. + mkVar is a Tcl wrapper for the SICS function + VarMake. These 2 functions share the same first 3 parameters. + To view these settings, use hlistprop + name + + ::utility::mkVar + name type access_privilege long_name nxsave class control + data + + + + name + + name on the sics command line + + + + type + + text, int, float + + + + access_privilege + + spy, user, manager, internal, readonly + + + + long_name + + long name + + + + nxsave + + saves to NeXus file + true, false (default). + + + + class + + node under which this variable is saved and controlled + e.g. instrument, sample + + + + control + + will appear in the Gumtree table tree if this is set to true + true, false (default) + + + + data + + will appear in the data node of NeXus file if this is set to true. + nxsave must also be set to true. + true, false (default) + + + + Example + ::utility::mkVar starttime Text user start true experiment true true + creates a variable called starttime, which is a text variable requiring user + privilege to set. The long_name is start, it will be saved to the NeXus file under + the 'experiment' node and appear in the Gumtree table tree. + + + diff --git a/site_ansto/manual/dbSICSch24_UB_matrix.xml b/site_ansto/manual/dbSICSch24_UB_matrix.xml new file mode 100644 index 00000000..77e628cc --- /dev/null +++ b/site_ansto/manual/dbSICSch24_UB_matrix.xml @@ -0,0 +1,408 @@ + + + + TASUB: The Triple Axis Calculation Module + Mark Koennecke + + + + + TASUB: The Triple Axis Calculation Module + On a triple axis instrument the parameters incoming energy, Q-position in 3D and + analyzed energy have to be changed frequently. These calculations are the task of the + TASUB module. This module uses the calculus described by M. Lumsden, J. L. Robertson and + M. Yethiraj in J. Appl. Cryst. (2005), 38, 405-411. The special feature of this + algorithm is that the tilt cradles of the sample table are used to help during alignment + and in order to drive out of plane (within the limits of the tilt cradles). For + alignment, two reflections must be located and their angles and Q-E parameters entered + into the module. Then a UB matrix can be calculated. With a UB matrix, the Q-E variables + ei, ki, ef, kf, en, qh, qk and ql can be driven as virtual motors in SICS. + + + Commands understood by Tasub + + Monochromator and Analyzer Parameters + Incident and scattered energies are defined by monochromator crystals. In order + for the calculations to work, some parameters need to be configured. Monochromator + and analyzer parameters can be accessed with the prefixes: The parameter syntax used + is as usual: giving only the parameter name queries the value, giving the parameter + plus a value sets the parameter to the new value. The following parameters are + supported: + + + tasub mono + + + Monochromator properties + + + + tasub ana + + + Analyser properties + + + + Allowed properties for tasub mono and + tasub ana one of: + + + dd + + The d-spacing of the reflection used + + + + ss + + + The scattering sense, 1 or -1 are possible. + + + + hb1 + + + First parameter for the calculation of the horizontal curvature + + + + + hb2 + + Second parameter for the calculation of the horizontal curvature + + + + + vb1 + + + First parameter for the calculation of the vertical curvature + + + + vb2 + + + Second parameter for the calculation of the vertical curvature + + + + Examples: + + + tasub mono dd + + will print the current d-spacing of the monochromator + + + + tasub mono dd 4.3 + + + Will set the d-spacing of the monochromator to 4.3 + + + + tasub mono ss + + will print the scattering sense of the monochromator + + + + tasub ana ss + + will print the scattering sense of the analyser + + + + tasub ana ss 1 + + will set the scattering sense of the analyser to 1 + + + + + + Cell Parameters + In order for the UB matrix calculation to work, the cell constants must be known: + + tasub cell + + This command prints the current cell parameters. + + + + tasub cell a b c alpha beta + gamma + + + This command sets the new cell parameters. All six values must be + given. + + + + + + Reflection Management + In order to calculate a UB matrix a list of reflections must be maintained. This + is done with the commands in this section: + + tasub clear + + Clears all reflections except the first reflection from the + reflection list + + + + tasub clear all + + Clears all reflections + + + + tasub listref + + + Prints a list of all known reflections. + + + + tasub del num + + + Delete the reflection number num from the list + + + + tasub addref qh qk ql + + Adds a reflection to the list. The indices of the reflections are + given. The angles and energy values are read from the motors. Use + this command only when the instrument is positioned right on a + reflection. + + + + tasub addref qh qk ql a3 a4 sgu sgl ei + ef + + Add a new reflection to the list. Besides the indices all angles + are given: a3, the sample rotation, a4, sample two theta, sgu, upper + tilt cradle, sgl, lower tilt cradle and incoming energy ei and + outgoing energy ef. + + + + tasub addauxref qh qk ql + + + Adds an auxiliary reflection with indices qh, qk, ql to the list. + A4 is calculated from cell constants. A3 is either left alone or is + calculated to have the correct angular difference to a previous + reflection. This is a help for setting up the instrument or running + powder mode. When a UB has been generated from auxiliary + reflections, a3, sgu and sgl angles will be incorrect. + + + + tasub repref id qh qk ql a3 a4 sgu sgl + ei ef + + Modifies the reflection with id id to have the values given. + + + + + + + Calculations + This section covers the parameters and commands to use to make the module do + calculations for you. + + tasub const ki | kf | elastic + + Sets a parameter to determine if KI or KF is fixed when the energy + transfer en is being driven. Allowed values: ki, kf, elastic. In + elastic mode the analyzer is disregarded. This is useful for two + circle diffractometers. + + + + tasub const + + Prints if ki or kf is fixed. + + + + tasub ss + + Prints the sample scattering sense. + + + + tasub ss 1 | -1 + + Sets the sample scattering sense. Allowed values are either 1 or + -1. + + + + tasub silent 0 | 1 + + Prints or sets the silent flag. If this is 0, the messages Driving + motor .. from .. to .. are suppressed. + + + + tasub outofplane 0 | 1 + + Prints or sets the outofplane flag. If this flag is 0, the + instrument will stay in the scattering plane and not move out of it. + This is here in order to protect those bloody magnets which cannot + be tilted. + + + + tasub makeub r1 r2 + + Calculate a new UB matrix from the current cell constants and the + entries r1 and r2 in the reflection list. r1 and r2 are integer + numbers. This command will not only print the new UB matrix but also + the results of various back and forth calculations performed with + the new UB matrix. This can be inspected in order to check the new + UB. WARNING: The calculation will go wrong if the scattering sense + at the sample has changed since the reflections used for the UB + matrix determination have been entered. + + + + tasub listub + + prints the current UB matrix. + + + + tasub calcang qh qk ql ei ef + + + Will calculate new angles for the Q-E position specified. The + angles will be printed in the order: monochromator two theta, sample + rotation, sample two theta, lower tilt cradle, upper tilt cradle and + analyzer two theta. + + + + tasub calcqe a2 a3 a4 sgu sgl a6 + + + Calculates and prints the Q-E position from the angles given: a2 = + monochromator two theta, a3 = sample rotation, a4 = sample tow + theta, sgu = upper tilt cradle, sgl = lower tilt cradle and a6 = + analyzer two theta. The Q-E position is printed in the sequence: qh, + qk, ql, ei, ef. + + + + + + Virtual Motors + The tasub module also installs the following virtual motors into SICS: ei, ki, + qh, qk, ql, en, ef, kf and qm. All these motors can be used in SICS drive, run or + scan commands like real motors. Driving them triggers a recalculation of angles and + the drives the real motors to appropriate values. The virtual motors have a very + limited command set (shown at the example of qh): + + qh + + + The name of the motor alone will print its current position. + + + + + qh + target + + + This will print the last requested target position for this + virtual motor. + + + + The virtual motor qm implements powder mode. In + this mode, only the sample two theta and energy motors will be driven, sample + rotation and tilt cradles will be left at their respective positions. This is + commonly used to analyze the energy transfer of powder samples. + There are other important command: + + tasub update + + This command will force a recalculation of the current Q-E + position for the virtual motors from angles. Normally tasub will + take care of this. However, if any of the angle motors are moved + directly or manually, this command might be required. The SICS dr + wrapper command, however, even takes care of this. + + + + + tasub updatetargets + + + This command makes the QE targets match the current position. This + is useful after initialization in the instrument.tcl file. + + + + + + Internal Commands + The tasub module supports some more commands which are used by SICS in order to + restore the tasub configuration between instantiations of SICS. These commands are + documented here for the sake of completeness: + + tasub setub ub11 ub12 ub13 ub21 ub22 + ub23 ub31 ub32 ub33 + + Sets the UB matrix. Nine values are required. + + + + tasub setnormal n1 n2 n3 + + + This command sets the plane normal which is required in + calculations. Normally this plane normal is automatically generated + during the calculation of the UB matrix. + + + + tasub settarget qh qk ql qm ki kf + + + Sets the Q-E target. + + + + tasub + r1 qh qk ql a3 a4 sgu sgl ki kf + + + + + + tasub r2 qh qk ql a3 a4 sgu sgl ki kf + + + These commands set the values for the two reflections used for + generating the UB matrix. + + + + + + diff --git a/site_ansto/manual/dbSICSch25_rheometer.xml b/site_ansto/manual/dbSICSch25_rheometer.xml new file mode 100644 index 00000000..0a1197b0 --- /dev/null +++ b/site_ansto/manual/dbSICSch25_rheometer.xml @@ -0,0 +1,137 @@ + + + + Rheometer + Ferdi Franceschini + + + + + Configuration + The driver is loaded into SICS by adding the following line in the + /usr/local/sics/extraconfig.tcl file + + + + add_rheo name IP tol settletime PORT + + name of parameter from rheometer, use + either rhSpeed or rhTorque for + consistency with existing data files + IP is the address of Moxa box + tol is the tolerance of + name + settletime is the time to wait in seconds + before checking that we have reached the set value of + name. + + + + + add_rheo rhSpeed ca3-quokka 0.01 5 4001 + This will create a driver with a tolerance of 0.01 for the speed, with a settle time + of 5 seconds. + The rheometer speed and torque will be available under the /sample + group and will be saved in the data file as ../sample/rhTorque and + ../sample/rhSpeed. + A standard HISTOGRAM_XY file (ie a QKKxxxx.nx.hdf XY data file)will be created by + default. Use newfile to specify other filetypes. + + + Commands + The rheometer driver in SICS starts an acquisition on the histogram memory when the + rheometer matches the speeds in a list of trigger values held by the driver. Data will + be saved after each acquisition. + + + + hset /sample/rhSpeed/runexp 1 + + The driver begins a sequence when this flag is set to 1. When the flag + is 0 (default) the rheometer speed is ignored and no sequence is run. + The flag is automatically reset to 0 at the end of a sequence + + + + + + + Parameters + + + + hset /sample/rhTorque + + + (default 1) scale the voltage reading to the + torque value + (default 0) applies an offset if + necessary. + + + + hset /sample/rhSpeed + + (default 1) scale the voltage reading to the + speed value + (default 0) applies an offset if necessary. + The index of the next entry to be saved in + the data file, starts at zero + (default "EMPTY") List of speeds which + will trigger an acquisition and save data + (default "EMPTY") List of histogram memory + acquisition times. If you only put one value here it will be applied to + all of the acquisitions + (default 0) The driver ignores the rheometer + speed until this flag has been set to 1. NOTE: It is automatically reset + at the end of a sequence + Tolerance, an acquisition will be triggered when + the rheometer speed is within tolerance of the current trigger value in + the triggerList. + The and lists + will be cleared when a sequence has been completed. + + + + + + Rheometer example + + + +hset /sample/rhSpeed/triggerList 4 5 6 5 4 +OK +hset /sample/rhSpeed/acqTime 5 10 15 10 5 +OK +hset /sample/rhSpeed/runexp 1 +OK +Data will be saved in a standard HISTOGRAM_XY file +You can override this default by running the 'newfile' command first + +rhCallBack /sics/rhSpeed 3.9807 trigger a 5 second acquisition, +sicstime 2011-06-10 17:33:35 +rheometer_savehmmdata /sics/rhSpeed: save data index = 0, +sicstime 2011-06-10 17:33:35 +rhCallBack /sics/rhSpeed 4.9562 trigger a 10 second acquisition, +sicstime 2011-06-10 17:33:43 +rheometer_savehmmdata /sics/rhSpeed: save data index = 1, +sicstime 2011-06-10 17:33:43 +rhCallBack /sics/rhSpeed 5.98 trigger a 15 second acquisition, +sicstime 2011-06-10 17:33:50 +rheometer_savehmmdata /sics/rhSpeed: save data index = 2, +sicstime 2011-06-10 17:33:50 +rhCallBack /sics/rhSpeed 5.023 trigger a 10 second acquisition, +sicstime 2011-06-10 17:34:06 +rheometer_savehmmdata /sics/rhSpeed: save data index = 3, +sicstime 2011-06-10 17:34:06 +rhCallBack /sics/rhSpeed 4.0226 trigger a 5 second acquisition, +sicstime 2011-06-10 17:34:20 +rheometer_savehmmdata /sics/rhSpeed: save data index = 4, +sicstime 2011-06-10 17:34:20 + + + + + + diff --git a/site_ansto/manual/dbSICSch26_magnet_11T.xml b/site_ansto/manual/dbSICSch26_magnet_11T.xml new file mode 100644 index 00000000..ba00a7ef --- /dev/null +++ b/site_ansto/manual/dbSICSch26_magnet_11T.xml @@ -0,0 +1,73 @@ + + + + 11 Tesla Magnet + Ferdi Franceschini + + 2008-08-29 16:47 + + + Configuration + The driver is loaded into SICS by adding the following line in the + /usr/local/sics/extraconfig.tcl file + select_environment_controller "11TMagnet" + Make sure that the other entries are commented out, save the file and restart SICS. + This will set up the lakeshore temperature controller as well as the magnet power + supply control. They will appear as tc1 and ips120 + under the sample group in GumTree. + + + Commands + When the magnet power supply is switched on it sets itself to "clamped" mode. This + means that the output is short-circuited. + You must unclamp it to set the magnetic field. + + + hset /sample/ips120/Control/A 0 + + Unclamps the magnet + It will show that it's at zero already, set it + anyway + + + + drive ips120_driveable n + + Drive the magnet to n Tesla + + + + + + Parameters + + + /sample/ips120/sensor/value + + This reading is taken from the power supply leads while the magnet is + ramping up. + After the setpoint has been reached and the magnet is "holding" the field + then SICS will read the field from the magnet status register of the power + supply. + + + + + + Description + The magnet is normally in persistent mode (switch heater off) with the power supply at + zero amps. The drive command drives the power supply to the magnet + current, takes the magnet out of persistent mode (turns the switch heater on), drives + the magnet to the new field, returns the magnet to persistent mode (turns the switch + heater off) and ramps the power supply current back to zero. + There are time delays to allow the switch to operate. + + + Known Issues + If you set the limits to run at maximum magnet field, but do not run the lambda plate, + you will quench the magnet. This driver does not check to see + if the magnet temperature when driving maximum field. The SICS anticollider should be + used to set allowed values. + + diff --git a/site_ansto/manual/dbSICSch27_autosave.xml b/site_ansto/manual/dbSICSch27_autosave.xml new file mode 100644 index 00000000..e65e481c --- /dev/null +++ b/site_ansto/manual/dbSICSch27_autosave.xml @@ -0,0 +1,353 @@ + + + + Autosave + Ferdi Franceschini + + 2008-08-29 16:47 + + + Commands + + + autosave + + With no arguments enables autosaving with a default interval of 300 + seconds (5 minutes) + + + + + + Parameters + + + autosave n + + n <= 0 disables autosaving + n > 0 enables autosaving with an interval of + n seconds (if already running it just sets a + new interval) + + + + + + autosave + + Reports if autosave is enabled or disabled. + Return messages are: + AUTOSAVE_STATE = DISABLED + AUTOSAVE_STATE = ENABLED + + + + + autosave example + + +autosave check +AUTOSAVE_STATE = DISABLED + +autosave 10 +OK + +autosave check +AUTOSAVE_STATE = ENABLED + + + + + + Description + Data will be saved in the "designated" next data slot in a file. It's tricky because a + sequence of datasets can be saved in a single data file (this is in fact the normal case + across the instruments). I say "designated" because when you save a sequence of data + acquistions in a file autosave cannot tell if the last entry in the + file was "autosaved" or deliberately saved. The next slot is designated by making a call + to save eg save 3 will cause + autosave to save data at the next index (ie. 4). This will be made + clearer later with examples. + + Data will be autosaved under the following conditions: + + autosave is enabled, of course :) + newfile has been called to create a new file. + The histogram memory is acquiring data. + After autosave has been enabled it will start saving data at point zero in the data + file, in other words it is equivalent to calling save 0 at regular + intervals. If a call is made to save eg save 0 + then autosaving will start saving data in the next slot, ie it saves data in index 1. + + Autosaving is suspended under the following conditions: + The histogram memory has been paused + It resumes after a histogram start + The histogram memory has been stopped + It resumes after a histogram start + newfile clear has been called (this forces you to call + newfile again before a new file can be saved). + It resumes saving data in a new file at index 0 after a call like newfile + HISTOGRAM_XY or newfile scratch + When a runscan terminates. + It resumes saving in a new file starting from index 0 when a new + runscan is called. + + A typical autosave run + + +autosave 1 +OK +newfile HISTOGRAM_XY +OK +histmem mode time +histmem preset 5 +histmem start block +histmem started +autosave 0 +QKK0000035.nx.hdf updated +autosave 0 +QKK0000035.nx.hdf updated +histmem paused +save 0 +QKK0000035.nx.hdf updated +OK +newfile HISTOGRAM_XY +OK +histmem start block +histmem started +autosave 0 +QKK0000036.nx.hdf updated +autosave 0 +QKK0000036.nx.hdf updated +histmem paused +save 0 +QKK0000036.nx.hdf updated +OK + + + You should notice that there are a couple of autosave commands + before the histogram memory pauses to allow a deliberate call to + save and that you must call newfile to + autosave data in a new file otherwise you will overwrite data from the previous + acquisition (NOTE: this is not a problem with autosave, this is + what happens already if you're not careful). + + + autosave example simulates saving a sequence of acquisitions in a single data + file + + +autosave 10 +OK +newfile HISTOGRAM_XY +OK +histmem start +histmem started +autosave 0 +QKK0000025.nx.hdf updated +autosave 0 +QKK0000025.nx.hdf updated +histmem pause +histmem paused +save 0 +QKK0000025.nx.hdf updated +OK +histmem start +histmem started +autosave 1 +QKK0000025.nx.hdf updated +autosave 1 +QKK0000025.nx.hdf updated +histmem pause +histmem paused +save 1 +QKK0000025.nx.hdf updated +OK +autosave 0 +OK + + + Note how autosave increments after the save + 0. You should also be aware that autosaving is suspended when the + histogram memory is paused or stopped, it resumes when the histogram is + restarted. + + + autosave example using <command>runscan</command> + + +autosave 2 +OK +runscan dummy_motor 7.8 -1.5 2 time 10 +Scan start: 7.800000 , Scan step: -9.300000, Number of points: 2 +Datatype: HISTOGRAM_XYT +histmem started +autosave 0 +QKK0000027.nx.hdf updated +autosave 0 +QKK0000027.nx.hdf updated +autosave 0 +QKK0000027.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +0 7.800 45775 10.00 +Monitor 1 2746 +Monitor 2 3217 +Monitor 3 9863 +QKK0000027.nx.hdf updated +histmem started +autosave 1 +QKK0000027.nx.hdf updated +autosave 1 +QKK0000027.nx.hdf updated +autosave 1 +QKK0000027.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +1 -1.500 45981 10.00 +Monitor 1 229 +Monitor 2 909 +Monitor 3 5385 +QKK0000027.nx.hdf updated +histmem stopped +OK +autosave check +AUTOSAVE_STATE = ENABLED +autosave 0 +OK +autosave check +AUTOSAVE_STATE = DISABLED + + + autosaving is suspended at the end of runscan because the + histogram memory has stopped running, but autosaving is still enabled as can be seen + from the call to autosave check. However there is no risk that + data will be overwritten if the histogram is restarted because the runscan command + makes a call to newfile clear when it terminates. + + + autosave example using two <command>runscan</command> commands + + +autosave 1 +OK +runscan dummy_motor 7.8 -1.5 2 time 5 +Scan start: 7.800000 , Scan step: -9.300000, Number of points: 2 +Datatype: HISTOGRAM_XYT +histmem started +autosave 0 +QKK0000031.nx.hdf updated +autosave 0 +QKK0000031.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +0 7.800 22846 5.00 +Monitor 1 276 +Monitor 2 1152 +Monitor 3 2643 +QKK0000031.nx.hdf updated +histmem started +autosave 1 +QKK0000031.nx.hdf updated +autosave 1 +QKK0000031.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +1 -1.500 22898 5.00 +Monitor 1 91 +Monitor 2 79 +Monitor 3 5071 +QKK0000031.nx.hdf updated +histmem stopped +OK + + + + + ...autosave example continued + + +runscan dummy_motor 7.8 -1.5 2 time 5 +Scan start: 7.800000 , Scan step: -9.300000, Number of points: 2 +Datatype: HISTOGRAM_XYT +histmem started +autosave 0 +QKK0000032.nx.hdf updated +autosave 0 +QKK0000032.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +0 7.800 23043 5.00 +Monitor 1 8630 +Monitor 2 6962 +Monitor 3 4012 +QKK0000032.nx.hdf updated +histmem started +autosave 1 +QKK0000032.nx.hdf updated +autosave 1 +QKK0000032.nx.hdf updated +histmem paused +NP dummy_mot Counts Time +1 -1.500 22887 5.00 +Monitor 1 2449 +Monitor 2 7798 +Monitor 3 9172 +QKK0000032.nx.hdf updated +histmem stopped +OK + + + You should notice that after the first runscan data is + autosaved to file 31 and after the second runscan it is autosaved to file 32. + + + example shows what happens if you enable <command>autosave</command> after a + couple of datasets have been acquired and saved + + +newfile HISTOGRAM_XY +OK +histmem start +histmem started +save 0 +QKK0000038.nx.hdf updated +OK +save 1 +QKK0000038.nx.hdf updated +OK +autosave 5 <---- AUTOSAVE enabled here. +OK +autosave 2 +QKK0000038.nx.hdf updated +autosave 2 +QKK0000038.nx.hdf updated +save 2 +QKK0000038.nx.hdf updated +OK +autosave 3 +QKK0000038.nx.hdf updated +histmem stop +histmem stopped +save 3 +QKK0000038.nx.hdf updated +OK + + + You shold notice that autosaving properly commences saving data at index 2 after + it has been enabled instead of autosaving over index 0 or 1. It's a bit contrived + but it attempts to show the sort of thing that should happen if you are saving + multiple periods from a histogram memory. + + + + Known Issues + Under exceptional conditions your data file may end up with one more entry than you + intended. In other words if you fail to disable autosaving after a deliberate + save and newfile has not been called before + the histogram memory starts acquiring data again, then another entry will be saved + beyond your last save. No data will be lost but you may get more than you expected. + + + diff --git a/site_ansto/manual/dbSICSch28_LF_amplifier.xml b/site_ansto/manual/dbSICSch28_LF_amplifier.xml new file mode 100644 index 00000000..5015d5a2 --- /dev/null +++ b/site_ansto/manual/dbSICSch28_LF_amplifier.xml @@ -0,0 +1,203 @@ + + + + Low Frequency Amplifier. LF AG1010 + Jing Chen + + 2008-08-29 16:47 + + + Configuration + The device LF AG1010 is connected to a Moxa 5430 server. SICS client communicates with + the Moxa 54530 server who sends and receives data packets to/from the LF AG1010 through + a RS232 serial interface. + + + Settings of the Moxa 5430 are + + Bits Per Second – 19200 + Data Bits – 8 + Parity – NONE + Stop Bit – 1 + Flow Controls – NONE + Port Number – 4001 + + + + . + + + Commands + Commands for getting and setting values on the LF AG1010. Sending a command without a + value will return the current value. + Note that all power values are in deciwatts (dW). 1dW = 0.1Watt. + + + lf_limits + + power + + Set forward power limit to power dW. + lf_limits FPL 50 sets the forward power limit to 50dW + lf_limits FPL returns the forward power limit + Units: dW + Range: 0 to 6000 + + + + lf_limits power + + Set reverse power limit to power dW + lf_limits RPL 50 sets the reverse power limit to 50dW + lf_limits RPL returns the reverse power limit + Units: dW + Range: 0 to 1600 + + + + lf_pagc power + + Set power level for AGC mode to power dW + lf_pagc 50 sets the AGC mode power level to 50dW + lf_pagc returns the AGC mode power level + + + + lf_pmgc power + + Set power level for MGC mode to power % + MGC scale in % is for reference only. 0% - 0W, 100% full output. Not + linear! This mode is for continues and pulsed operation. + lf_pmgc 50 sets the MGC mode power level to 50% + lf_pmgc returns the MGC mode power level + Units: % + Range: 0 to 100 + + + + lf_freq freq + + Set frequency to freq Hz + Range: 20000 to 2000000 (20kHz to 2MHz) + + + + lf_burst modemode time + time top + top + + + Set burst mode to mode + BURST is possible in MGC Mode only! + Allowed mode + Burst mode OFF + Internal burst mode ON + Change burst parameters without changing burst ON/OFF + Enable external burst mode + Set repetition period of burst cycle to time + Units: ms + Range: 1 to 50 + Set time of power in burst cycle to top + Units: μs + Range: 1 to 500 + lf_burst mode 1 rtime 20 top 5 + Set burst mode to Internal Mode + Set repetition period of burst cycle to 20 ms + Set time of power in burst cycle to 5 μs + + + + lf_sweep mode + mode start start + + step step np + np + + + Sets the sweep parameters start Hz, with step + size of step Hz and with number of points + np + + Allowed mode + Sweep mode OFF + Sweep mode ON + Change sweep parameters without changing sweep mode + ON/OFF + Allowed step + increments of 1000Hz + lf_sweep mode 1 start 20000 step 1000 np 200 + Set sweep mode on, start frequency = 20kHz, step frequency = 1kHz, number + of points = 200 + + + + lf_sweep_run + start step np + + + This command triggers a frequency sweep starting at + start Hz, with step of + step Hz and with number of steps = + np in full sweep cycle under optional + + If the mode is 0 (OFF) and mode is not provide, the command will set the + mode the to 2 before the sweeping and reset to 0 (OFF) + after the sweeping. + Allowed + Sweep mode OFF + Sweep mode ON + Change sweep parameters without changing sweep mode + ON/OFF + + + + lf_meas + + Returns forward power, reverse power and temperature? + + start Hz + + + + + + Parameters + + + N/A + + There are no parameters to set on this device. + + + + + + Description + The AG 1010 produces up to 1,000 Watts of power over a frequency range from lower than + 20 kHz to higher than 1.2 MHz. It operates over the entire frequency range without band + switching or other adjustments. Extended range to over 2 MHz is possible with reduced + output power. Gain is rated at 60 dB with a typical gain flatness of ±1.5 dB. + The Front Panel offers a LCD display of Forward, Reflected and Load Power readings, + RF Status, MGC/AGC setups and operating frequency in Generator Mode. + Power meters are calibrated into a 50 Ohm Load and are accurate when unit operates + into matched load. Outside of matched condition, the model AG 1010’s power measurement + system provides an accurate reading of VSWR. + When used as amplifier, the AG 1010 is compatible with most signal and function + generators, computer synthesizer cards and accurately reproduces all waveforms within + its output and bandwidth limits. + The Forced-air cooling system and the internal power supply are designed to permit + operation over a wide range of temperature and global AC line conditions. The AG 1010 is + built to withstand a +5 dBm (1.2Vp-p) Input signal. The unit amplifies the inputs of AM, + FM, SSB, pulse and other complex modulations. + OUTPUT PROTECTION AG 1010 is protected by its internal control system for 1,000 Watts + of total Forward Power and 160 Watts of Reflected Power. This will protect the amplifier + output stage from accidental overdrive at the input and an extreme mismatch at the + Output. + + + Known Issues + No know issues. + + diff --git a/site_ansto/manual/dbSICSch29_motor_control_py.xml b/site_ansto/manual/dbSICSch29_motor_control_py.xml new file mode 100644 index 00000000..85437cc8 --- /dev/null +++ b/site_ansto/manual/dbSICSch29_motor_control_py.xml @@ -0,0 +1,782 @@ + + + + Motor Controls & Drive using Python + Ferdi Franceschini + + 2008-11-08 12:48 + + + Drive commands + Many objects in SICS are drivable . This means they can run to a new value. Obvious + examples are motors. Less obvious examples include composite adjustments such as setting + a wavelength or an energy. Such devices are also called virtual motors. This class of + objects can be operated by the drive, run, success family of commands. These commands + cater for blocking and non-blocking modes of operation. + In the example commands below, "mot1" can be replaced by + the motor short name, or the hdb_path. hdb_path is the verbose path to the motor e.g. + /sample/azimuthal_angle whereas the short name is + stth. The tcl command line only allows use of the short name for + these commands. + Commands are CASE SENSITIVE. + These python commands are available from both the python command line and python + scripts. Firstly you must import the sics module. + from gumpy.commons import sics + + + + Commands + + + + sics.execute + ("any_sics_command") + + + executes any_sics_command without feedback. + Useful for when a sics command is not implemented in python. + + + + + sics.run + ("mot1", pos1) + + + runs mot1 to pos1. + Asynchronous. + + + + + sics.set + ("mot1", pos1) + + + is the same as sics.run. Prints log information to + console. "set" is a universal computing keyword for setting values. + Asynchronous. + + + + + success() + + + not implemented in python. In tcl, waits and blocks the command connection + until all pending operations have finished (or an interrupt occured). + + + + + sics.drive + ("mot1", pos1) + + + is the same as run but it blocks the client that + requested the drive from issuing commands until the + motion has finished. This command will set the variables in motion and wait + until the driving has finished. A drive can be seen as a + sequence of a run command as stated above immediatly + followed by a success command + + + + + sics.multiDrive + ({"mot1":pos1, "mot2":pos2}) + + + is the same as sics.drive but allows you to drive a + list of motors simultaneously. Due to the verbose syntax to create a list, + this is not the default drive command. + + + + + sics.setpos + ("mot", oldPosition, newPosition) + + + Sets the position value of oldPosition to + newPosition. TO BE TESTED. + + + + + sics.getValue("mot") + + + returns the current position of the motor. All zero point and sign + corrections are applied + + + + + mot + hardposition + + + not implemented in python + + + + + mot + list + + + not implemented in python + + + + + mot + reset + + + not implemented in python + + + + + mot + interest + + + not implemented in python + + + + + mot + uninterest + + + not implemented in python + + + + + mot + homerun + + + + not implemented in python + + + + + + Parameters + These values can be get and set using + sics.getValue("hdb_path") + and + sics.set("hdb_path",value) + via their hdb_path. + BUG: If you try to set values that are at a higher + level of privilege, the console will report OK, but the SICS Server view will report an + error. + Parameters to be added: Blockage_Thresh, Blockage_Ratio, Blockage_Fail, + Backlash_offset, + + + + mot + absenc + + + Privilege = User + not implemented in python. Value of absolute encoder not available via + hdb_path. + Get the absolute encoder reading.  (Only implemented by motors that have + absolute encoders.) + + + + accel + sics.getValue("/hdb_path/accel") + sics.set("/hdb_path/accel",val) + + Privilege = User + Get/Set the acceleration along/about the axis controlled by this motor in + physical units per square second, ie mm/s^2, deg/s^2 + + + + accesscode + sics.getValue("/hdb_path/accesscode") + sics.set("/hdb_path/accesscode",val)(persists) + + Default = i.e. user + Privilege = Manager + Controls which type of user is allowed to control the motor + Allowed val + + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + Blockage_Check_Interval + sics.getValue("/hdb_path/blockage_check_interval") + sics.set("/hdb_path/blockage_check_interval",val)(persists) + + Privilege = Manager + Units = seconds + Get/Set the interval at which the motor driver checks the axis for + significant changes in position + + + + decel + sics.getValue("/hdb_path/decel") + sics.set("/hdb_path/decel",val) + + Privilege = User + Get/Set the deceleration along/about the axis controlled by this motor in + physical units per second, ie mm/s2, + deg/s2. + + + + failafter + sics.getValue("/hdb_path/failafter") + sics.set("/hdb_path/failafter",val) + + Privilege = Manager + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + fixed + sics.getValue("/hdb_path/fixed") + sics.set("/hdb_path/fixed",val) + (persists) + + + Default = 1.0 + Privilege = User + Set to 1.0 to prevent the motor from being moved, set to -1.0 to allow + movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + mot + home + val + + + + + subject to change. This may be changed to a configuration only + parameter + + + Privilege = Manager + Get/Set the home position for the axis which the motor controls, (ie phi, + chi, two-theta, x, y).  So it is the physical home position in the units + given by the units parameter below, (ie mm, + degrees, ...) + + + + ignorefault + sics.getValue("/hdb_path/ignorefault") + sics.set("/hdb_path/ignorefault",val) + (persists) + + + Position faults will be ignored if this is greater than zero + + + + interruptmode + sics.getValue("/hdb_path/interruptmode") + sics.set("/hdb_path/interruptmode",val) + (persists) + + + Default = 0 (continue) + Privilege = Manager + Controls what effect a motor failure has on operations + Allowed val one of: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + maxretry + sics.getValue("/hdb_path/maxretry") + sics.set("/hdb_path/maxretry",val) + + Default = + Privilege = Manager + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + movecount + sics.getValue("/hdb_path/movecount") + sics.set("/hdb_path/movecount",val) + (persists) + + + Default= + Privilege = Manager + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + precision + sics.getValue("/hdb_path/precision") + sics.set("/hdb_path/precision",val) + (persists) + + + Privilege = Manager + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + sign + sics.getValue("/hdb_path/sign") + sics.set("/hdb_path/sign",val) + (persists) + + + Default = + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + softlowerlim + sics.getValue("/hdb_path/softlowerlim") + sics.set("/hdb_path/softlowerlim",val) + (persists) + + + Privilege = User + Get/set lower software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + softupperlim + sics.getValue("/hdb_path/softupperlim") + sics.set("/hdb_path/softupperlim",val) + (persists) + + + Privilege = User + Get/set upper software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + softzero + sics.getValue("/hdb_path/softzero") + sics.set("/hdb_path/softzero",val) + (persists) + + + Default = 0 + Privilege = User + Sets the zero position to val. You probably + want to use setpos described below, it's easier to + understand.  + + + + speed + sics.getValue("/hdb_path/speed") + sics.set("/hdb_path/speed",val) + + Privilege = User + Get/Set the speed of motion along/about the axis controlled by this motor + in physical units per second, ie mm/s, deg/s. + + + + + mot + units + val + + + Privilege = User + Not implemented. Does not have a hdb_path. + Get/Set the physical units + Preferred val: + + + + + + + + <command>list </command>output + mot list shows the values of the + parameters listed below, in the order listed below. + + + + Position + + + Reports the current positon + + + + + TargetPosition + + + Shows target position + + + + hardlowerlim + + Hardware lower limit for motor set in SICS configuration file + + + + hardupperlim + + Hardware upper limit for motor set in SICS configuration file + + + + + softlowerlim + + + Lower software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softupperlim + + + Upper software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softzero + + + The zero position. + + + + + fixed + + + prevents movement + allows movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + interruptmode + + + Controls what effect a motor failure has on operations + Values: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + + precision + + + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + + accesscode + + + Controls which type of user is allowed to control the motor + Allowed values: + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + + sign + + + Default = 1 + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + + failafter + + + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + + maxretry + + + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + + ignorefault + + + Position faults will be ignored if this is greater than zero + + + + + movecount + + + Default=10 + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + + home + + + home position for the axis which the motor controls, (ie phi, chi, + two-theta, x, y).  So it is the physical home position in the units given by + the units parameter below, (ie mm, degrees, + ...) + + + + + speed + + + The speed of motion along/about the axis controlled by this motor in + physical units per second, ie mm/s, deg/s. + + + + maxSpeed + + Speed in units/s + + + + + accel + + + Acceleration along/about the axis controlled by this motor. + Configurable + + + + maxAccel + + Maximum allowed acceleration in + units/s2 + + + + + decel + + + Deceleration along/about the axis controlled by this motor. + Configurable + + + + maxDecel + + Maximum allowed deceleration in + units/s2 + + + + motOffDelay + + Number of msec to wait before switching off a motor after a move + Default = + + + + Debug + + + + + + Settle + + + + + + Blockage_Check_Interval + + + + + + Blockage_Thresh + + + + + + Blockage_Ratio + + + + + + Blockage_Fail + + + + + + Backlash_offset + + + + + + Protocol + + + + + + absEncoder + + Allowed values: + no absolute encoder + absolute encoder enabled + + + + absEncHome + + The calibrated "home" position in encoder counts + Required if absEncoder = 1 + + + + cntsPerX + + Number of absolute encoder counts per unit of movement + along/about the axis of motion + + + + Creep_Offset + + + + + + Creep_Precision + + + + + + posit_count + + + + + + posit_1 + + + + + + posit_2 + + + + + + posit_3 + + + + + + stepsPerX + + Number of motor steps per unit of movement along/about + the axis of motion + + + + + diff --git a/site_ansto/manual/dbSICSch29_motor_control_py_simple.xml b/site_ansto/manual/dbSICSch29_motor_control_py_simple.xml new file mode 100644 index 00000000..fbb047e5 --- /dev/null +++ b/site_ansto/manual/dbSICSch29_motor_control_py_simple.xml @@ -0,0 +1,756 @@ + + + + Motor Controls & Drive using Python + Ferdi Franceschini + + 2008-11-08 12:48 + + + Drive commands + Many objects in SICS are drivable . This means they can run to a new value. Obvious + examples are motors. Less obvious examples include composite adjustments such as setting + a wavelength or an energy. Such devices are also called virtual motors. This class of + objects can be operated by the drive, run, success family of commands. These commands + cater for blocking and non-blocking modes of operation. + In the example commands below, "mot1" can be replaced by + the motor short name, or the hdb_path. hdb_path is the verbose path to the motor e.g. + /sample/azimuthal_angle whereas the short name is + stth. The tcl command line only allows use of the short name for + these commands. + Commands are CASE SENSITIVE. + These python commands are available from both the python command line and python + scripts. Firstly you must import the sics module. + from gumpy.commons import sics + + + + Commands + + + + sics.execute + ("any_sics_command") + + + executes any_sics_command without feedback. + Useful for when a sics command is not implemented in python. + + + + + sics.run + ("mot1", pos1) + + + runs mot1 to pos1. + Asynchronous. + + + + + sics.set + ("mot1", pos1) + + + is the same as sics.run. Prints log information to + console. "set" is a universal computing keyword for setting values. + Asynchronous. + + + + + success() + + + not implemented in python. In tcl, waits and blocks the command connection + until all pending operations have finished (or an interrupt occured). + + + + + sics.drive + ("mot1", pos1) + + + is the same as run but it blocks the client that + requested the drive from issuing commands until the + motion has finished. This command will set the variables in motion and wait + until the driving has finished. A drive can be seen as a + sequence of a run command as stated above immediatly + followed by a success command + + + + + sics.multiDrive + ({"mot1":pos1, "mot2":pos2}) + + + is the same as sics.drive but allows you to drive a + list of motors simultaneously. Due to the verbose syntax to create a list, + this is not the default drive command. + + + + + sics.setpos + ("mot", oldPosition, newPosition) + + + Sets the position value of oldPosition to + newPosition. TO BE TESTED. + + + + + sics.getValue("mot") + + + returns the current position of the motor. All zero point and sign + corrections are applied + + + + + mot + hardposition + + + not implemented in python + + + + + mot + list + + + not implemented in python + + + + + mot + reset + + + not implemented in python + + + + + mot + interest + + + not implemented in python + + + + + mot + uninterest + + + not implemented in python + + + + + mot + homerun + + + + not implemented in python + + + + + + Parameters + These values are generally not used during an experiment. These are used to optimise + and protect the instrument and hence are used by the instrument scientist or computing + & electronics staff. + These values can be get and set using + sics.getValue("hdb_path") + and + sics.set("hdb_path",value) + You cannot use the motor short name. + BUG: If you try to set values that are at a higher + level of privilege, the console will report OK, but the SICS Server view will report an + error. + Parameters that are persistent between restarts of SICS are marked as persists, + otherwise a restart of SICS will revert to the value in the configuration file. + Parameters to be added: + Blockage_Thresh, Blockage_Ratio, Blockage_Fail, Backlash_offset + Protocol, absEncoder, absEncHome, cntsPerX + Creep_Offset, Creep_Precision, stepsPerX + maxSpeed, maxAccel, maxDecel, + motOffDelay, Debug, Settle. + + + + mot + absenc + + + Privilege = User + Not implemented. Does not have an hdb_path. + Get the absolute encoder reading.  (Only implemented by motors that have + absolute encoders.) + + + + accel + + Privilege = User + Get/Set the acceleration along/about the axis controlled by this motor in + physical units per square second, ie mm/s^2, deg/s^2 + + + + accesscode + (persists) + + Default = i.e. user + Privilege = Manager + Controls which type of user is allowed to control the motor + Allowed val + + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + Blockage_Check_Interval + (persists) + + Privilege = Manager + Units = seconds + Get/Set the interval at which the motor driver checks the axis for + significant changes in position + + + + decel + + Privilege = User + Get/Set the deceleration along/about the axis controlled by this motor in + physical units per second, ie mm/s2, + deg/s2. + + + + failafter + + Privilege = Manager + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + fixed + (persists) + + Default = 1.0 + Privilege = User + Set to 1.0 to prevent the motor from being moved, set to -1.0 to allow + movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + mot + home + val + + + + + subject to change. This may be changed to a configuration only + parameter + + + Privilege = Manager + Get/Set the home position for the axis which the motor controls, (ie phi, + chi, two-theta, x, y).  So it is the physical home position in the units + given by the units parameter below, (ie mm, + degrees, ...) + + + + ignorefault + (persists) + + Position faults will be ignored if this is greater than zero + + + + interruptmode + (persists) + + + Default = 0 (continue) + Privilege = Manager + Controls what effect a motor failure has on operations + Allowed val one of: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + maxretry + + Default = + Privilege = Manager + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + movecount + (persists) + + + Default= + Privilege = Manager + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + precision + (persists) + + + Privilege = Manager + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + sign + (persists) + + + Default = + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + softlowerlim + (persists) + + + Privilege = User + Get/set lower software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + softupperlim + (persists) + + + Privilege = User + Get/set upper software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + softzero + (persists) + + + Default = 0 + Privilege = User + Sets the zero position to val. You probably + want to use setpos described below, it's easier to + understand.  + + + + speed + + Privilege = User + Get/Set the speed of motion along/about the axis controlled by this motor + in physical units per second, ie mm/s, deg/s. + + + + + mot + units + val + + + Privilege = User + Not implemented. Does not have an hdb_path. + Get/Set the physical units + Preferred val: + + + + + + + + <command>list </command>output + mot list shows the values of the + parameters listed below, in the order listed below. + + + + Position + + + Reports the current positon + + + + + TargetPosition + + + Shows target position + + + + hardlowerlim + + Hardware lower limit for motor set in SICS configuration file + + + + hardupperlim + + Hardware upper limit for motor set in SICS configuration file + + + + + softlowerlim + + + Lower software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softupperlim + + + Upper software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softzero + + + The zero position. + + + + + fixed + + + prevents movement + allows movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + interruptmode + + + Controls what effect a motor failure has on operations + Values: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + + precision + + + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + + accesscode + + + Controls which type of user is allowed to control the motor + Allowed values: + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + + sign + + + Default = 1 + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + + failafter + + + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + + maxretry + + + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + + ignorefault + + + Position faults will be ignored if this is greater than zero + + + + + movecount + + + Default=10 + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + + home + + + home position for the axis which the motor controls, (ie phi, chi, + two-theta, x, y).  So it is the physical home position in the units given by + the units parameter below, (ie mm, degrees, + ...) + + + + + speed + + + The speed of motion along/about the axis controlled by this motor in + physical units per second, ie mm/s, deg/s. + + + + maxSpeed + + Speed in units/s + + + + + accel + + + Acceleration along/about the axis controlled by this motor. + Configurable + + + + maxAccel + + Maximum allowed acceleration in + units/s2 + + + + + decel + + + Deceleration along/about the axis controlled by this motor. + Configurable + + + + maxDecel + + Maximum allowed deceleration in + units/s2 + + + + motOffDelay + + Number of msec to wait before switching off a motor after a move + Default = + + + + Debug + + + + + + Settle + + + + + + Blockage_Check_Interval + + + + + + Blockage_Thresh + + + + + + Blockage_Ratio + + + + + + Blockage_Fail + + + + + + Backlash_offset + + + + + + Protocol + + + + + + absEncoder + + Allowed values: + no absolute encoder + absolute encoder enabled + + + + absEncHome + + The calibrated "home" position in encoder counts + Required if absEncoder = 1 + + + + cntsPerX + + Number of absolute encoder counts per unit of movement + along/about the axis of motion + + + + Creep_Offset + + + + + + Creep_Precision + + + + + + posit_count + + + + + + posit_1 + + + + + + posit_2 + + + + + + posit_3 + + + + + + stepsPerX + + Number of motor steps per unit of movement along/about + the axis of motion + + + + + diff --git a/site_ansto/manual/dbSICSch2_motor_control.xml b/site_ansto/manual/dbSICSch2_motor_control.xml new file mode 100644 index 00000000..4c0038f9 --- /dev/null +++ b/site_ansto/manual/dbSICSch2_motor_control.xml @@ -0,0 +1,843 @@ + + + + Motor Controls & Drive + Ferdi Franceschini + + 2008-11-08 12:48 + + + Drive commands + Many objects in SICS are drivable . This means they can run to a new value. Obvious + examples are motors. Less obvious examples include composite adjustments such as setting + a wavelength or an energy. Such devices are also called virtual motors. This class of + objects can be operated by the drive, run, Success family of commands. These commands + cater for blocking and non-blocking modes of operation. + + + Commands + + + + run + mot1 pos1 mot2 pos2 ... + + + runs mot1 to pos1, + mot2 to pos2, + ... + + + + + success + + + waits and blocks the command connection until all pending operations have + finished (or an interrupt occured). + + + + + drive + mot1 pos1 mot2 pos2 ... + + + is the same as run but it blocks the client that + requested the drive from issuing commands until the + motion has finished. Can be called with one to n pairs of object new value + pairs. This command will set the variables in motion and wait until the + driving has finished. A drive can be seen as a sequence + of a run command as stated above immediatly followed by a + Success command + + + + + setpos + mot newPosition + + + Sets the current position value of mot to + newPosition + + + + + setpos + mot oldPosition newPosition + + + Sets the position value of oldPosition to + newPosition + + + + + mot OR mot + position + + + prints the current position of the motor. All zero point and sign + corrections are applied + + + + + mot + hardposition + + + prints the current position of the motor. No corrections are applied. + Should read the same as the controller box + + + + + mot + list + + + prints the configuration parameters for a motor, eg counts and steps per + mm/degree etc. + + + + + mot + slist + + + prints the Galil address, port number, and axis label for a motor. + + + + + mot + data + + + prints the number of steps and counts per mm or degrees, and steps per + count + + + + + mot + send + + + sends a Galil command directly to the controller, this only works if you + login as manager. e.g. + m1 send MG _XQ + m1 send RUNF = 0 + m1 send TPE + NOTE: You can use the following shortcut for TP and TD so you don’t need + to know the axis name. m1 send TP` m1 send TD` + + + + + mot + reset + + + resets the motor parameters to default values. This is software zero to + 0.0 and software limits are reset to hardware limits + + + + + mot + interest + + + initiates automatic printing of any position change of the motor. This + command is mainly interesting for implementors of status display + clients. + + + + + mot + uninterest + + + disables interest + + + + + mot + homerun + + + + homerun with no arguments reports the current status, a + value of "1" means that the motors have been homed. + homerun 1 will run the + homing routine. Used on motors with relative encoders e.g. slit motors. + + + + + + list + mot + + + + Returns the motor's type. + + Appears to be broken. + Configurable virtual motors do not have a list subcommand. + + + + + + + Parameters + + + + mot + absenc + + + Privilege = User + Get the absolute encoder reading.  (Only implemented by motors that have + absolute encoders.) + + + + + mot + accel + val + + + Privilege = User + Get/Set the acceleration along/about the axis controlled by this motor in + physical units per square second, ie mm/s^2, deg/s^2 + + + + + mot + accesscode + val + (persists) + + + Default = i.e. user + Privilege = Manager + Controls which type of user is allowed to control the motor + Allowed val + + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + + mot + blockage_check_interval + val + + + Privilege = Manager + Units = seconds + Get/Set the interval at which the motor driver checks the axis for + significant changes in position + + + + + mot + decel + val + + + Privilege = User + Get/Set the deceleration along/about the axis controlled by this motor in + physical units per second, ie mm/s2, + deg/s2. + + + + + mot + failafter + val + + + Privilege = Manager + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + + mot + fixed + val + (persists) + + + Default = 1.0 + Privilege = User + Set to 1.0 to prevent the motor from being moved, set to -1.0 to allow + movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + mot + home + val + + + + + subject to change. This may be changed to a configuration only + parameter + + + Privilege = Manager + Get/Set the home position for the axis which the motor controls, (ie phi, + chi, two-theta, x, y).  So it is the physical home position in the units + given by the units parameter below, (ie mm, + degrees, ...) + + + + + mot + ignorefault + val + (persists) + + + Position faults will be ignored if this is greater than zero + + + + + mot + interruptmode + val + (persists) + + + Default = 0 (continue) + Privilege = Manager + Controls what effect a motor failure has on operations + Allowed val one of: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + + mot + maxretry + val + + + Default = + Privilege = Manager + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + + mot + movecount + val + (persists) + + + Default= + Privilege = Manager + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + + mot + precision + val + (persists) + + + Privilege = Manager + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + + mot + sign + val + (persists) + + + Default = + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + + mot + softlowerlim + val + (persists) + + + Privilege = User + Get/set lower software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + + mot + softupperlim + val + (persists) + + + Privilege = User + Get/set upper software limit.  This is automatically adjusted when you set + the softzero or use the setpos command. + + + + + mot + softzero + val + (persists) + + + Default = 0 + Privilege = User + Sets the zero position to val. You probably + want to use setpos described below, it's easier to + understand.  + + + + + mot + speed + val + + + Privilege = User + Get/Set the speed of motion along/about the axis controlled by this motor + in physical units per second, ie mm/s, deg/s. + + + + + mot + units + val + + + Privilege = User + Get/Set the physical units + Preferred val: + + + + + + + + <command>list </command>output + mot list shows the values of the + parameters listed below, in the order listed below. + + + + Position + + + Reports the current positon + + + + + TargetPosition + + + Shows target position + + + + hardlowerlim + + Hardware lower limit for motor set in SICS configuration file + + + + hardupperlim + + Hardware upper limit for motor set in SICS configuration file + + + + + softlowerlim + + + Lower software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softupperlim + + + Upper software limit.  This is automatically adjusted when you set the + softzero or use the setpos command. + + + + + softzero + + + The zero position. + + + + + fixed + + + prevents movement + allows movement. + NOTE: The instrument manager can set the accesscode to prevent users from + moving a motor. + + + + + interruptmode + + + Controls what effect a motor failure has on operations + Values: + Continue. A motor failure will not affect other + operations + AbortOperation. Stop current hardware operation but no + scans or batchfiles + AbortScan. Stop current scan or operation but continue + processing of batch files with next command + AbortBatch. Stop all processing, even batch + files + + + + + precision + + + Controls precision of movements.  If a motor has not completed a move to + the required precision then the move command will be resent.  The number of + retries is controlled by the maxretry parameter. + + + + + accesscode + + + Controls which type of user is allowed to control the motor + Allowed values: + Internal. Motor is reserved for internal use by + SICS + Manager. Only users who logon as managers are allowed + to move the motor. Usually just instrument scientists + User + Spy. Anyone is allowed to move the motor + + + + + sign + + + Default = 1 + Privilege = Manager + Controls direction of motion, set to -1 to reverse. + + + + + failafter + + + This is the number of consecutive failures of positioning operations this + motor allows before it thinks that something is really broken and aborts the + experiment + + + + + maxretry + + + The number of times that SICS will retry a move + if a motor has not reached the target position to within the required + precision + + + + + ignorefault + + + Position faults will be ignored if this is greater than zero + + + + + movecount + + + Default=10 + Controls frequency with which position changes are reported if a user + subscribes interest to a motor.  A larger value reduces the frequency + + + + + home + + + home position for the axis which the motor controls, (ie phi, chi, + two-theta, x, y).  So it is the physical home position in the units given by + the units parameter below, (ie mm, degrees, + ...) + + + + + speed + + + The speed of motion along/about the axis controlled by this motor in + physical units per second, ie mm/s, deg/s. + + + + maxSpeed + + Speed in units/s + + + + + accel + + + Acceleration along/about the axis controlled by this motor. + Configurable + + + + maxAccel + + Maximum allowed acceleration in + units/s2 + + + + + decel + + + Deceleration along/about the axis controlled by this motor. + Configurable + + + + maxDecel + + Maximum allowed deceleration in + units/s2 + + + + motOffDelay + + Number of msec to wait before switching off a motor after a move + Default = + + + + Debug + + + + + + Settle + + + + + + Blockage_Check_Interval + + + + + + Blockage_Thresh + + + + + + Blockage_Ratio + + + + + + Blockage_Fail + + + + + + Backlash_offset + + + + + + Protocol + + + + + + absEncoder + + Allowed values: + no absolute encoder + absolute encoder enabled + + + + absEncHome + + The calibrated "home" position in encoder counts + Required if absEncoder = 1 + + + + cntsPerX + + Number of absolute encoder counts per unit of movement + along/about the axis of motion + + + + Creep_Offset + + + + + + Creep_Precision + + + + + + posit_count + + + + + + posit_1 + + + + + + posit_2 + + + + + + posit_3 + + + + + + stepsPerX + + Number of motor steps per unit of movement along/about + the axis of motion + + + + + + Instrument specific drive commands + Many objects in SICS are drivable . This means they can run to a new value. Obvious + examples are motors. + Sometimes you might want to do something special with a motor, like run it in an + oscillation mode, such as an oscillating collimator or attenuator. The commands in this + section relate to these instrument specific cases. These commands are generally + non-blocking mode. + These commands do not apply to all instruments + + + + + + radcol start + n + + + Applicable to Pelican + Runs the rco motor for n cycles. + + + + + diff --git a/site_ansto/manual/dbSICSch30_He3.xml b/site_ansto/manual/dbSICSch30_He3.xml new file mode 100644 index 00000000..53af6fcb --- /dev/null +++ b/site_ansto/manual/dbSICSch30_He3.xml @@ -0,0 +1,163 @@ + + + + 3He + Ferdi Franceschini + + 2008-08-29 16:47 + + + Introduction + The system of He3 project consists of a polarizer and analyser which are controlled by + Labview servers. The two Labview servers run on one machine and communicate with a + corresponding SICS driver over TCP/IP. The polarizer and analyser share a single NI I/O + board and a HMP2030 power supply. + TCP port for polariser – 55011 + TCP port for analyser – 55012 + + + Configuration + TBD: How to get this running in SICS + e.g. + + + + cd /usr/local/nbi/sics/taipan/ + + + > vim taipan_setup.txt + + + + 0 = off, 1 = on + Save the file and restart SICS. + + + Commands + + + PolTrigger val + + Turn the magic box polariser on and off. + Allowed val + + polariser off + polariser on + + + + AnaTrigger val + + Turn the magic box analyser on and off. + Allowed val + + analyser off + analyser on + + + + PolRecord + + This command will manually trigger a logging event of the polariser + parameters: + amplitude + frequency + state + The data is appended to a dedicated log file. + + + + AnaRecord val + + This command will manually trigger a logging event of the analyser + parameters: + amplitude + frequency + state + The data is appended to a dedicated log file. + + + + hmpVolt chID val + + Units: V (volt) + set or get the voltage at channel chID. (??? + which channel does the 3He system use. ). + If val is not provided, returns the the voltage + and current setpoints and measurements of channel + chID. Otherwise it first sets the voltage of + channel chID to val + and then as a verification it displays the voltage and current setpoints and + measurements + Allowed chID ??? + What is a reasonable voltage ??? + + + + hmpCurr chID val + + Units: A (ampere) + set or get the current at channel chID. (??? + which channel does the 3He system use. ). + If val is not provided, returns the the voltage + and current setpoints and measurements of channel + chID. Otherwise it first sets the current of + channel chID to val + and then as a verification it displays the voltage and current setpoints and + measurements + Allowed chID ??? + What is a reasonable current ??? + + + + hmpMeas chID + + Units: V (volt) A (ampere) + get the current and voltage at channel chID. + + + + hmpSet chID current voltage + + Units: A (ampere) V (volt) + set the current and voltage at channel chID. (??? + which channel does the 3He system use. ). + As a verification it displays + the voltage and current setpoints and measurements + Allowed chID ??? + What is a reasonable current ??? + + + + hmpOutput chID state + + get or set the output state at channel chID. + If state is not provided, returns the output + state of channel chID. Otherwise it sets the + output state of channel chID to + state. + Allowed state + on off + + + + + + Parameters + + + + Description + Explanation of what a command is doing when it is more than just setting a target + value. e.g. changing magnetic field in a superconducting magnet. + + + Known Issues + Alerts the user to known operational problems + + + Troubleshooting + What to do if things go wrong + + diff --git a/site_ansto/manual/dbSICSch31_UserGuideTaipan.xml b/site_ansto/manual/dbSICSch31_UserGuideTaipan.xml new file mode 100644 index 00000000..3b6c0cbf --- /dev/null +++ b/site_ansto/manual/dbSICSch31_UserGuideTaipan.xml @@ -0,0 +1,957 @@ + + + + Taipan User Guide - deprecated to db5SICSUserGuideTaipan.xml + Kirrily Rule + + 2013-04-09 16:47 + + + Quick start guide + To start running Gumtree, double click on the icon on the desktop. Two windows will + automatically open and you will be logged in as “Manager”. (Why manager, why not + user???) + This quick start guide assume SICS is configured for your experiment, and that it is + running. If it is not, go to the section + + To edit and run a batch file +
+ Script Perspective + + + +
+ Open one of the previous batch files by double clicking on a .tcl file in the + Project Explorer window. This will appear in the Tree View panel above. You can edit + this and save it with a new file name (File -> Save as). + To run this file, drag it into the Buffer Queue. You can either press Play, or + Validate to check the file. + All commands listed with > + should be typed into the SICS command line in Gumtree, or in the black + sicsclient window opened via PuTTy (Taipan ICS profile). Either of these will drive + the instrument. Only those commands executed from Gumtree will be printed into the + Log file. +
+ + Live visualisation of data +
+ Analysis Perspective + + + +
+ In the Scripting control window, choose + Load Script -> analysis -> live data to show a live plot as the + counts are taken. + In this window, you can tick (or untick) autofit (for a Gaussian fit), and + normalise (which normalises to time) You can also change which detector you wish to + see the counts in: + bm1_counts = monitor + bm2_counts = detector + You can also control the fitting range in this window + You can add past data sets to the Plot 2 window (beneath the liveplot window). + Highlight the plots you wish to add, be sure you have the correct detector choice + and x-axis parameter selected, then click on the button “Import Data Files to + Plot2”. These can also be removed for the plot. There is currently no fitting + procedure for Plot2. + + At any time, to interrupt SICS you can click on the red button, or type + >>INT1712 3 + +
+
+ + SICS status and login + Before you can control the instrument, there are 2 programs that need to be running, + SICS and Gumtree. SICS should already be configured and running by the local contact. + This procedure allows you to check this. + + Login to the SICS computer from a PuTTy terminal + + + On the Microsoft Windows computer in the instrument cabin, find the putty + program.
+ PuTTy icon on the Microsoft Windows desktop + + + +
+
+ + Choose the ICS computer from the list of Saved Sessions + + + Load and open + + + Use your NBI username and password, supplied by the Bragg Institute User + Office + + + You will now have a command prompt to a Linux operating system + +
+
+ + Check SICS status + Normally SICS will be running. You can check if SICS is running by using the PuTTy + window and at the Linux operating system command prompt type + > runsics status + + If the status shows that SICS is not running, or if there is a change in the SICS + configuration files e.g. a piece of sample environment has been added, you should + contact your local contact. + If the local contact has confirmed it is OK to restart SICS, then in the PuTTy + window type + > runsics stop + + > runsics start + + + + Login to SICS using the putty session + In the previous section, you logged into the ICS (instrument control server) + computer using putty. At the Linux operating system command prompt, you will run a + program that will give you a sics command prompt. + For most cases, you won't have to do this. A SICS command prompt is available in + Gumtree. + At the Linux operating system command prompt type + > sicsclient + You should see OK on the screen. + You now have a SICS command prompt. It may look strange since the cursor will be + on a blank line. You will not have access to the Linux operating system command + prompt until you log off. + Next step is to login to sics by typing + > user password where user is literally the word "user" and + the password will be supplied by the local contact + You can replace user with spy. The spy login provides read-only access to SICS. + + + + Login to SICS from Gumtree +
+ Gumtree connected to SICS + + + +
+ Normally, Gumtree will be connected to SICS, as in the figure above. + In Gumtree you reconnect to SICS if you restart SICS. This is done by clicking on + the little man at the bottom of the Gumtree screen and log in to SICS. He will be + standing still, and you will see the word Disconnected when not connected. He will + be running when connected as in the figure. You will then need to start a new Sics + terminal in Gumtree. From the left screen, in the project explorer window, Right + click on SICS and choose the option to start a new “SICS telnet terminal”. + + Reconnection won't work properly if SICS has changed configuration e.g. you've + added a piece of sample environment. In this case, when you restart SICS you + should also restart Gumtree + + +
+
+ + Preparing the spectrometer + + Aligning the spectrometer + + 12T magnet + When using the 12T magnet on TAIPAN, you must work in fixed Ki mode, as the + magnet is too heavy to move M2. Consider the energy transfer range required to + determine the appropriate Ei for these experiments. + + After discussing your instrument preferences with your local contact, they will + align the spectrometer in the following way: + + + Drive the spectrometer to the required incident energy (for elastic mode) + = e.g. 14.87meV + + + Drive the analyser arm to the straight-through position (s2=0, a1=0, a2=0, + atrans=19) + + + Visually check the straight-through arm and change any motors + accordingly + + + Place the Ni sample on the sample stage, and Borated Al sheets over the + analyser collimator. (the detector saturates at ~35,000 counts/sec) + + + Check M1 alignment with a rocking scan + + + Check S2=0 alignment with a rocking scan + + + Check A2=0 alignment with a rocking scan + + + Remove the Al attenuator and insert collimators if they need + changing + + + Perform the Ni powder calibration, using 5 peaks + + + From the least squares fitting of these peaks, update the new M1 offset, + M2 offset and S2 offset. + + + With the spectrometer at S2=-50, and atrans=0 (to view the Vanadium + incoherent peak from the Ni sample can), perform an A1 scan and an A1/A2 + scan around the elastic position. + + + Perform an En scan (where Ei will move if Ef is fixed). Here the FWHM of + the peak will give you the resolution of your instrument. + + + + + + <para>When driving Ei or Ef in this stage of the setup, the software calculates a + constant-Q instrument position based on the current UB matrix (usually from the + previous experiment). This will often drive S1, S2, sgu and sgl to unexpected + positions. To constrain these so that they don’t move unexpectedly, fix the + motors so they don't move. </para> + <para>Motors can be fixed (1) or unfixed (-1) and their status checked by typing the + motor name </para> + <para><command>> S1 fixed 1 (fixes S1) </command></para> + <para><command>> S1 fixed -1 (unfixes S1)</command></para> + <para>Alternatively you can drive vei which drives only the M1 and M2 motors – this + cannot be used in a scan command. </para> + <para><command>> drive vei 14.87 </command></para> + <para><command>> tasub update </command></para> + <para><command>> ei </command></para> + <para/> + </warning> + <warning> + <title/> + <para>You will often need to “home” the slits if they have been unplugged or removed + during the setup. The pa_left and pa_right slits can vary between -27 (open) and + 0 (closed), while the pa_top and pa_bottom slits can vary between -200 (open) + and 0 (closed). The same limits apply for the ps_slits. </para> + <para><command>> pa_left homerun 1 </command> (this will do all of the slits) + (??? really)</para> + </warning> + <para/> + <para>Confirm the following setups for your experiment. This can be done by typing + everything except the red values below: </para> + <para><command>> tasub ss -1 </command> (Scattering sense = M+1, S-1, A+1) </para> + <para><command>> tasub ana ss 1</command> (Scattering sense = M+1, S-1, A+1) </para> + <para><command>> tasub outofplane 0</command> (Confines the scattering sense to be in + the plane) </para> + <para><command>> tasub const ki / kf / elastic</command> (Defines whether Ei or Ef + are fixed, or if both are fixed) </para> + <para/> + </sect2> + <sect2> + <title>Aligning your sample + At the beginning of an experiment load the “Experimental setup” script (in the + scripts window, right screen) to list the most important configuration identifiers + for the experiment. These should appear in the header lines in your data files. For + instance, these include: + + + Proposal number and title + + + User’s name, and research team present + + + Local contact’s name + + + Sample information including number of samples and sample environment + requirements + + + Particular instrument setup features (scattering sense, collimation, + filters, slits etc) + + + Next the UB matrix needs to be set. To do this, you need to input the cell + parameters and at least 2 reflections which will define your scattering plane. These + can be calculated for your system using the file + “/home/taipan/calculatedDspaceTAIPAN.xls” or something similar, such as the ICSD + website. + + + > tasub listub + + shows the current UB matrix, cell parameters and reference + peaks + + + + > tasub cell a b c alpha beta gamma + + + input new lattice parameters + + + + > tasub addref qh qk ql + + adds a new reflection to the list when Taipan is at the + reflection + + + + > tasub addref qh qk ql a3 a4 sgu sgl ei ef + + adds a new reflection from a calculation + + + + > tasub addauxref qh qk ql + + adds a new reflection where S2 is calculated from the lattice + parameters only. This will also calculate the relative S1 + positions + + + + > tasub del num + + deletes one of the previously stored reflections + + + + > tasub listref + + lists the reflections that have been input + + + + > tasub makeub 1 2 + + calculates new UB matrix from reflections 1 and 2 + + + + > tasub calcang qh qk ql ei ef + + calculates reflection from UB matrix – be careful when changing + lattice parameters, as this command won’t use them! Output: M2 S1 S2 sgu + sgl A2 + + + + + Sample alignment + For Ei = Ef = 14.87 meV + > tasub cell 5.011 5.85 10.353 90 92.4 90 + + > tasub calcang 1 0 0 14.87 14.87 (calculated S2 = 27.1) + + > tasub calcang 1 1 0 14.87 14.87 (calculated S2 = 35.9) + + > tasub calcang 0 2 0 14.87 14.87 (calculated S2 = 47.3) + + Drive the instrument to the calculated S2 value of a particular peak. The + other motor positions are not correctly set at this point. This will also give + you a relative s1 position between the peaks. + Scan S1 until you find the peak. + > bmonscan clear + > bmonscan add S1 -10 0.2 (motor name, starting point, + step size) + > bmonscan run 60 timer 5 (scans 60 points, for a time + of 5 seconds per point) + OR + > runscan s1 -10 0 101 time 5 (motor, start, stop, # + pts, time (the mode in secs)) + (this does not work for multiple motors yet) + (This step should hopefully be replaced by the differential scan, or the + rate-meter) + Once the peak position (S1) has been optimised, scan sgu and sgl + > runscan sgl -10 10 21 time 1 + > runscan sgu -10 10 21 time 1 + Once the peak has been optimised with SGU and SGL (and you are sitting at the + peak position!!) you can set this as one of your reference peaks, where the + current motor values define the peak position. + > tasub addref 1 0 0 + Calculate the values of S1 and S2 for the next peak – use the + > tasub calcang qh qk ql ei ef + command to see the relative values of S1 and S2 as calculated from the lattice + parameters! + + + Repeat for at least one other peak, preferably one orthogonal to the first. + > tasub addref 0 0 1 + > tasub listref (to see the observed peaks in your list + (e.g. number 4 and 5)) + > tasub makeub 4 5 (this used peaks 4 and 5 to calculate + the UB matrix) + > tasub update + > tasub listub + Once this has been set, then you should be able to drive your spectrometer to + any accessible qh, qk, ql and en. + + + + At the end of each change, be sure to type > tasub + update + + + + + Reducing background with a slit scan + Once your sample has been aligned, add the PG filter to the instrument. You could + test the effectiveness of the filter by scanning a peak that will display higher + order scattering – e.g. (½ 0 0) which does not exist except from higher order + scattering from the (1 0 0 ). Sometimes you might want to add an additional filter. + Finally you can scan your slits to reduce the background scattering. + > runscan pa_left -15 -2 27 time 1 (scans 27 points, for a + time of 1 seconds per point) + After this, consider if you need to add more shielding to the detector drum or + any other part of the instrument (e.g. manual slits on analyser arm, additional PG + filters). + + + Setting the (new) lattice parameters + When the sample temperature has stabilized at the required temperature, the low + temperature lattice parameters can be checked. For example, a tetragonal system in + the ab-scattering plane can be optimized as follows: + > drive qh 5 qk 0 ql 0 en 0 + > runscan qh 4.985 5.015 31 time 5 + The centre of this scan should be close to 5, but could be shifted. This will be + the fit value from the scan. Then you can change the + a lattice parameter accordingly + in tasub + + anew=aold(peakcalculated/peakcentre + from scan) replace with jpg of equation??? MathML doesn't transform + to pdf using oxygen xslt. + > tasub cell a b c alpha beta gamma + The next peak can be aligned in the same way + > drive qh 0 qk 3 ql 0 en 0 + > runscan qk 2.985 3.015 31 time 5 + Find the centre of this scan then you can change the + b lattice parameter accordingly + in tasub. Also, while sitting on the peak, perform the + > tasub addref 0 3 0 + If your sample is cubic (and remains cubic at low temperatures) and you are in the + HK0 scattering plane, then the lattice parameters are best set with a peak that + involved both H and K – for instance the 110 peak. + Make sure after you have changed your lattice parameters, and both peaks have been + added to the reference list that you remake your ub matrix! + + + + Running an experiment + + Creating and running batch files + 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. + 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. + + + + Validation of scans + 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. + + + Example experiment script + + + # 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) + + + + + Motor errors + + + <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> + </sect2> + <sect2> + <title>Creating and accessing log files + There are new log files written for each experiment. These are located in: + J:\data\current\reports\exp#\LogFile.txt 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. + Use a program such as WinSCP to transfer files to your computer. The files will be + in + /experiments/taipan/data/current/reports/exp#/LogFile.txt. + These files are archived to a proposal directory at the end of each cycle e.g. + /experiments/taipan/data/proposal/proposal#/reports/exp#/LogFile.txt + + + + + Sample environment control + + Cryo-furnace with Lakeshore 340 controller + The typical closed cycle cryo-furnace used on Taipan is cryo-furnace #1 (CF1). + This uses a Lakeshore 340 controller. SICS is capable of reading and driving the + temperature on this device. The Moxa box must be installed, and connected to the + Lakeshore hardware. In the future, the Lakeshores will have a dedicated Moxa box. + + + + > tc1_driveable2 + + shows the sample temperature from channel A + + + + > run tc1_driveable 200 + + drives the regulation temperature (B) to 200K + + + + > wait 600 + + shows wait in seconds + + + + > drive tc1_driveable 200 + + drives the regulation temperature (B) to 200K and waits for it to be + within 1K of this value before continuing to the next command + + + + >sct_ls340_tc1 send "RANGE?" + + this will query the heater power range – 0 = off, 5 = 100W + + + + >sct_ls340_tc1 send "RANGE 1" + + this will set the heater power range. Set to a value between 0-5 + + + + + The fine control of the temperature parameters, such as tolerance, heater power + range, etc, can be adjusted by clicking on the SIC Server tree view. Alternatively + you can use certain commands listed below in a batch file: + Check the heater power range of the closed cycle. To heat the sample relatively + quickly you need to have the heater range to 5. To reach base temperature (10K or + less), the heater range should be set to 4 or lower. +
+ Setting temperature + + + +
+ These detailed commands can be used (also in batch files) to control the + temperature parameters: + + + + > hlist –val /sics/tc1/sensor + + shows set points and sensors etc + + + + + > hget /sics/tc1/sensor/setpoint1 + + to show the temperature + + + + + > hset /sics/tc1/sensor/setpoint1 200 + + to set the temperature to 200K – there is no blockage of the drive + functions when this command is used + + + + + > > hset /sample/tc9/Loop1/setpoint 200 + + to set the temperature of the 12T magnet to 200K + + + + + > hget /sample/tc9/Loop3/sensor + + to read the temperature of the 12T magnet + + + + + > hset /sics/tc1/heater/heaterRange 5 + + for 100W power, or 4 for 10W power + + + + + > hset /sics/tc1/control/tolerance 1 5 + + to set the tolerance of 5K to reach desired temperature + + + + Sics and gumtree can also control the high voltage rig which is also set up on + CF1. The following commands will be useful + + + + > pulseron + + turn on HV + + + + + > pulseroff + + turn off HV + + + + + > getvolt + + + + + + + > setvolt 100 + + sets the voltage to 100V + + + +
+ + 12T magnet control. Important procedures before ramping the field. + + Protect the slits + Once you have set your slits, turn the motion control OFF (on the same box as the shutter control) and unplug the 4 cables. Turn the motion control ON + again. The slits are now in a safe mode for driving the field. + + + Stop magnet quenching + To perform field ramps safely (without risk of quenching), you should put the + beam stop down. To do this, turn the motion control OFF (on the same box as the + shutter control), ramp the field into persistent mode and then turn the motion + control ON again. Once you have reached your new field, drive to a new Q-E + position to ensure that all the motors still behave correctly after the motion + OFF. If not, you might have to reset particular motors: + > m1 send RS (this will reset the m1 motor controller) + To keep the beam stop down + + + Turn off motion control + + + Close valve located at the base of the beam stop + + + Turn on motion control + + + + + + 12T magnet control. Driving s1 + There are two parameters you will need for driving the s1 via + the sample stick. vs1 drives the motor from the command line, + while dummy_s1 is in the UB matrix and scan parameters. So use + these in the following way: + > drive vs1 30 (in the command line – this drives the motor + to a value) + > runscan dummy_s1 25 35 101 time 1 + + > runscan qh + + When running a powder sample in the magnet, fix dummy_s1 + + > dummy_s1 fix 1 (> dummy_s1 fix 0 to unfix) + +
+ + Sample environment configuration (Local contact only) + On ics1-taipan, you'll be editing SICS configuration files so that SICS will load the + driver for a device. The editor is vim. This process will be done + through a graphical interface in the future. + + <command>vim</command> commands + + :colorscheme ron + + Change the color scheme. This make editing easier + + + + /tasub + + This searches for the string “tasub” + + + + i + + insert mode. Add text. + + + + r + + replace. Replace a character. + + + + x + + delete + + + + ESC key + + escape out of the current mode + + + + + Lakeshore 340 configuration + When using the Lakeshore 340, various things need to be changed in the + configuration files. This should only be done by the local contact. + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + Remove both the # in the following four lines + #catch + #add_sct_… + # hsetprop + #}msg + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + + High voltage configuration + When using the High voltage setup, various things need to be changed in the + configuration files. This should only be done by the local contact. + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + Remove both the # in the four lines + # Make AsyncP… + # Make AsyncP… + # pulser delay + # pulser timeout + + + Save and quit by typing :wq + + + + Make sure that the IP on the function generator is set to the following: + 137.157.203.149 + + + Get an electrician such as Dan Bartlett to confirm the setup is safe! + + + + > runsics stop + + + > runsics start + + + + + 12T magnet configuration + When using the 12T magnet, various things need to be changed in the configuration + files. This should only be done by the local contact. + + + Turn on the magnet laptop – check that the Ethernet cable and grey cable + are connected. + + + Click on “SICS oxford instruments” to bring up the front panel. + + + Click on ITC503 Front Panel + + + open a Putty terminal + + + > cd /usr/local/nbi/sics/taipan/server + + + > sudo vim taipan_configuration.tcl + + + On line 59, remove the # from # fileeval ../aerotech.tcl + + + On line 61 is s1 in the TASUB command. Change this to vs1. + + + Save and quit by typing :wq + + If you made a mistake, quit without changing by typing + :q! and start again. + + + > cd config/motors/ + + + > sudo vim motor_configuration.tcl + + + /magnet + + Search for the string “magnet” + + + The following {0} should change to {1} for the magnet: + If {0}{ + # Convert magnet angle to s1 angle + VarMake vs1speed float user + vs1speed 1 + + } } + + + Save and quit by typing :wq + + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim extraconfig.tcl + + + #--------------- + # 12T magnet + #--------------- + Remove the # in the following lines (choose which temp controller method + you require – running with the Mercury, or as Legacy mode) + #add_oxford_magnet "magnetic" 137.157.203.153 + #add_oxford_mercury "tc9" 137.157.203.151 7020 2.0 "\r" + #add_itc500 tc1 137.157.203.151 7020 2.0 "@8" This is for running in + Legacy Mode (to look like ITC500) + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + + <superscript>3</superscript>He configuration + When using the 3He setup, various things need to be + changed in the configuration files. This should only be done by the local contact. + When using the 3He setup, you need to switch to the + appropriate speeds and accelerations for the elongated instrument. To do this, in + the PuTTy window, go to + + + > cd /usr/local/nbi/sics/taipan/ + + + > vim taipan_setup.txt + + + Change the 0 to 1 to turn on this file + + + Save and quit by typing :wq + + + + > runsics stop + + + > runsics start + + + + + + Known Issues + Alerts the user to known operational problems + + + Troubleshooting + What to do if things go wrong + +
diff --git a/site_ansto/manual/dbSICSch32_platypus_disk_chopper.xml b/site_ansto/manual/dbSICSch32_platypus_disk_chopper.xml new file mode 100644 index 00000000..920082fc --- /dev/null +++ b/site_ansto/manual/dbSICSch32_platypus_disk_chopper.xml @@ -0,0 +1,306 @@ + + + + Astrium Disk Chopper. Under construction. + Nick Hauser + + 2009-03-31 15:50 + + + Commands + This chapter is untested documentation. It was inherited from the velocity selector + documentation, with alterations based on an email from Ferdi to Andy on 11th May 2011. + The Astrium Disk Chopper is a SICS script context object???. There should be 2 parts, + the script context object, which has the name + /instrument/disk_chopper and the 2 driveable interfaces to the + object, which have the names chopper_speed and + chopper_phase. Hence you can drive and + run + chopper_speed and chopper_phase. To get other + parameters use hget or /instrument/disk_chopper/. + hset doesn't work for these nodes. + + + run chopper_speed + rpm + + + Not implemented + Units: RPM + Runs the disk chopper to rpm + + + + drive chopper_phase + phase_angle + + + Not implemented + Units: Angstroms + Is the same as run but it blocks the client that + requested the drive from issuing commands until the task + has finished. + + + + hget /instrument/disk_chopper/ch1/state + + Get the state of chopper 1 ch1. The normal operating + state under SICS control is CONTROL. + Check??? + + + + hlist /instrument/disk_chopper + + + Lists all the disk_chopper nodes + + + + hset + /instrument/disk_chopper/chopper/node + val + + + Not implemented + Set val on a node of + chopper + + + + + hget + /instrument/disk_chopper/chopper/node + + Get the value of a chopper/node + + + + The disk chopper is under the + /instrument/disk_chopper node in hipadaba, which is + where it will be found when using the Gumtree TableTree. This complies with the NeXus + standard. + + + Parameters + For more detailed description of these parameter, please see the ASTRIUM chopper + manual in the NBI content management system. + There are 2 levels in the tree. + /instrument/disk_chopper/ This level contains the frequently used + speed and phase values for each chopper, and the overall error state. + /instrument/disk_chopper/chopper/ e.g. + /instrument/disk_chopper/ch1. The lower level contains all the chopper specific + parameters + + Chopper general commands + + hget /instrument/disk_chopper/device_error + + + to do ??? + + + + hget /instrument/disk_chopper/geometry + + + to do ??? + + + + hget + /instrument/disk_chopper/ch1speed + + + Units: RPM + Actual speed ??? + Allowable values: + + + + + + + + hget + /instrument/disk_chopper/ch1phase + + + Units: degrees + Phase referenced to ??? + Allowable values: + + + + + + + + hlist + /instrument/disk_chopper/ch1/ + + + Specific chopper nodes + Allowable values: + + + + + + + + + Chopper specific commands + + hget + /instrument/disk_chopper/chopper/state + + + CHECK this section ???. Inherited from velocity selector documentation + Privilege = User + Get the state. + Is not being controlled. Should be at zero rpm.??? + Check + A reset has been issued by the disk chopper client + program + Control has been requested by SICS or the disk + chopper client program + The disk chopper has the brake applied due to an + hset setstate brake request, the + Brake button applied on the disk chopper client + program, or due to a fault condition + + Powerloss measurement button applied on the disk + chopper client program + + Emergency stop button applied on the disk chopper + client program + + + + hget + /instrument/disk_chopper/chopper/aspeed + + + Units = rpm + Get the actual speed + + + + hget + /instrument/disk_chopper/chopper/aphase + + + Units = degrees + Get the actual phase + + + + hget + /instrument/disk_chopper/chopper/aveto + + Get the veto state + Returned values: + not OK + OK + + + + hget + /instrument/disk_chopper/chopper/dir + + + Units = Celsius + Get the cooling water inlet temperature + + + + hget + /instrument/disk_chopper/chopper/flowr + + + Units = litres/min + Get the cooling water flow rate + + + + hget + /instrument/disk_chopper/chopper/rspeed + + + Units = rpm + Get the requested speed + + + + hget + /instrument/disk_chopper/chopper/rphase + + + Units = degrees + Get the requested phase + + + + hget + /instrument/disk_chopper/chopper/mtemp + + + Units = Celsius + Get the ???? temperature + + + + hget + /instrument/disk_chopper/chopper/wtemp + + + Units = Celsius + Get the cooling water outlet temperature + + + + + hget + /instrument/disk_chopper/chopper/mvacu + + + Units = 10-3bar + Get the vacuum + + + + hget + /instrument/disk_chopper/chopper/monit + + ???? + + + + hget + /instrument/disk_chopper/chopper/mvibr + + Units = mm/s ??? + Get the vibration + + + + hget + /instrument/disk_chopper/chopper/date + + ??? + + + + hget + /instrument/disk_chopper/chopper/time + + ??? + + + + + diff --git a/site_ansto/manual/dbSICSch33_UserGuideQuokka.xml b/site_ansto/manual/dbSICSch33_UserGuideQuokka.xml new file mode 100644 index 00000000..0559a3f9 --- /dev/null +++ b/site_ansto/manual/dbSICSch33_UserGuideQuokka.xml @@ -0,0 +1,69 @@ + + + + User Guide for Small Angle Scattering. Quokka EditionANSTO + version 0.2. May 2013 + + Kirrily RuleNick + Hauser + + This is a cover + This guide is not intended to replace your local contact, but to jog your memory + if you are operating independently. Anything strange, call your local + contact… + + Manually maintained from this source ie. can't Xinclude a book into a book. + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + EXPERIMENT + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + + CONFIGURATION AND TROUBLESHOOTING + + + + FIXME: MISSING XINCLUDE CONTENT + + + + + diff --git a/site_ansto/manual/dbSICSch34_fermi_chopper.xml b/site_ansto/manual/dbSICSch34_fermi_chopper.xml new file mode 100644 index 00000000..2b6fe626 --- /dev/null +++ b/site_ansto/manual/dbSICSch34_fermi_chopper.xml @@ -0,0 +1,573 @@ + + + + SKF Fermi Chopper. Under construction. + Nick Hauser + + 2009-03-31 15:50 + + + Commands + This chapter is untested documentation. It was inherited from the velocity selector + documentation, with alterations based on an email from Ferdi to Andy on 11th May 2011. + The Mirrortron/SKF fermi chopper is a SICS script context object???. + There are 2 choppers, the master chopper which uses the prefix mch + and the slave chopper sch. There should be 2 parts, the script + context object, which has the name /instrument/fermi_chopper and the + 2 driveable interfaces to the object, which have the names mchs for + speed and mchp for phase. Hence you can drive and + run the mchs and mchp. With + the master/slave chopper setup, the slave indicates the controller is in PHASE CONTROL + MODE to a master controller. This is required if the slave controller is operating + sub-synchronously to the REFERENCE parameter. + To get other parameters use hget or + /instrument/fermi_chopper/. hset doesn't work + for these nodes. + + + drive mchs + rpm + + + Units: RPM + Runs the fermi chopper to rpm + Allowed values mchs (master), schs + (slave) + + + + drive mchp + phase + + + Units: ns??? + Allowed values mchp (master), schp + (slave) + + + + hlist /instrument/fermi_chopper + + + Lists all the fermi_chopper nodes + + + + hset + /instrument/fermi_chopper/chopper/node + val + + + Set val on a node of + chopper + + + + + hget + /instrument/fermi_chopper/chopper/node + + Get the value of a chopper/node + + + + The fermi chopper is under the + /instrument/fermi_chopper node in hipadaba, which is + where it will be found when using the Gumtree TableTree. This complies with the NeXus + standard. + + + Parameters + For more detailed description of these parameter, please see the MIRRORTRON/SKF chopper manual in the NBI content management system. + /instrument/fermi_chopper/chopper/ e.g. + /instrument/fermi_chopper/mch. Contains all the chopper specific parameters + + + hget + /instrument/fermi_chopper/chopper/device_error + + + CHECK this section ???. Inherited from velocity selector documentation + Description??? + + + + hget + /instrument/fermi_chopper/chopper/rotation_speed + + + Units = rpm + Get the actual speed + + + + hget + /instrument/fermi_chopper/chopper/phase_veto_count + + + VETO is the number of TDC pulses that have fallen outside the veto window + or occurred when a Reference Loss alarm was present since the veto count was + last reset. + + + + hget + /instrument/fermi_chopper/chopper/phase_nonveto_count + + NON_VETO is the number of TDC pulses that fall inside the veto window + without Reference Loss alarm being present since the veto count was last + reset + + + + hget + /instrument/fermi_chopper/chopper/phase_acc + + + Units = µs + PHASE ACCURACY is calculated as the mean value of phase errors. PHASE + ACCURACY should equal the PHASE DELAY motor parameter when the machine is + phased locked + + + + hget + /instrument/fermi_chopper/chopper/phase_rep + + + Units = µs + PHASE REPEATABILITY is the standard deviation of phase. + + + + hget + /instrument/fermi_chopper/chopper/phase_ok + + + Units = % + PHASE OK is the percentage of TDC pulses that fall in a time window + centered around the Reference-In pulse adjusted for PHASE DELAY. The width + of time window is defined by the VETO WINDOW parameter. + + + + hset hget + /instrument/fermi_chopper/chopper/vetowin100ns + + + Units = 100ns + This command sets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is + re-powered.) + + + + hset hget + /instrument/fermi_chopper/chopper/vetowin50ns + + + Units = 50ns + This command sets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is re-powered.) + Although the parameter is sent with resolution of 10ns, it will be rounded + and used with precision of 50ns. + + + + hset hget + /instrument/fermi_chopper/chopper/mode + + + Sets the MOTOR CONTROL MODE (0=RPM, 1=PHASE) + + + + + hset hget + /instrument/fermi_chopper/chopper/speed_setpt + + + Units = RPM + This command sets RUN SPEED set point parameter value in non-volatile + memory. This only sets this value, it does not run the motor to this value. + + + + + hset hget + /instrument/fermi_chopper/chopper/prop_gain + + Sets the motor control proportional gain parameter and saves it in + non-volatile memory. + + + + hset hget + /instrument/fermi_chopper/chopper/int_gain + + Sets the motor control integral gain parameter and saves it in + non-volatile memory + + + + hset hget + /instrument/fermi_chopper/chopper/phase_gain + + Sets the motor control phase gain parameter and saves it in non-volatile + memory. + + + + hset hget + /instrument/fermi_chopper/chopper/ref_delay + + Units = ms + Sets the phasing time delay and saves it in non-volatile memory + + + + hset hget + /instrument/fermi_chopper/chopper/ref_period + + Units = ns + Sets the reference period and saves it in non-volatile memory + + + + hset hget + /instrument/fermi_chopper/chopper/sync_srce + + Sets the sync source (0=external, 1=internal) + + + + hset hget + /instrument/fermi_chopper/chopper/motdir + + Sets the motor direction (0=CW, 1=CCW) + + + + hset hget + /instrument/fermi_chopper/chopper/idle_toggle + + ??? + + + + /instrument/fermi_chopper/chopper/system_status + e.g. /instrument/fermi_chopper/mch/system_status. Contains the system status, which are + chopper specific. hget only. + These are read-only binary, allowed values 0 or 1. + + + hget + /instrument/fermi_chopper/chopper/system_status/avc_on + + gets the ??? 1=true, 0=false + + + + hget + /instrument/fermi_chopper/chopper/system_status/motdir + + gets the motor direction (0=CW, 1=CCW) + + + + hget + /instrument/fermi_chopper/chopper/system_status/phase_locked + + 1=TDC signal is locked to reference signal. This corresponds to the PHASE + LOCK relay contact. + + + + hget + /instrument/fermi_chopper/chopper/system_status/lev_complete + + 1=Rotor is Levitated + + + + hget + /instrument/fermi_chopper/chopper/system_status/alarm + + 1=Shutdown is latched. The state of this bit matches the status of the + front panel Fault LED and the SHUTDOWN relay contact. + + + + hget + /instrument/fermi_chopper/chopper/system_status/run + + 1=Permission to run motor. This is given when the RUN bit is set and the + SHUTDOWN bit is not set. This indicates levitation complete AND position + shutdown alarms are enabled. It matches the status of the RUN relay + contact. + + + + hget + /instrument/fermi_chopper/chopper/system_status/up_to_speed + + 1=Speed is within 1% of the OPERATING SPEED parameter + + + + hget + /instrument/fermi_chopper/chopper/system_status/ok + + 1=Controller is able and ready to levitate, or is levitating. This + corresponds with the REALY LED flashing or being steady green + + + + + /instrument/fermi_chopper/chopper/intlck_status + e.g. /instrument/fermi_chopper/mch/intlck_status. Contains the interlock status. Check + here if a chopper won't do as it is commanded. To run a chopper, all these status must + be 0. hget only. + These are read-only binary, allowed values 0 or 1. + + + hget + /instrument/fermi_chopper/chopper/intlck_status/test_mode + + 1=Test mode active (rotation prevented). + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/cc_shutdown_req + + 1= Motor controller requests shutdown of levitation controller because it + has detected a shutdown condition. + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/dsp_summ_shtdwn + + 1= DSP Summary Shutdown. Levitation controller request a motor + shutdown. + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/cooling_loss + + 1 = Cooling Loss Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/spd_sensor_loss + + 1 = Speed Sensor Loss Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/ref_sig_loss + + 1 = Reference Signal Loss + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/over_temp + + 1= Motor Over Temperature Shutdown or RTD Over Temperature + Shutdown. + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/vac_fail + + 1 = Vacuum Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/overspeed_or_breakfail + + 1 = Over Speed Trip Shutdown or Motor Brake Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/cc_wd_fail + + 1 = Customer Card Watch Dog Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/ext_fault + + 1 = External Fault Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/ups_fail + + 1= UPS Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/emerg_stop + + 1 = Emergency Stop Shutdown + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/pos_alarm + + 1 = Position Shutdown on one of the bearing axis + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/osc_fail + + 1 = Oscillator Fail Shutdown. + + + + hget + /instrument/fermi_chopper/chopper/intlck_status/dsp_wd_fail + + 1 = DSP Watch Dog Fail Shutdown + + + + /instrument/fermi_chopper/chopper/control/ + e.g. /instrument/fermi_chopper/mch/control. Contains the settable parameters that + control the chopper. + + + hget + /instrument/fermi_chopper/chopper/control/device_error + + ??? is this the overall error state + + + + hget + /instrument/fermi_chopper/chopper/control/set_vetowin100 + + 1= Motor controller requests shutdown of levitation controller because it + has detected a shutdown condition. + + + + hget + /instrument/fermi_chopper/chopper/control/set_vetowin50 + + 1= DSP Summary Shutdown. Levitation controller request a motor + shutdown. + + + + hget + /instrument/fermi_chopper/chopper/control/set_mode + + 1 = Cooling Loss Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_rotspeed + + 1 = Speed Sensor Loss Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_prop_gain + + 1 = Reference Signal Loss + + + + hget + /instrument/fermi_chopper/chopper/control/set_int_gain + + 1= Motor Over Temperature Shutdown or RTD Over Temperature + Shutdown. + + + + hget + /instrument/fermi_chopper/chopper/control/set_phase_gain + + 1 = Vacuum Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_ref_delay + + 1 = Over Speed Trip Shutdown or Motor Brake Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_ref_period + + 1 = Customer Card Watch Dog Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_sync_source + + 1 = External Fault Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/set_motor_dir + + 1= UPS Fail Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/start + + 1 = Emergency Stop Shutdown + + + + hget + /instrument/fermi_chopper/chopper/control/stop + + 1 = Position Shutdown on one of the bearing axis + + + + hget + /instrument/fermi_chopper/chopper/control/idle_toggle + + 1 = Oscillator Fail Shutdown. + + + + hget + /instrument/fermi_chopper/chopper/control/reset + + 1 = DSP Watch Dog Fail Shutdown + + + + + diff --git a/site_ansto/manual/dbSICSch34_fermi_chopper_shortnames.xml b/site_ansto/manual/dbSICSch34_fermi_chopper_shortnames.xml new file mode 100644 index 00000000..24d5c670 --- /dev/null +++ b/site_ansto/manual/dbSICSch34_fermi_chopper_shortnames.xml @@ -0,0 +1,572 @@ + + + + SKF Fermi Chopper. Under construction. + Nick Hauser + + 2009-03-31 15:50 + + + Commands + This chapter is untested documentation. The node names and descriptions should be + correct. There will be some further modifications made to the chopper driver. + The Mirrortron/SKF fermi chopper is a SICS script context object???. + There are 2 choppers, the master chopper which uses the prefix mch + and the slave chopper sch. There should be 2 parts, the script + context object, which has the name /instrument/fermi_chopper and the + 2 driveable interfaces to the object, which have the names mchs for + speed and mchp for phase. Hence you can drive and + run the mchs and mchp. With + the master/slave chopper setup, the slave indicates the controller is in PHASE CONTROL + MODE to a master controller. This is required if the slave controller is operating + sub-synchronously to the REFERENCE parameter. + + + drive mchs + rpm + + + Units: RPM + Runs the fermi chopper to rpm. This will not + always be exactly the value that you set. See permspd below. + Allowed values mchs (master), schs + (slave) + + + + mchs permspd + rpm + + + Units: RPM + Returns the permitted speed closest to the requested + rpm. The choppers have a range of speeds that are + not allowed due to resonances. The SICS driver will try to set the chopper + to a speed as close as possible to the requested speed. + Allowed values mchs (master), schs + (slave) + + + + drive mchp + phase + + + Units: ns + Allowed values mchp (master), schp + (slave) + + + + mchs idle + + + To change the direction of a chopper, you need to run it to the idle state + first, which should already be set to 0 rpm, then drive the chopper to in + the opposite direction. e.g. + mchs idle + drive mchs 4000 + Simply putting in a value of rpm of the opposite sign won't work. + Allowed values mchs (master), schs + (slave) + + + + hlist /instrument/fermi_chopper + + + Lists all the fermi_chopper nodes + + + + hset + /instrument/fermi_chopper/chopper/node + val + + + Set val on a node of + chopper + + + + + hget + /instrument/fermi_chopper/chopper/node + + Get the value of a chopper/node + + + + Allowed speed table ??? + The fermi chopper is under the + /instrument/fermi_chopper node in hipadaba, which is + where it will be found when using the Gumtree TableTree. This complies with the NeXus + standard. + + + Parameters + For more detailed description of these parameter, please see the MIRRORTRON/SKF chopper manual in the NBI content management system. + /instrument/fermi_chopper/chopper/ e.g. + hget /instrument/fermi_chopper/mch/rotation_speed + + Contains all the chopper specific parameters + + + device_error + + + Communications error reported by the chopper controller. + + + + rotation_speed + + + Units = rpm + Get the actual speed + + + + phase_veto_count + + + Get the veto count. VETO is the number of TDC pulses that have fallen + outside the veto window or occurred when a Reference Loss alarm was present + since the veto count was last reset. + + + + phase_nonveto_count + + Get the non veto count. NON_VETO is the number of TDC pulses that fall + inside the veto window without Reference Loss alarm being present since the + veto count was last reset + + + + phase_acc + + + Units = µs + Get the phase accuracy. PHASE ACCURACY is calculated as the mean value of + phase errors. PHASE ACCURACY should equal the PHASE DELAY motor parameter + when the machine is phased locked + + + + phase_rep + + + Units = µs + Get the phase repeatability. PHASE REPEATABILITY is the standard deviation + of phase. + + + + phase_ok + + + Units = % + Get phase OK. PHASE OK is the percentage of TDC pulses that fall in a time + window centered around the Reference-In pulse adjusted for PHASE DELAY. The + width of time window is defined by the VETO WINDOW parameter. + + + + vetowin100ns + + + Units = 100ns + This command gets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is + re-powered.) + + + + vetowin50ns + + + Units = 50ns + This command gets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is re-powered.) + Although the parameter is sent with resolution of 10ns, it will be rounded + and used with precision of 50ns. + + + + mode + + + Gets the MOTOR CONTROL MODE. + 0=RPM, 1=PHASE (default) + + + + speed_setpt + + + Units = RPM + This command gets RUN SPEED set point parameter value in non-volatile + memory. This only sets this value, it does not run the motor to this value. + + + + + prop_gain + + Gets the motor control proportional gain parameter and saves it in + non-volatile memory. + + + + int_gain + + Gets the motor control integral gain parameter and saves it in + non-volatile memory + + + + phase_gain + + Gets the motor control phase gain parameter and saves it in non-volatile + memory. + + + + ref_delay + + Units = ms + Gets the phasing time delay and saves it in non-volatile memory + + + + ref_period + + Units = ns + Gets the reference period and saves it in non-volatile memory + + + + sync_srce + + Gets the sync source (0=external, 1=internal) + + + + motdir + + Gets the motor direction (0=CW, 1=CCW) + + + + idle_toggle + + Gets the idle toggle. This is always 1. + + + + + System status + /instrument/fermi_chopper/chopper/system_status + e.g. + hget /instrument/fermi_chopper/mch/system_status/motdir. + Contains the system status, which are chopper specific. + hget only. + These are read-only binary, allowed values 0 or 1. + + + avc_on + + gets the ??? 1=true, 0=false + + + + motdir + + gets the motor direction (0=CW, 1=CCW) + + + + phase_locked + + 1=TDC signal is locked to reference signal. This corresponds to the + PHASE LOCK relay contact. + + + + lev_complete + + 1=Rotor is Levitated + + + + alarm + + 1=Shutdown is latched. The state of this bit matches the status of the + front panel Fault LED and the SHUTDOWN relay contact. + + + + run + + 1=Permission to run motor. This is given when the RUN bit is set and + the SHUTDOWN bit is not set. This indicates levitation complete AND + position shutdown alarms are enabled. It matches the status of the RUN + relay contact. + + + + up_to_speed + + 1=Speed is within 1% of the OPERATING SPEED parameter + + + + ok + + 1=Controller is able and ready to levitate, or is levitating. This + corresponds with the REALY LED flashing or being steady green + + + + + + Interlock status + /instrument/fermi_chopper/chopper/intlck_status + e.g. + hget /instrument/fermi_chopper/mch/intlck_status/test_mode. + Contains the interlock status. + hget only. + Check here if a chopper won't do as it is commanded. To run a chopper, all these + status must be 0. + These are read-only binary, allowed values 0 or 1. + + + test_mode + + 1=Test mode active (rotation prevented). + + + + cc_shutdown_req + + 1= Motor controller requests shutdown of levitation controller because + it has detected a shutdown condition. + + + + dsp_summ_shtdwn + + 1= DSP Summary Shutdown. Levitation controller request a motor + shutdown. + + + + cooling_loss + + 1 = Cooling Loss Shutdown + + + + spd_sensor_loss + + 1 = Speed Sensor Loss Shutdown + + + + ref_sig_loss + + 1 = Reference Signal Loss + + + + over_temp + + 1= Motor Over Temperature Shutdown or RTD Over Temperature + Shutdown. + + + + vac_fail + + 1 = Vacuum Fail Shutdown + + + + overspeed_or_breakfail + + 1 = Over Speed Trip Shutdown or Motor Brake Fail Shutdown + + + + cc_wd_fail + + 1 = Customer Card Watch Dog Fail Shutdown + + + + ext_fault + + 1 = External Fault Shutdown + + + + ups_fail + + 1= UPS Fail Shutdown + + + + emerg_stop + + 1 = Emergency Stop Shutdown + + + + pos_alarm + + 1 = Position Shutdown on one of the bearing axis + + + + osc_fail + + 1 = Oscillator Fail Shutdown. + + + + dsp_wd_fail + + 1 = DSP Watch Dog Fail Shutdown + + + + + + Control commands + /instrument/fermi_chopper/chopper/control/ + e.g. + hset /instrument/fermi_chopper/mch/control/setvetowin100 700 + Contains the settable parameters that control the chopper. + + + device_error + + ??? is this the overall error state. You can't set it, so why is it + under control? + + + + set_vetowin100 + + Units = 100ns + This command sets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is + re-powered.) + + + + set_vetowin50 + + Units = 50ns + This command sets the VETO WINDOW parameter in volatile memory. (This + parameter returns to its default value when the controller is + re-powered.) Although the parameter is sent with resolution of 10ns, it + will be rounded and used with precision of 50ns + + + + set_mode + + Sets the MOTOR CONTROL MODE (0=RPM, 1=PHASE) + + + + set_rotspeed + + Units = rpm + Set the target speed + + + + set_prop_gain + + Sets the motor control proportional gain parameter and saves it in + non-volatile memory. + + + + set_int_gain + + Sets the motor control integral gain parameter and saves it in + non-volatile memory. + + + + set_phase_gain + + Sets the motor control phase gain parameter and saves it in + non-volatile memory + + + + set_ref_delay + + Units = ns + Sets the phasing time delay and saves it in non-volatile memory + + + + set_ref_period + + Units = ns + Sets the reference period and saves it in non-volatile memory + + + + set_sync_source + + Sets the sync source (0=external, 1=internal) + + + + set_motor_dir + + Sets the motor direction (0=CW, 1=CCW) + + + + start + + run to the target value from set_rotspeed + + + + stop + + will drive to 0 rpm and delevitate + + + + idle_toggle + + Toggles between run and idle state. + The state of the controller can be requested. A command to read Modbus + coil 3 will be added. + Allowed value: 1 + + + + reset + + If the controller is in an alarm state, you need to send this reset + before setting other parameters. + + + + + + diff --git a/site_ansto/manual/dbSICSch3_histogram_control.xml b/site_ansto/manual/dbSICSch3_histogram_control.xml new file mode 100644 index 00000000..5a2cf298 --- /dev/null +++ b/site_ansto/manual/dbSICSch3_histogram_control.xml @@ -0,0 +1,303 @@ + + + + Histogram Control + Ferdi Franceschini + + 2008-09-17 12:24 + + + <command>histmem</command> command + You can start and stop acquisitions and do limited configuration the histogram server + with the histmem command. + Note that histmem does not save data. You have to explicitly use the save command. + The histogram memory server is a component that is separate from SICS. SICS currently + exposes only a subset of the histogram server interface. In the future, Gumtree will + provide an editor for the histogram server configuration files. + For a simple experiment in beam monitor mode, where you want to histogram data until + one million counts are counted in the beam monitor, from the command line you would + + +... +histmem mode MONITOR_1 +histmem preset 1000000 +histmem start +"wait until the histogram is finished" +save + + + For subsequent acquisitions where you want to do fast starts of the histogram server + because you don't need to change configuration + + +histmem pause +do something in SICS like change the sample or temperature +histmem start +"wait until the histogram is finished" +save + + + You must call the histmem command with one of the following subcommands + + + + histmem + start + + + + will start an acquisition in the current mode + The option prevents subsequent commands from being + processed until the histmem is finished. Used in scripts, when using the + count or time modes + + + + + histmem + stop + + + will stop the histogram memory if it is running in + unlimited mode that has been started without the + option. + NOTE: If you are running in 'unlimited & block' mode, count or time + modes, you must send an INT1712 1 to abort the acquistion or hit the + Interrupt button in Gumtree. + + + + + histmem + veto + + + + will stop the histogram memory from counting and + not clear memory. It will have no effect on configuration. Use this command + if you need to pause a measurement without clearing the memory. + will resume counting without clearing the memory. + + + + + + histmem + pause + + + if MULTIPLE_DATASETS=ENABLE mode (default - but check) + use pause instead of stop for a 'fast' start. Use this if you don't have + to change the histogram memory configuration. Clears histograms and + counters, but doesn't reinitialisation the histogram server. + if MULTIPLE_DATASETS=DISABLE mode + use pause instead of veto. Does not clear histograms and counters, does + not reinitialise the histogram server. Data is accumulated. + Note that the MULTIPLE_DATASETS mode is set in the SICS hmm configuration + files and/or on the histogram memory server. SICS does not report this + value. To view this value, you must look at the config tab on the histogram + server web client. + + + + + histmem + mode + mode + + + Allowed mode one of: + MONITOR_n (where n=1,2,3 ...). If you set the mode to + MONITOR_1 then the server will stop when MONITOR_1 reaches the + preset counts + + time will stop at the preset time + after start + + unlimited will stop when it receives a histmem + stop or INT1712 1 + + count will stop when the total histogram counts reaches + preset counts + + frame will stop when the preset number + of TOF (time of flight) frames. e.g. when there's no TOF, there is an + internal frame frequency which by default is 50Hz. So if you have a + preset of 1000 frames you will get a 20 second + acquisition + + period will stop when it reaches + preset number of periods. A histogram period contains + some number of frames averaged together - this is controlled by the BAT + (base address table) and its attributes. The mapping can be fairly complex + (e.g. time-averaged, time-history and stroboscopic acquisition) so there's + not always a simple relationship between number-of-periods acquired and the + DAQ time, but it can be worked out from the BAT setup + count_roi + Not supported. Will stop when the total histogram counts reaches + preset counts in a region of interest defined in the + histogram server configuration. + + + + + histmem preset + val + + + the acquisition will terminate after the val + period.  This is seconds if the mode is time, and counts if the mode is + count or MONITOR_n. + + + + + histmem freq + val + + + val is the frame frequency (Hz)  for time + resolved data.  If you set a frequency of zero then this will default to + 50Hz. + + + + + histmem fsrce + frame_source + + + Allow values of frame_source are: + (default) + + + You can set this to if you don't have an + external frame signal + + + + + histmem + status + + + + This doesn't report anything + Started, Stopped, or Paused + + + + + histmem + loadconf + + + this uploads configuration tables (e.g. OAT for setting bins) to the + histogram memory + + + + OAT_TABLE + + + with no arguments will print out SICS's copy of + the OAT_TABLE + + + + OAT_TABLE + + bb0 bb1 + bb0 bb1 + {bb0 bb1 + + + will generate a table starting at bin boundary + bb0 with a spacing of (bb1-bb0) extrapolated to + the maximum bin boundary.  The numbers of channels are calculated + automatically. + + + + OAT_TABLE + + bb0 bb1 + bb0 bb1 + {bb0 bb1 + val1 + val2 + val3 + + this version sets the number of channels explicitly + + + + SICS cannot read the current OAT_TABLE from the histogram + server, the only way to make sure that SICS is in sync with + the histogram memory is to use the SICS + OAT_TABLE + command to change your table and then to upload it to the + histogram server with the histmem loadconf command + + + Histogram memory object + In most cases, the histmem command will be sufficient to configure + and control an experiment. + This section describes a richer level of configuration and control, using the SICS + histogram memory object. The histogram memory object in SICS is used to set the + configuration of the histogram memory server (described in detail in a later chapter), + and to get the current histogram memory server configuration and data. Note that it is + possible to for the histogram memory's configuration to be set independently from SICS + e.g. through the histogram memory's web interface. Therefore, care must taken to ensure + synchronisation between the SICS histogram memory object and the histogram memory + server. + SICS has seven histogram-memory objects as follows: + hmm + + hmm_xy + + hmm_xt + + hmm_yt + + hmm_x + + hmm_y + + hmm_t + + which you can use to fetch xyt, xy, xt, yt, x, y and t data. + For simplicity, we will use hm to refer to any of the 7 + histogram memory objects. Make sure you use the one appropriate to your measurement. + + + + hm get 1 + + gets the current histogram memory data ie. 'live' data + + + + hm zipget 1 + + gets the current histogram memory data in binary zip form + + + + hm configure rank + + gets the rank of the current histogram memory + + + + hm configure + dimn + + gets the current histogram memory data in binary zip form + + + + + + diff --git a/site_ansto/manual/dbSICSch4_simple_scan.xml b/site_ansto/manual/dbSICSch4_simple_scan.xml new file mode 100644 index 00000000..8e718739 --- /dev/null +++ b/site_ansto/manual/dbSICSch4_simple_scan.xml @@ -0,0 +1,308 @@ + + + + Simple Scans + Ferdi Franceschini + + 2008-09-17 12:52 + + + <command>runscan </command>command + You can run a histogram memory scan with the runscan command.  With + this command you can acquire data with the histogram memory server while scanning + against a "drivable" device, eg motors, temperature controllers.  By default this saves + time resolved, ie HISTOGRAM_XYT data at each scan point. + Multi-dimensional scans, where you would like to scan say temperature and a motor, + have to be done in a batch file, or by using a tcl for loop, which + may contain a runscan. See Chapter5. Batch Manager + + The data acquired at each scan point is saved before going to the next + point. + + runscan + scanvar start stop numpoints mode preset [force datatype + savetype] + + Arguments must be in the order described + + + + scanvar + + + a drivable device, ie a motor or temperature controller etc + + + + + start + + + the start position for the scan variable + + + + + stop + + + the stop position for the scan variable + + + + + numpoints + + + the number of scan points (the start and stop positions will be included + in the scan) + + + + + mode + + + Allowed mode one of: + + time + + + unlimited + + + period + + + count + + + frame + + MONITOR_n (where n=1,2,3 ...) + If you set the mode to MONITOR_1 then the histogram server will stop when + MONITOR_1 reaches the preset number of counts which has been set with the + following preset parameter + + + + + preset + + + the acquisition duration at each scan point, this is in second if the mode + is time, or counts if the mode is count or MONITOR_n + + + + + + + <command>runscan </command> + <option>options</option> + + These parameters must be supplied as a name-value pair, e.g. + datatype + + + They can be given in any order. + + + + force + val + + + Force a scan + Allowed val one of: + + + + + (default) + If you really want to, you can force a scan when the instrument isn't + ready. This can be useful for getting a background reference. + + + + + datatype + val + + + Select the histogram memory datatype to save in your + data file. + Allowed val one of: + + + + + + + + + + + + + + + + + + + + (default) + + + + + savetype + val + + + Allowed val one of: + + (default) + + + + By default your data will be saved in a file with a three letter + instrument prefix and a run number.  If you use savetype + then the data will be written to a scratch file + called scratch.nx.hdf + + + + + <command>runscan </command>example + + runscan + + + + This will run a four point scan with the sphi motor starting at 0 and stopping at 2.  + The data will be acquired over five seconds at each point, with the default datatype + HISTOGRAM_XYT, and saved in a file with a three letter instrument prefix and run number. + + <command>runscan </command>example + runscan MONITOR_2 + 3000 savetype datatype + + force + This example sets all runscan parameters + + + + <command>bmonscan </command>command + You can run a beam monitor scan with the bmonscan command.  With + this command you can acquire data with a counter in the histogram memory server while + scanning against a "drivable" device, eg motors. The main detector is not required. + Generally this would be used to align an instrument, e.g. alignment of a monochromator + or sample crystal. + Additional information can be found in the chapters "Counters", "User Defined Scans" + and "Batch Manager". + bmonscan will create a data file of type BEAM_MONITOR. + Multi-dimensional scans have to be done in a batch file, or by using a tcl + for loop, which may contain a runscan. See the chapter "Batch + Manager". + Unlike runscan, bmonscan is a standard SICS scan object. This means you can configure, + interrogate and control bmonscan using the commands in the chapter "User Defined Scans". + This section has only a summary of the most used commands, which allows you to do a one + variable scan. + + The data acquired at each scan point is saved before going to the next + point. + + + + + bmonscan run + NP mode preset + + + Executes a scan. + NP is the number of scan points + mode is the counter mode, either + or + preset is the preset value for the counter + Scan data is written to an output file. + tree interface /commands/scan/bmonscan/NP + tree interface /commands/scan/bmonscan/mode + tree interface + /commands/scan/bmonscan/preset + + + + + bmonscan clear + + + Clears the list of scan variables. Must be called before each scan that + has different parameters. + + + + + bmonscan add + variable start increment + + + Adds the variable specified by the argument + variable to the list of variables scanned in the + next scan. The arguments start and + increment define the starting point and the + step width for the scan on this variable. + tree interface + /commands/scan/bmonscan/scan_variable + tree interface + /commands/scan/bmonscan/scan_start + tree interface + /commands/scan/bmonscan/scan_increment + + + + + bmonscan getvarpar + i + + + Prints the name, start and step of the scan variable number + i + + tree interface + /commands/scan/bmonscan/scan_variable + + + + + bmonscan setchannel + n + + + Sets the beam monitor to collect data from, where + n is an integer ID for the beam monitor to use. + setchannel uses zero-based counting, so 0 is bm1 etc. + tree interface /commands/scan/bmonscan/channel + + + + + + bmonscan example + bmonscan clear clears the list of scan variables + bmonscan add stth 0 0.1 adds the + motor stth to the scan, with a starting value of 0 degrees and an increment value + 0.1 degrees + bmonscan getvarpar 0 lets you check + the variable you are scanning, its start and step value. In this case it returns + bmonscan.stth = 0.000000 = 0.100000 + bmonscan setchannel 0 selects the + first beam monitor, aka bm1. You'll need to check physically where this beam monitor + is on the instrument you're driving + bmonscan run 10 monitor 10000 runs + the scan with 10 scan points, in counter mode with a preset of 10000 counts. + + + diff --git a/site_ansto/manual/dbSICSch4_simple_scan_py.xml b/site_ansto/manual/dbSICSch4_simple_scan_py.xml new file mode 100644 index 00000000..6d92f4a5 --- /dev/null +++ b/site_ansto/manual/dbSICSch4_simple_scan_py.xml @@ -0,0 +1,313 @@ + + + + Simple Scans in Python + Ferdi Franceschini + + 2008-09-17 12:52 + + + <command>runscan </command>command + You can run a scan with the runscan command.  With this command you + can acquire data with the histogram memory server while scanning against a "drivable" + device, eg motors, temperature controllers.  By default this saves time resolved, ie + HISTOGRAM_XYT data at each scan point. + Multi-dimensional scans, where you would like to scan say temperature and a motor, + have to be done in a batch file, or by using a python for loop, which + may contain a runhmscan. See Chapter5. Batch Manager + from gumpy.commons import sics + + The data acquired at each scan point is saved before going to the next + point. + + sics.runscan( + "scanvar", start, stop, numpoints, "mode", preset, channel) + + Arguments must be in the order described + Note that force datatype + savetype are optional in tcl, have an hdb_path, but are not included in + the runscan signature, but should be. + Note that instruments may not have an hmscan hdb_path + e.g. Quokka. + + + + scanvar + + + a drivable device, ie a motor or temperature controller etc + + + + + start + + + the start position for the scan variable + + + + + stop + + + the stop position for the scan variable + + + + + numpoints + + + the number of scan points (the start and stop positions will be included + in the scan) + + + + + mode + + + Allowed mode one of: + + time + + + unlimited + + + period + + + count + + + frame + + MONITOR_n (where n=1,2,3 ...) + If you set the mode to MONITOR_1 then the histogram server will stop when + MONITOR_1 reaches the preset number of counts which has been set with the + following preset parameter + + + + + preset + + + the acquisition duration at each scan point, this is in second if the mode + is time, or counts if the mode is count or MONITOR_n + + + + + + + <command>runscan </command> + <option>options</option> + + These parameters must be supplied as a name-value pair, e.g. + datatype + + + They can be given in any order. + + + + force + val + + + Force a scan + Allowed val one of: + + + + + (default) + If you really want to, you can force a scan when the instrument isn't + ready. This can be useful for getting a background reference. + + + + + datatype + val + + + Select the histogram memory datatype to save in your + data file. + Allowed val one of: + + + + + + + + + + + + + + + + + + + + (default) + + + + + savetype + val + + + Allowed val one of: + + (default) + + + + By default your data will be saved in a file with a three letter + instrument prefix and a run number.  If you use savetype + then the data will be written to a scratch file + called scratch.nx.hdf + + + + + <command>runscan </command>example + + runscan + + + + This will run a four point scan with the sphi motor starting at 0 and stopping at 2.  + The data will be acquired over five seconds at each point, with the default datatype + HISTOGRAM_XYT, and saved in a file with a three letter instrument prefix and run number. + + <command>runscan </command>example + runscan MONITOR_2 + 3000 savetype datatype + + force + This example sets all runscan parameters + + + + <command>bmonscan </command>command + You can run a beam monitor scan with the bmonscan command.  With + this command you can acquire data with a counter in the histogram memory server while + scanning against a "drivable" device, eg motors. The main detector is not required. + Generally this would be used to align an instrument, e.g. alignment of a monochromator + or sample crystal. + Additional information can be found in the chapters "Counters", "User Defined Scans" + and "Batch Manager". + bmonscan will create a data file of type BEAM_MONITOR. + Multi-dimensional scans have to be done in a batch file, or by using a tcl + for loop, which may contain a runscan. See the chapter "Batch + Manager". + Unlike runscan, bmonscan is a standard SICS scan object. This means you can configure, + interrogate and control bmonscan using the commands in the chapter "User Defined Scans". + This section has only a summary of the most used commands, which allows you to do a one + variable scan. + + The data acquired at each scan point is saved before going to the next + point. + + + + + bmonscan run + NP mode preset + + + Executes a scan. + NP is the number of scan points + mode is the counter mode, either + or + preset is the preset value for the counter + Scan data is written to an output file. + tree interface /commands/scan/bmonscan/NP + tree interface /commands/scan/bmonscan/mode + tree interface + /commands/scan/bmonscan/preset + + + + + bmonscan clear + + + Clears the list of scan variables. Must be called before each scan that + has different parameters. + + + + + bmonscan add + variable start increment + + + Adds the variable specified by the argument + variable to the list of variables scanned in the + next scan. The arguments start and + increment define the starting point and the + step width for the scan on this variable. + tree interface + /commands/scan/bmonscan/scan_variable + tree interface + /commands/scan/bmonscan/scan_start + tree interface + /commands/scan/bmonscan/scan_increment + + + + + bmonscan getvarpar + i + + + Prints the name, start and step of the scan variable number + i + + tree interface + /commands/scan/bmonscan/scan_variable + + + + + bmonscan setchannel + n + + + Sets the beam monitor to collect data from, where + n is an integer ID for the beam monitor to use. + setchannel uses zero-based counting, so 0 is bm1 etc. + tree interface /commands/scan/bmonscan/channel + + + + + + bmonscan example + bmonscan clear clears the list of scan variables + bmonscan add stth 0 0.1 adds the + motor stth to the scan, with a starting value of 0 degrees and an increment value + 0.1 degrees + bmonscan getvarpar 0 lets you check + the variable you are scanning, its start and step value. In this case it returns + bmonscan.stth = 0.000000 = 0.100000 + bmonscan setchannel 0 selects the + first beam monitor, aka bm1. You'll need to check physically where this beam monitor + is on the instrument you're driving + bmonscan run 10 monitor 10000 runs + the scan with 10 scan points, in counter mode with a preset of 10000 counts. + + + diff --git a/site_ansto/manual/dbSICSch4_simple_scan_taipan_only.xml b/site_ansto/manual/dbSICSch4_simple_scan_taipan_only.xml new file mode 100644 index 00000000..f83ba562 --- /dev/null +++ b/site_ansto/manual/dbSICSch4_simple_scan_taipan_only.xml @@ -0,0 +1,303 @@ + + + + Simple Scans for Taipan + Ferdi Franceschini + + 2008-09-17 12:52 + + + <command>runscan </command>command + You can run a scan with the runscan command.  This + runscan is unique to Taipan. Do not use the options below on any + other instrument. With this command you can acquire data with the beam monitor server + while scanning against a "drivable" device, eg motors, temperature controllers.  This + saves count data at each scan point. + Multi-dimensional scans, where you would like to scan say temperature and a motor, + have to be done in a batch file, or by using a tcl for loop, which + may contain a runscan. See Chapter5. Batch Manager + + The data acquired at each scan point is saved before going to the next + point. + + runscan + scanvar start stop numpoints mode preset [force savetype] + + Arguments must be in the order described + + + + scanvar + + + a drivable device, ie a motor or temperature controller etc + + + + + start + + + the start position for the scan variable + + + + + stop + + + the stop position for the scan variable + + + + + numpoints + + + the number of scan points (the start and stop positions will be included + in the scan) + + + + + mode + + + Allowed mode one of: + + time + + monitor + + + + + + preset + + + the acquisition duration at each scan point, this is in seconds if the + mode is time, or counts if the mode is monitor + + + + + + + <command>runscan </command> + <option>options</option> + + These parameters must be supplied as a name-value pair, e.g. + savetype + + + They can be given in any order. + + + + force + val + + + Force a scan + Allowed val one of: + + + + + (default) + If you really want to, you can force a scan when the instrument isn't + ready. This can be useful for getting a background reference. + + + + + savetype + val + + + Allowed val one of: + + (default) + + + + By default your data will be saved in a file with a three letter + instrument prefix and a run number.  If you use savetype + then the data will be written to a scratch file + called scratch.nx.hdf + + + + + <command>runscan </command>example + + runscan + + + + This will run a four point scan with the s2 motor starting at 0 and stopping at 2.  + The data will be acquired over five seconds at each point and saved in a file with a + three letter instrument prefix and run number. + + <command>runscan </command>example + runscan monitor + 3000 savetype + force + This example sets all runscan parameters + + + + <command>bmonscan </command>command + You can run a beam monitor scan with the bmonscan command.  With + this command you can acquire data with a counter in the histogram memory server while + scanning against a "drivable" device, eg motors. The main detector is not required. + Generally this would be used to align an instrument, e.g. alignment of a monochromator + or sample crystal. + Additional information can be found in the chapters "Counters", "User Defined Scans" + and "Batch Manager". + bmonscan will create a data file of type BEAM_MONITOR. + Multi-dimensional scans have to be done in a batch file, or by using a tcl + for loop, which may contain a runscan. See the chapter "Batch + Manager". + Unlike runscan, bmonscan is a standard SICS scan object. This means you can configure, + interrogate and control bmonscan using the commands in the chapter "User Defined Scans". + This section has only a summary of the most used commands, which allows you to do a one + variable scan. + + The data acquired at each scan point is saved before going to the next + point. + + + + + bmonscan run + NP mode preset + + + Executes a scan. + NP is the number of scan points + mode is the counter mode, either + or + preset is the preset value for the counter + Scan data is written to an output file. + tree interface /commands/scan/bmonscan/NP + tree interface /commands/scan/bmonscan/mode + tree interface + /commands/scan/bmonscan/preset + + + + + bmonscan clear + + + Clears the list of scan variables. Must be called before each scan that + has different parameters. + + + + + bmonscan add + variable start increment + + + Adds the variable specified by the argument + variable to the list of variables scanned in the + next scan. The arguments start and + increment define the starting point and the + step width for the scan on this variable. + tree interface + /commands/scan/bmonscan/scan_variable + tree interface + /commands/scan/bmonscan/scan_start + tree interface + /commands/scan/bmonscan/scan_increment + + + + + bmonscan getvarpar + i + + + Prints the name, start and step of the scan variable number + i + + tree interface + /commands/scan/bmonscan/scan_variable + + + + + bmonscan setchannel + n + + + Sets the beam monitor to collect data from, where + n is an integer ID for the beam monitor to use. + setchannel uses zero-based counting, so 0 is bm1 etc. + tree interface /commands/scan/bmonscan/channel + + + + + + bmonscan example + bmonscan clear clears the list of scan variables + bmonscan add stth 0 0.1 adds the + motor stth to the scan, with a starting value of 0 degrees and an increment value + 0.1 degrees + bmonscan getvarpar 0 lets you check + the variable you are scanning, its start and step value. In this case it returns + bmonscan.stth = 0.000000 = 0.100000 + bmonscan setchannel 0 selects the + first beam monitor, aka bm1. You'll need to check physically where this beam monitor + is on the instrument you're driving + bmonscan run 10 monitor 10000 runs + the scan with 10 scan points, in counter mode with a preset of 10000 counts. + + + + <command>diffskan </command>command + + + + diffskan + milliseconds scanobj motor start stop speed + + + Runs the counters continuously while the motor drives from start to end. + milliseconds is the counter sampling interval + scanobj is the scan object. You should be able + to use any scan object but I've only tried it with iscan (you need iscan for + meshscan) + motor is the name of the motor to be scanned + start the start position for the scan variable + stop the stop position for the scan variable + speed is the speed of the scan variable in its + positional units per second, e.g. degrees per second + + + + + + <command>mesh </command>command + + + + mesh + mot start [fname] + + + The mesh command is currently hardwired to drive "mot" from "start" in steps of 1 unit to start +15 and then call diffskan on s1. + So the code needs to be edited for different ranges etc + The meshscan code was just cobbled together when Bob Aldus couldn't find a reflection so we needed to come up with something quickly. + It is an mix of ad-hoc tcl and python code and would need to be parameterised to be generally useful. + + + + + + diff --git a/site_ansto/manual/dbSICSch5_batch.xml b/site_ansto/manual/dbSICSch5_batch.xml new file mode 100644 index 00000000..74ed2b6e --- /dev/null +++ b/site_ansto/manual/dbSICSch5_batch.xml @@ -0,0 +1,259 @@ + + + + Batching Tasks + Ferdi Franceschini + + 2006-08-17 16:31 + + + Usage + The SICS batch manager reads commands from a Tcl script and executes them, you can use + Tcl loops and logical constructs in the batch file, see the Tcl command reference.   The batch manager + command is exe. Refer to the command reference section below for + syntax and usage. + Following is an example of an advanced batch file which runs some twotheta scans and + omega scans several times each.  The batch execution has been made dynamically + configurable by using two tcl arrays, "scan()" and "batch()", to hold parameters for the + scan commands and the loops.  This means that the user can change the number of points + per scan or the number of iterations in the loops from the command line before executing + the batchfile.  The 'if' statements at the start of the file initialise the arrays if + they don't already exist.  + + Batch file example + # This is an example of a dynamically configurable batch file. +# Set default values for the batch and scan parameters. +if { [info exists scan(np)] == 0 } { set scan(np) 5 } +if { [info exists scan(mode)] == 0 } { set scan(mode) timer } +if { [info exists scan(preset)] == 0 } { set scan(preset) 1.0 } +if { [info exists batch(repeatnum)] == 0 } { set batch(repeatnum) 3 } +clientput "Starting batch of twotheta scans" +MyScan add twotheta 50 0.01 +for {set i 0} {$i < $batch(repeatnum)} {incr i} { + clientput "twotheta scan: $i" + MyScan run $scan(np) $scan(mode) $scan(preset) +} + +MyScan clear +clientput "Starting batch of omega scans" +MyScan add omega 50 0.01 +for {set i 0} {$i < $batch(repeatnum)} {incr i} { + clientput "omega scan: $i" + MyScan run $scan(np) $scan(mode) $scan(preset) +} + + + Assuming that the file is called batch.tcl, the user could execute it as follows + + set scan(np) 100 + exe batch.tcl + + + Warning about the <command>run </command> command + The run command does not wait for a move to complete before it + returns, this means that the batch manager will execute any following commands + straight away.  If you want move an axis and then perform some action after the move + is completed you should use the drive command instead of + run. The following batch file will print the message after + the move is complete. + + drive omega 5 + clientput "omega is has reached five degrees" + + + + + Commands + + The batch buffer manager handles the execution of batch files. + It can execute batch files directly. Additionally, batch files can be added into a queue + for later processing. The batch buffer manager supports the following commands described + below.  The command for controlling the batch manager is called exe + + + + + exe append + 'tcl commands' + + + + don't know the syntax. nha + Append some tcl commands. + + + + + exe + buffername + + + directly load the buffer stored in the file + buffername and execute it. The file is searched + in the batch buffer search path. + + + + + exe batchpath + newpath + + + Without an argument, this command lists the directories which are searched + for batch files. + newpath sets a new search path. It is possible + to specify multiple directories by separating them with colons. + + + + + exe clear + + + Clears the queue of batch buffers. For safety, use in conjuction with + exe clearupload + + + + + exe clearupload + + + Clears partially uploaded batch buffers. + + + + + exe enqueue + buffername + + + Appends buffername to the queue of batch + buffers to execute. + + + + + exe forcesave + filename + + + Will overwrite an existing batch file without warning. + + + + + exe info + + + prints the name of the currently executing batch buffer + + + + + exe info stack + + + prints the stack of nested batch files (i.e. batch files calling each + other). + + + + + exe info range + name + + + Without an argument prints the range of code currently being executed. + name prints the range of code executing in + named buffer within the stack of nested buffers. The reply looks like: + + number of start character = number of end character = line + number + + + + + + exe info text + name + + + Without an argument prints the code text currently being executed. + name prints the range of code text executing + in the named buffer within the stack of nested buffers. + + + + + exe interest + + + Switches on automatic notification about starting batch files, executing a + new bit of code or for finishing a batch file. This is most useful for SICS + clients watching the progress of the experiment. + + + + + exe print + buffername + + + Prints the content of the batch buffer + buffername to the screen. + + + + + exe queue + + + Prints the content of the batch buffer queue. + + + + + exe run + + + Starts executing the batch buffers in the queue. + + + + + exe save + filename + + + Save the commands to a batch file.  Returns an error if you try to + overwrite an existing batch file + + + + + exe syspath + newpath + + + Without an argument, this command lists the system directories which are + searched for batch files. + newpath sets a new system search path. It is + possible to specify multiple directories by separating them with colons. + + + + + + exe upload + + + Prepare the batch manager to upload a new set of commands from the + client + + + + + diff --git a/site_ansto/manual/dbSICSch6_counters.xml b/site_ansto/manual/dbSICSch6_counters.xml new file mode 100644 index 00000000..f9f35f30 --- /dev/null +++ b/site_ansto/manual/dbSICSch6_counters.xml @@ -0,0 +1,283 @@ + + + + Counters + Ferdi Franceschini + + 2006-08-16 16:24 + Beam monitors have not been documented completely in either the PSI source code + or on the Bragg Institute Plone CMS. Therefore, this document is a standalone document, + not edited from another source. + + + Beam monitors + When you are doing an experiment with the main detector, you don't address beam + monitors directly. You would normally select and configure the beam monitor to control + your experiment using the histmem command. + However, you may want to use a scan command with a beam monitor and without the main + detector. This can be done with bmonscan which is a SICS scan object. + For more detail on bmonscan, see the chapter "Simple Scans". + Instruments often have more than one beam monitor. SICS has a multicounter interface + named bm, which is a list of all the beam monitors on the instrument, + usually 2 or 3 beam monitors with names bm1, bm2 and bm3. You must select which beam + monitor will control your experiment. When you run the experiment using bm, all the beam + monitors on the instrument will count, and with most instrument configurations, the + values will be saved to the data file - you should check this is the case if you need + these values. + + Selecting a beam monitor for bm + + + + bmonscan setchannel + n + + + Sets the active beam monitor. + n = 0 is bm1, n + =1 is bm2 etc. + This is the preferred command when doing a + bmonscan + + + + + bm setchannel + n + + + Sets the active beam monitor. + n = 0 is bm1, n + =1 is bm2 etc. + This is the alternate command when using + bmonscan + + + + + histmem mode + MONITOR_n + + + Sets the active beam monitor. + n = 1 is bm1, n + =2 is bm2 etc. + Use this command when using histmem + + + + runscan also has an argument to select the beam monitor. + Do not use these interchangably e.g. do not use bm setchannel + n to set histmem mode + MONITOR_n. It will not work. + Since there are four commands for selecting beam monitor, you have to be careful + to use the right one. Be explicit with your selection of beam monitor when using + these commands. Don't assume. + If you are using histmem to control the detector, set the beam + monitor using histmem mode. + If you are using bmonscan set the beam monitor using + bm setchannel or bmonscan setchannel + If you are using runscan set the beam monitor with the + mode setting in the runscan arguments. + + + Setting modes for the beam monitors + The mode for a beam monitor, either or + can be set using bm mode, where bm can + be bm, bm1, bm2 etc. The mode of the mulitcounter bm may be + different from the mode of the selected beam monitor e.g. bm1 + mode. + Even if you select bm1 using bm setchannel 0 or + bmonscan setchannel 0, changing the mode of bm1 e.g. + bm1 mode monitor will not change bm mode. + bm mode is set by the most recent bmonscan + run. + + + Active beam monitor commands (bm) + The active beam monitor bm has the following commands. These + commands are get only + + + + bm_preset + + + scalar value at which an acquisition will be stopped. Used in + conjunction with mode + get only + tree interface /monitor/preset + + + + + bm_mode + + + mode to stop acquisitions, either or + + get only + Return values: + will stop acquisition preset + seconds after the acquisition is started + will stop acquisition + preset counts after the acquisition is started + tree interface /monitor/mode + + + + + tree interface only + + + gets the scalar value for the instantaneous time of the beam monitor + selected to control the experiment. + get only + Units: seconds + tree interface /monitor/time + + + + + tree interface only + + + gets the scalar value for the instantaneous counts of the beam monitor + selected to control the experiment. + get only + Units: counts + tree interface /monitor/data + + + + bm is available in the tree interface under the /monitor node, + and attributes can be set and get using the hget and + hset commands. + + + Specific beam monitor commands (bm1) + Each beam monitors are accessible as SICS objects, and in the tree interface under + the /monitor node. They can be addressed by name, or using the hget commands when + using the tree interface. There are generally either 1, 2 or 3 monitor per + instrument, and the commands are of the form + bm1_... + where 1 can be 1, 2 or 3 + For simplicity, all the command descriptions below will use bm1 + + + + bm1_counts + + + returns the instanteous value of the number of counts + Units: counts + tree interface /monitor/bm1_counts + + + + + bm1_event_rate + + + returns the instanteous value of the count rate + Units: counts per second + tree interface + /monitor/bm1_event_rate + + + + + bm1_time + + + return the instantaneous time on this beam monitor. Each beam monitor + can have a unique time value. + Units: seconds + tree interface /monitor/bm1_time + + + + + bm1_status + + + Return values: + Beam monitor is enabled + Beam monitor is disabled + tree interface /monitor/bm1_status + + + + + + Commands used on both active (bm) and specific (bm1) beam monitors + Use the commands on either bm or bm1 + Please replace bm1 with the beam monitor you want to + control. + A setting on bm will not change the setting on the + selected beam monitor e.g. bm1 + + + bm1 preset value + + get or set a preset value for + bm1. This is the value at which the + acquisition will be stopped. Used in conjunction with + mode + + + + bm1 mode value + + get or set the mode to stop acquisitions, either + or + value must be one of these options + will stop acquisition preset + seconds after the acquisition is started + will stop acquisition + preset counts after the acquisition is started + + + + bm1 status + + returns the monitor status. e.g. + bm1.CountStatus = 10000 0 Beam: 0 E6 + = preset, current control value, current counts. + The current counts may be high by 10 times. To be tested and fixed. + + + + + bm1 count value + + Sets the preset to value and runs the + counter to the preset. + + + + Use hget with the tree interface e.g. hget + /monitor/bm1_counts. + hget /monitor/bm1_counts will return the same value as + bm1_counts + These attributes are get only e.g. hget /monitor/bm1_counts + The next section refers to histmem which is most commonly used. + The second section will refer to bm, and how it interacts with + histmem + + + + Configuring counters + Counters must be configured into the SICS server with the MakeCounter command, they + cannot be added dynamically to a running server. The MakeCounter command has the + following syntax + + MakeCounter + name + type + [parameters] + + The list of parameters depends on the type of counter that is being created. + + diff --git a/site_ansto/manual/dbSICSch7_user_defn_scan.xml b/site_ansto/manual/dbSICSch7_user_defn_scan.xml new file mode 100644 index 00000000..8212ed1b --- /dev/null +++ b/site_ansto/manual/dbSICSch7_user_defn_scan.xml @@ -0,0 +1,504 @@ + + + + User Defined Scans + Ferdi Franceschini + + 2006-08-16 15:25 + + + Creating a Scan Command + A scan command must first be initialised with MakeScanCommand + command in the SICS configuration file before it can be used. + MakeScanCommand initialises the SICS internal scan + command. + + MakeScanCommand + name countername headfile recoverfil + + Arguments must be in the order described + + + + name + + + The scan will be accessible as name in the + system. + + + + + countername + + + The name of a valid counter object to use for counting + + + + + headfile + + + The full pathname of a header description file. This file describes the + contents of the header of the data file. The format of this file is + described below + + + + + recoverfil + + + The full pathname of a file to store recover data. The internal scan + command writes the state of the scan to a file after each scan point. This + allows for restarting of aborted scans. + + + + + + Using a Scan Command + The scan command (named here MyScan, but may have another name) + understands the following commands: + + + + MyScan run + NP mode preset + + + Executes a scan. + NP is the number of scan points + mode is the counter mode, either + or + preset is the preset value for the counter + Scan data is written to an output file. + + + + + MyScan add + name start step + + + Adds the variable specified by the argument + name to the list of variables scanned in the next + scan. The arguments start and + step define the starting point and the step width + for the scan on this variable. + + + + + MyScan appendvarpos + i pos + + + Append pos to the array of positions for scan + variable i. To be used from user defined scan + functions. + + + + + MyScan callback + status + + + Triggers callbacks configured on the scan object. + Allow status one of: + + + + + + + + + + May be used by user functions implementing own scan loops. + + + + + MyScan clear + + + Clears the list of scan variables. Must be called before each scan that + has different parameters. + + + + + MyScan configure + mode + + + Configures the scan mode + Allowed mode one of: + (default). Writing ASCII files + Scan functions are overriden by the user. + The scan stores and saves software zero point + corrected motor positions. The standard is to save the hardware positions as + read from the motor controller. + + + + + MyScan continue + NP mode preset + + + Continues an interrupted scan. + Used by the recovery feature. + + + + + MyScan function list + + + Lists the available configurable function names. The calling style of + these functions is described in the next section about stdscan. + + + + + MyScan function + functionname + + + Returns the currently configured function for + functionname + + + + + + MyScan function + functionname newfunctionname + + + Sets a new function to be called for the function + functionname in the scan. + + + + + MyScan getcounts + + + Retrieves the counts collected during the scan. + + + + + MyScan getfile + + + Returns the name of the current data file + + + + + MyScan getmonitor + i + + + Prints the monitor values collected during the scan for monitor + i + + + + + MyScan gettime + + + Prints the counting times for the scan points in the current scan. + + + + + MyScan getvardata + n + + + Retrieves the values of a scan variable during the scan (the x axis). + n is the ID of the scan variable to retrieve + data for. ID is 0 for the first scan variable added, 1 for the second etc. + + + + + + MyScan getvarpar + i + + + Prints the name, start and step of the scan variable number + i + + + + + + MyScan interest + + + A SICS client can be automatically notified about scan progress. This is + switched on with this command. Three types of messages are sent: + a string NewScan on start of the scan + a string ScanEnd after the scan has + finished + a string scan.Counts = {109292 8377 ...} + with the scan values after each finished scan point. + + + + + + MyScan uuinterest + + + As for interest but the array of counts is transferred + in UU encoded format. + + + + + MyScan dyninterest + + + As for interest but scan points are printed one by one + as a list containing: + point number first_scan_var_pos counts. + + + + + MyScan uninterest + + + Uninterest switches automatic notification about scan progress off. + + + + + + MyScan integrate + + + Calculates the integrated intensity of the peak and the variance of the + intensity for the last scan. + Returns either an error when insufficient scan data is available, or a + pair of numbers. Peak integration is performed along the method described by + Grant and Gabe in J. Appl. Cryst. (1978), 11, 114-120. + + + + + MyScan log + var + + + Adds var to list of variables logged during the + scan. Can be slave motors such as during + four circle work. These variables are not driven, just logged. + var is the SICS variable to log. Only + drivable parameters may be logged in such a way. + + + + + MyScan noscanvar + + + Prints the number of scan variables + + + + + MyScan np + + + Prints the number of points in the current scan. + + + + + MyScan setchannel + n + + + Sometimes it is required to scan not the counter but a monitor. This + command sets the channel to collect data from. n + is an integer ID for the channel to use. + + + + + MyScan simscan + pos FWHM height + + + + BROKEN + + This is a debugging command. It simulates scan data with a hundred points + between an x axis ranging from 10 to 20. A gaussian peak is produced from + the arguments given: + pos the position of the peak maximum + FWHM is the full width at half maxxximum for + the peak + height is its height + + + + + MyScan silent + NP mode preset + + + Executes a scan. + Does not produce an output file + + + + MyScan storecounts counts time mon1 mon2 ... + + + Don't understand the syntax nha. + + This stores an entry of count values into the scan data structure. To be + used from user defined scan functions. The scan pointer is incremented by + one. + + + + + MyScan storecounter + + + Store the counts and monitors in the counter object configured for the + scan into the scan data structure. Increments the scan pointer by one. + + + + + + MyScan recover + + + Recovers an aborted scan. + The scan object writes a file with all data necessary to continue the scan + after each scan point. If for some reason a scan has been aborted due to + user intervention or a system failure, this scheme allows to continue the + scan when everything is alright again. This works only if the scan has been + started with run, not with + silent + + + + + MyScan window + newval + + + Peak Integration uses a window in order to determine if it is still in the + peak or in background. This command allows to request the size of this + window (without argument) or set it with newval + + + + + + + User Definable Scan Functions + The last commands in the last section allow overloading functions that implement + various operations during the scan with user defined functions. This section is the + reference for user defined functions. The following operations during a scan can be + configured: + + + + count MyScan + userobjectname point mode preset + + + Called at each scan point to perform the counting operation + + + + + collect MyScan + userobjectname point + + + Called for each scan point. This function stores the scan data into the + scan data structure. + + + + + drive MyScan + userobjectname point + + + drive to the next scan point + + + + + finish MyScan + userobjectname + + + Called after the scan finishes and may be used to dump a data file or + perform other clean up operations after a scan. + + + + + prepare MyScan + userobjectname + + + Does operations before a scan starts. + + + + userdata + + This is the name of a user defined object which may be used to store user + data for the scan. + + + + + writeheader MyScan + userobjectname + + + Write the header of the data file + + + + + writepoint MyScan + userobjectname point + + + Called for each scan point. Prints information about the scan point to the + data file and to the user. + + + + + MyScan is the name of the scan object invoking the function. This can + be used for querying the scan object. userobjectname is the + name of a entity as specified as userdata in the configuration. point is the number of + the current scan point. + + diff --git a/site_ansto/manual/dbSICSch8_batch_manager.xml b/site_ansto/manual/dbSICSch8_batch_manager.xml new file mode 100644 index 00000000..984b220b --- /dev/null +++ b/site_ansto/manual/dbSICSch8_batch_manager.xml @@ -0,0 +1,193 @@ + + + + Batch Manager + Ferdi Franceschini + + 2006-08-17 15:46 + + + Commands + + The batch buffer manager handles the execution of batch files. + It can execute batch files directly. Additionally, batch files can be added into a queue + for later processing. The batch buffer manager supports the following commands described + below.  The command for controlling the batch manager is called exe + + + + + exe + buffername + + + directly load the buffer stored in the file + buffername and execute it. The file is searched + in the batch buffer search path. + + + + + exe batchpath + newpath + + + Without an argument, this command lists the directories which are searched + for batch files. + newpath sets a new search path. It is possible + to specify multiple directories by separating them with colons. + + + + + exe syspath + newpath + + + Without an argument, this command lists the system directories which are + searched for batch files. + newpath sets a new system search path. It is + possible to specify multiple directories by separating them with colons. + + + + + + exe info + + + prints the name of the currently executing batch buffer + + + + + exe info stack + + + prints the stack of nested batch files (i.e. batch files calling each + other). + + + + + exe info range + name + + + Without an argument prints the range of code currently being executed. + name prints the range of code executing in + named buffer within the stack of nested buffers. The reply looks like: + + number of start character = number of end character = line + number + + + + + + exe info text + name + + + Without an argument prints the code text currently being executed. + name prints the range of code text executing + in the named buffer within the stack of nested buffers. + + + + + exe enqueue + buffername + + + Appends buffername to the queue of batch + buffers to execute. + + + + + exe clear + + + Clears the queue of batch buffers + + + + + exe queue + + + Prints the content of the batch buffer queue. + + + + + exe run + + + Starts executing the batch buffers in the queue. + + + + + exe print + buffername + + + Prints the content of the batch buffer + buffername to the screen. + + + + + exe interest + + + Switches on automatic notification about starting batch files, executing a + new bit of code or for finishing a batch file. This is most useful for SICS + clients watching the progress of the experiment. + + + + + exe upload + + + Prepare the batch manager to upload a new set of commands from the + client + + + + + exe append + 'tcl commands' + + + + don't know the syntax. nha + Append some tcl commands. + + + + + exe save + filename + + + Save the commands to a batch file.  Returns an error if you try to + overwrite an existing batch file + + + + + exe forcesave + filename + + + Will overwrite an existing batch file without warning. + + + + + diff --git a/site_ansto/manual/dbSICSch9_motor_configuration.xml b/site_ansto/manual/dbSICSch9_motor_configuration.xml new file mode 100644 index 00000000..26886614 --- /dev/null +++ b/site_ansto/manual/dbSICSch9_motor_configuration.xml @@ -0,0 +1,319 @@ + + + + Motor Configuration + Ferdi Franceschini + + 2007-02-12 14:24 + + + Configuration example + Motors are configured by following this pattern + + + Setup the host and port of the controller + + + Make the motor queue + + + Set the home value for the absolute encoder + + + Set the motor configuration parameters + + + + Motor configuration example + from + ics1-echidna.nbi.ansto.gov.au:/usr/local/sics/server/config/motors/motor_configuration.tcl + # Setup addresses of Galil DMC2280 controllers. + set dmc2280_controller1(host) mc1-$animal + set dmc2280_controller1(port) pmc1-$animal + ... + MakeAsyncQueue mc1 DMC2280 $dmc2280_controller1(host) \ + $dmc2280_controller1(port) + ... + #Measured absolute encoder reading at home position + set mphi_Home 7781389 + ... + # Monochromator phi, Tilt 1, upper + Motor mphi $motor_driver_type [params \ + asyncqueue mc1\ + absEnc 1\ + absEncHome $mphi_Home\ + axis A\ + cntsPerX -8192\ + hardlowerlim -2\ + hardupperlim 2\ + maxSpeed 1\ + maxAccel 1\ + maxDecel 1\ + stepsPerX -25000\ + units degrees] + + setHomeandRange -motor mphi -home 0 -lowrange 2 -uprange 2 + mphi speed 1 + mphi movecount $move_count + mphi precision 0.05 + mphi part crystal + mphi long_name phi + + + + + Configuration checklist + Always use a positive number for the motor steps conversion multiplier.If the encoder + counts decrease when the motor steps increase then the encoder counts conversion + multiplier must be negative. + + For each axis with an absolute encoder + + + How many motor steps are there per degree or mm? + + + How many encoder counts are there per degree or mm? + + + Move the motor a positive number of steps.If the encoder counts has + increased then set the stepsPerX positive + otherwise negative. + + + If encoder counts decrease when motor steps increase then set the sign of + cntsPerX to the opposite sign of stepsPerX, otherwise the sign should be the + same. + + + What is the encoder reading at the home position? + + + + + For each axis without an absolute encoder + + + How many motor steps are there per degree or mm? + + + Move the motor a positive number of steps.If the axis moved in the + positive direction according to the coordinate conventions then set the + stepsPerX positive otherwise + negative. + + + Set axis home position. + + Make sure the axis HOME routine has been run. The axis should + be at the lower limit and the motor defined position should be + zero, ie TDx returns zero. + + + Drive the axis to the home position and set motorHome to TDx + + + + + + + For all axes + + + Check that maxSpeed, maxAccel, and maxDecel are sane. NOTE: The initial + speed, accel and decel will be set to the maximum values. + + + If an axis should not be powered down after each move then set + noPowerSave=1. + + + + + Slits + The zero position for the slits is defined when the slits are closed but not + overlapping.  Since the slit motors don't have absolute encoders we need to define a + zero reference for counting motor steps, we will call this reference the motorHome.  + The motorHome is set when the slits are fully open, there is a home subroutine + (called #HOME) on the DMC2280 controller which can be called to set this position + for you. + The homing code on the controller fully opens the slits and then sets the position + as zero. + + + Run #HOME command on controller, ie XQ #HOME,1Useu + + + Check that the command has completed with MG _XQ1, a value of -1 means the + command has finished otherwise it displays the current line number. + + + After the #HOME command has completed check that the defined motor + positions has been set to zero by executing TDEFGH + + + run gap to zero, set lowerlims to -ve val if there is a gap, then run gap + to -ve witdh. + + + Read position for each slit and set it as the "motorHome" parameter in the + sics configuration file. + + + + + Testing + + + Check communications to all four controllers. + + + Try to run motor past limits.Does SICS reject the command? + + + Run motors to limits.Does it move in the right direction?Does it stop + where expected? + + + Run motor to home position.Does it stop where expected? + + + Set limits + + + Set home + + + Set softzero + + + Set sign (direction of motion) + + + Set speed + + + Set acceleration + + + Set deceleration + + + + + + Configuration reference + + + absEnc integer + + + Set to 1 if the axis has an absolute encoder + + + + absEncHome integer + + + The calibrated "home" position in encoder counts + Required if absEnc = 1 + + + + axis val + + The DMC2280 motor controller can control up to eight axes + Allowed val one of: + + + + + cntsPerX integer + + + Number of absolute encoder counts per unit of movement + along/about the axis of motion + + + + hardlowerlim integer + + Hardware lower limit for motor + + + + hardupperlim integer + + Hardware upper limit for motor + + + + maxAccel val + + Maximum allowed acceleration in units per + second2 + + + + maxDecel val + + Maximum allowed deceleration in units per + second2 + + + + maxSpeed val + + Speed in units per second + + + + motorHome integer + + + The calibrated "home" position in motor steps.  You only need to set this + if the axis does not have an absolute encoder + + + + motOffDelay integer + + Number of msec to wait before switching off a motor after a move + Default = + + + + noPowerSave + val + + + By default a motor will switch off after a move. If you set this to 1 the + motor will stay on. + Allowed val one of: + (default) + + + + + stepsPerX val + + Number of motor steps per unit of movement along/about + the axis of motion + + + + units val + + The units of motion for the axis, eg for phi or + two-theta, for translation + Allowed val one of: + + + + + + + diff --git a/site_ansto/manual/newsics.gif b/site_ansto/manual/newsics.gif new file mode 100644 index 00000000..9cb83ee7 Binary files /dev/null and b/site_ansto/manual/newsics.gif differ diff --git a/site_ansto/manual/putty.JPG b/site_ansto/manual/putty.JPG new file mode 100644 index 00000000..b3f7259c Binary files /dev/null and b/site_ansto/manual/putty.JPG differ diff --git a/site_ansto/manual/taipanGumtree.jpg b/site_ansto/manual/taipanGumtree.jpg new file mode 100644 index 00000000..fa1111a6 Binary files /dev/null and b/site_ansto/manual/taipanGumtree.jpg differ diff --git a/site_ansto/manual/taipanGumtree1.jpg b/site_ansto/manual/taipanGumtree1.jpg new file mode 100644 index 00000000..fb32b66f Binary files /dev/null and b/site_ansto/manual/taipanGumtree1.jpg differ diff --git a/site_ansto/manual/taipanGumtree2.jpg b/site_ansto/manual/taipanGumtree2.jpg new file mode 100644 index 00000000..00f19934 Binary files /dev/null and b/site_ansto/manual/taipanGumtree2.jpg differ diff --git a/site_ansto/manual/taipanGumtree3.jpg b/site_ansto/manual/taipanGumtree3.jpg new file mode 100644 index 00000000..4aa74594 Binary files /dev/null and b/site_ansto/manual/taipanGumtree3.jpg differ diff --git a/site_ansto/manual/troubleshoot1.jpeg b/site_ansto/manual/troubleshoot1.jpeg new file mode 100644 index 00000000..d46a67d0 Binary files /dev/null and b/site_ansto/manual/troubleshoot1.jpeg differ diff --git a/site_ansto/manual/troubleshoot2.jpeg b/site_ansto/manual/troubleshoot2.jpeg new file mode 100644 index 00000000..4b8c7f1a Binary files /dev/null and b/site_ansto/manual/troubleshoot2.jpeg differ diff --git a/site_ansto/manual/troubleshoot3.jpeg b/site_ansto/manual/troubleshoot3.jpeg new file mode 100644 index 00000000..9f718f14 Binary files /dev/null and b/site_ansto/manual/troubleshoot3.jpeg differ diff --git a/site_ansto/manual/troubleshoot4.jpeg b/site_ansto/manual/troubleshoot4.jpeg new file mode 100644 index 00000000..b838d316 Binary files /dev/null and b/site_ansto/manual/troubleshoot4.jpeg differ diff --git a/site_ansto/manual/troubleshoot5.jpeg b/site_ansto/manual/troubleshoot5.jpeg new file mode 100644 index 00000000..333de089 Binary files /dev/null and b/site_ansto/manual/troubleshoot5.jpeg differ diff --git a/site_ansto/manual/troubleshoot6.jpeg b/site_ansto/manual/troubleshoot6.jpeg new file mode 100644 index 00000000..784042f4 Binary files /dev/null and b/site_ansto/manual/troubleshoot6.jpeg differ