This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
nmr_probes [2013/12/14 11:16] pereira |
nmr_probes [2024/01/29 10:51] swartzj [Error message: "/srv/s3/nmr-logs/spectrograph.log is not accessible"] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== NMR Control ===== | ====== NMR Control ===== | ||
- | Two digital oscilloscopes are dedicated to NMR readout – one for the analysis line NMRs and one for the spectrograph NMRs. The scopes are located in data-U6, in upper two shelves on the right electronics rack. They are isolated from clean ground because this signals from the NMR probes are on a dirty ground. | + | Two digital oscilloscopes are dedicated to NMR readout – one for the analysis line NMRs and one for the spectrograph NMRs. The scopes are located in the S3 mezzanine. They are isolated from clean ground because this signals from the NMR probes are on a dirty ground. |
===== Motivation ===== | ===== Motivation ===== | ||
Due to the location of the NMR probes in the dipoles of both the S800 analysis line and spectrograph, | Due to the location of the NMR probes in the dipoles of both the S800 analysis line and spectrograph, | ||
- | The solution | + | The solution implemented on the S800 uses digital oscilloscopes to digitize the NMR signal. The digitized signal is then used in a program that calculates the position of the resonance and deduces the value of the magnetic field. This program (written in Tcl/Tk) is fully autonomous and automatically writes the measured Brho values to the relevant EPICS channels. In addition, it offers the possibility to match the dipoles by pairs and keeps a log file of the measured fields. |
===== Description ===== | ===== Description ===== | ||
- | The NMR running programs for both the S800 analysis line and spectrograph dipoles can be started by clicking on the icons labeled S800A_NMR and S800S_NMR, located on the desktop of uxpc2. The picture below shows the spectrograph GUI as an example. The top (yellow) panel shows the data relevant | + | The NMR running programs for both the S800 analysis line and spectrograph dipoles can be started by logging in to exp-s3-nmr.ftc (10.40.230.111) accessible from the EXP network, namely, from any computer connected |
+ | $ ssh [your-user-name-on-EXP]@exp-s3-nmr -Y | ||
+ | |||
+ | and typing, for the analysis line dipoles | ||
+ | |||
+ | $ / | ||
+ | |||
+ | and for the spectrograph dipoles | ||
+ | |||
+ | $ / | ||
+ | |||
+ | **Note that it is not simply wish anymore but wish8.6.** | ||
+ | Now press start on the GUI, which is shown below, and you should see a field reading. Sometimes the initialization of these applications fail. In that case check section [[nmr probes# | ||
{{: | {{: | ||
+ | ===== Terminating processes run by another user ===== | ||
+ | |||
+ | A solution has been implemented for the case where one user needs to run the NMR software via the ' | ||
+ | |||
+ | If a user is running ' | ||
+ | |||
+ | * Log on to exp-s3-nmr virtual machine (as described above) | ||
+ | * Type 'ps aux | grep wish8.6' | ||
+ | * Let's suppose user ' | ||
+ | * This will stop both wish8.6 processes that are running as user ' | ||
+ | * Now user ' | ||
+ | |||
+ | In short, | ||
+ | $ ps aux | grep wish8.6 | ||
+ | $ sudo -u usernameRunningWish8.6 pkill wish8.6 | ||
+ | | ||
+ | and you should be able to run the NMR software. | ||
===== Operation ===== | ===== Operation ===== | ||
- | The NMR program constantly checks the status of the various dipoles from the EPICS system and updates the status column. In addition, the program checks the log file at startup for the closest previously measured value. In case no previous measurement can be used the program searches for a signal around the guessed value of the field. This search can take some time if the calibration is off or the hysteresis of the dipole is large. | + | The NMR program constantly checks the status of the various dipoles from the EPICS system and updates the status column. In addition, the program checks the log file at startup for the closest previously measured value. In case no previous measurement can be used the program searches for a signal around the guessed value of the field. This search can take some time if the calibration is off or the hysteresis of the dipole is large. The maximum number of attempts is limited to 200. After that the status is marked as " |
In order to reduce the searching time, the program tries to guess the field from the following sources, in priority order: | In order to reduce the searching time, the program tries to guess the field from the following sources, in priority order: | ||
Line 26: | Line 55: | ||
* Calibration if no previous measurement is available | * Calibration if no previous measurement is available | ||
- | In addition, the program checks the log file at startup for the closest previously measured value. In case no previous measurement can be used the program searches for a signal around the guessed value of the field. This search can take some time if the calibration is off or the hysteresis of the dipole is large. The maximum number of attempts is limited to 200. After that the status is marked as “Failed” and the program gives up on this dipole. | ||
- | |||
Once a signal is found, the measuring sequence tries to find two resonance positions on either side of 0. Each resonance is calculated as the average between the negative and positive modulation minima (blue and green curves, and corresponding arrows). The final field is interpolated from those measurements, | Once a signal is found, the measuring sequence tries to find two resonance positions on either side of 0. Each resonance is calculated as the average between the negative and positive modulation minima (blue and green curves, and corresponding arrows). The final field is interpolated from those measurements, | ||
- | If a dipole is turned off or its field is being changed, the status shows either | + | If a dipole is turned off or its field is being changed, the status shows either |
- | {{:wiki:barney_magnets.jpg?700|Barney display for the S800.}} | + | {{:wiki:barney_s800_unmatched.jpg?850|Barney display for the S800.}} |
- | The magnet currents, measured fields, and deviation from the set value are logged in a file that is soft-linked from the " | + | The magnet currents, measured fields, and deviation from the set value are logged in a file that is soft-linked from the " |
Line 47: | Line 74: | ||
===== Matching ===== | ===== Matching ===== | ||
- | {{: | + | The button labeled “Match” opens a new window for matching |
- | {{: | + | |
- | The button labeled “Match” opens a new window for matching | + | {{: |
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
- | * The NMR program is connected to the following devices and systems: | + | |
+ | ==== NMR GUI does not start ==== | ||
+ | |||
+ | The NMR program is connected to the following devices and systems: | ||
* The NMR module through a terminal server | * The NMR module through a terminal server | ||
Line 62: | Line 91: | ||
* The EPICS system through the caRepeater process launched by the et_wish shell running the program | * The EPICS system through the caRepeater process launched by the et_wish shell running the program | ||
- | Any of these connections can eventually be broken, and the program tries to catch the failures and report them to the user. However there are cases when the program | + | Any of these connections can eventually be broken, and the program tries to catch the failures and report them to the user. However there are cases when the program |
- | In case nothing happens after clicking on the icon, the connection to the NMR module is probably locked and needs to be freed. To free it, type the following from any shell window (actual typing show in this font ): | + | In case nothing happens after clicking on the icon, the connection to the NMR module is probably locked and needs to be freed. To free it, type the following from any shell window (actual typing show in **bold** |
- | - telnet | + | - **telnet |
- | - enter any username | + | - Enter any **username** |
- | - su | + | - **set priv ** |
- | - system | + | - The system will ask you the password ("system" |
- | - unattach port x where x=1 for the analysis line and x=2 for the spectrograph | + | - **unattach port x** (where x=1 for the analysis line and x=2 for the spectrograph) |
- | - logout | + | - **logout** |
- Click again on the starting icon and the program should start. | - Click again on the starting icon and the program should start. | ||
+ | |||
+ | |||
+ | ==== NMR GUI does not communicate with NMR controllers ==== | ||
+ | * This can be seen, for instance, when the NMR controller finds a resonance, but the NMR GUI keeps trying forever. | ||
+ | * Most likely, you need to reboot the terminal server located in S3 | ||
+ | * Go to the mezzanine level, where the NMR controllers are located | ||
+ | * The terminal server is behind the NMR controllers | ||
+ | * Simply turn it off, wait few seconds, and turn it back on | ||
+ | |||
+ | ==== Error message: "/ | ||
+ | |||
+ | * In a new terminal, ssh to yourname@exp-s3-nmr, | ||
+ | * mv spectrograph.log spectrograph-yourname.log | ||
+ | * Now close the error message window and you should not have this problem anymore. | ||
+ | |||
+ | ==== NMR reading sometimes takes too long (> 30 min) ==== | ||
+ | |||
+ | This is typically caused by one of two possible factors: | ||
+ | |||
+ | 1. The signal is weak, and so the NMR " | ||
+ | * This can be alleviated by changing the NMR thresholds (it can be done for each magnet in the analysis line, or for both magnets in the spectrograph). | ||
+ | * Stop NMR; enter new threshold (in Volts) and click “Set”; start NMR. | ||
+ | * In general, a threshold 0.15 mV is good for normal NMR signals, whereas 0.10 mV may be necessary if the signals are too weak. | ||
+ | |||
+ | 2. Initial field where NMR starts scanning is far away from actual value (this has only been seen with Spectrograph) | ||
+ | * Check what field is NMR scanning and compare with field read by neighboring NMR. | ||
+ | * If it is too far, stop NMR; enter field (in T) and click “Set”; start NMR. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Manually setting Dipole Fields | ||
+ | (Based on notes from Mathias Steiner with some extra info included) | ||
+ | |||
+ | You will need to get access to the NMR controllers in the mezzanine level of S3 (see picture below). You will also have to connect an oscilloscope to one of the NMR controllers, | ||
+ | |||
+ | |||
+ | |||
+ | Let’s assume that you want to set the dipole I265DS (first dipole (D1) of S800 Spectrograph) to the rigidity (Brho) 3.7965 Tm (this works for any dipole in the S800) | ||
+ | |||
+ | |||
+ | **Method 1** | ||
+ | * Divide Brho by the dipole radius 2.8028m (you can see the nominal radius of each dipole in Barney) to determine the desired field (in Tesla). In this case, it will be 1.35454 T (or 13.5454 kG) | ||
+ | * Get access to the NMR controller in the mezzanine level of S3 vault (see figure below). Push the “SEARCH LOCAL” button to take control out of REMOTE mode. | ||
+ | * Select the right probe by turning the “probe knob” (see figure below). Remember, each dipole has two probes: probe 4, covers fields in the range 0.34 – 1.05 T, and probe 5 covers fields in the range 0.7–2.1 T. In this case, we should set the knob of the Spectrograph controller to position B | ||
+ | * The list of probes that can be selected with the knobs are, for the Spectrograph: | ||
+ | * Use the “coarse” and “fine” knobs to select the field that you want (in T): 1.35454 T. By doing this, you are asking the NMR controller to just look at that field. | ||
+ | * If the field of that dipole happens to be close enough to the field that the NMR controller is looking at, Bingo! You’ll most likely see a resonance in the oscilloscope. In the most likely situation, however, your magnet is far away from the NMR search window and you will see only a flat line in the oscilloscope. | ||
+ | * All you need to do now is to vary the magnetic field of your dipole, and drive it towards the value that the NMR controller is looking at. For instance, in the s800 computer **u6pc5**, open the QtKM file BLSetup_A1900.gkm (connected to the "knob box") and use channel I265DS. | ||
+ | * As you get close to that value, the oscilloscope will show the NMR resonance. Keep moving until the resonance is well centered. At that point, your dipole is set to the desired field | ||
+ | |||
+ | **Method 2** | ||
+ | * Alternatively, | ||
+ | * Set EPICS channel **I265DS_MAG.BSET** to 13.5454 (note, the default value of this channel is always an (impossible) 9999.1111, which is ignored. Typing 13.5454 will cause the magnet to go to 257.577 A, and **I265DS_MAG.BSET** goes back to 9999.1111. Setting the magnet this way will get you to plus or minus half a percent of where you want to be. | ||
+ | * At that point, the quickest way may be to use the FINE knob in the NMR controller to find the actual field value. Just turn the knob until the resonance is centered in the oscilloscope, | ||
+ | * Once you know the value of the field, type it (in Tesla) into the EPICS channel **I265DS_MAG.FELD**. Note that this is what Daniel' | ||
+ | * Having done that, you can use the BARNEY ' | ||
+ | * Repeat until satisfied. | ||
+ | |||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||