925-456-1020 info@acornnmr.com




Linked Command Lists

This section describes the use of "Links", a simple form of automated processing.

Sequences of commands can be strung together and executed with a single command. This can be used as a shortcut for frequently used command strings or for processing 2D spectra or a series of 1D spectra. The current version of NUTS provides for 10 such command strings, labeled L0 through L9. Typing LI or L# (where # is a number between 0 and 9) brings up a dialog box and allows editing of the command strings. Spaces are ignored when the string is edited, but can be inserted to make the list more readable. The Linked Lists can be defined in the NUTS.INI file, in which case, their definitions are established each time NUTS is run.

Note that the following description applies only for NUTS in the "2-letter command" mode.  Versions of NUTS newer than 5/15/99 have the option of longer commands, which requires that all commands be terminated with <ENTER>.  An explanation of modifying Links for this new command mode is given below.  See also detailed description of this new command mode.

A command string can be executed by clicking on the corresponding button in the dialog box and then clicking OK. Equivalently, the command string can be executed by tying the command A#, where # corresponds to the chosen L#. A simple example of a useful Link would be


which performs baseline correction of the FID followed by an FT and then automatically phases the spectrum, with a single command.

For processing 2D data or a series of 1D spectra, the Link is terminated with the IN command, which loops back to the first command in the Link and increments the slice number (for 2D data) or the file extension (for 1D spectra). By default, the link will continue to loop until no more files are found. 

It is possible to limit the number of times a Link is executed by setting the Link Limit. This can also be set for Links embedded in macros.

Control characters in Links and Macros are input using the ^ character (shift-6). For example, ^I (to represent Ctrl-I) can be used to toggle integrals on and off.

^M is used to execute a carriage return, as is needed to exit a subroutine.

To import data in a Link, use the IM command, rather than GA.

When using GA in a Link where File A is a 2D file, always execute a GA manually just before executing the Link. The reason for this is to force NUTS to read the file header so that all parameters will be set correctly.

Packing 1D spectra into a "2D" file

The following link will create a 2D file from a series of 1D files.  The 1D files must have sequentially numbered file extensions.


NUTS will prompt for the first in the series of 1D files to be read, and then will ask for a file name under which to save the 2D data file it will create.  It will stop when it cannot find the next file in the series.  The new 2D file must be opened to view the data.

L0 – L9 — Edit Link

Displays the current links (command lists) for examination and editing. A chosen sequence is executed with the command A#. These command sequences can also be set in the NUTS.INI file.

A0 – A9 — Execute Link

Executes the commands in the corresponding link. The links have default values which are set by the NUTS.INI file. If there is no NUTS.INI file or if the links are not set in the NUTS.INI file then all links are set to


To edit one of the links, type L# (eg., L8 ). This opens up a screen showing the current definitions of all 10 links and allows them to be edited. Spaces make the list more readable and are ignored.

IN — INcrement slice number or file extension

Used in Links for incrementing file names and looping back to the beginning of the Link. It is always the last command in a Link which is executed multiple times. IN behaves slightly differently depending on whether the files being read and written are 1D or 2D files. When the file is a 1D file, IN causes the file extension to be incremented. When the file is a 2D file, IN increments the slice number. When all files or slices have been processed, the IN command beeps and exits the link.

By default, the Link will be repeated until NUTS fails to find the next file or slice. However, it is possible to limit the number of times the Link is executed by specifying a Link Limit in the Link dialog box. For Links embedded in macros, this is set with the command

Set LinkLimit

See also: 2D Processing

IA — Increment slice for file A

Advances the slice counter of a 2D file.  This command was created for use in processing interleaved hypercomplex (States type) 2D data, in which pairs of FIDs are processed, then combined. After the first FID of a t1 quadrature pair has been processed, the counter must be incremented before reading in the second FID. After the reconstructed t1 interferogram is stored with ST, the linked command list is terminated with the IN command, which both increments the file counter and loops back to the start of the link.

In Arrayed Mode, the IA command advances the slice counter and makes that the current slice.

IE — Increment file Extension

Used in Links to increment the file extension. This operates on FileA and FileB. This should not be confused with the IN command, which both increments the file extension and loops back to the start of the Link. If all files are to be processed in the Link, the IN command is used. The only time one might use IE is to perform multiple increments within a single loop of the Link.

For example, start with a series of 40 1D files with sequential extensions. The user decides he/she only wants to process every other file. The link would then look like


The 2D file created by this Link would have 20 slices, corresponding to every other file from the 1D series.

(Added 8/21/00)  When used in the non-two-letter command mode, IE (or IncrementExt) can now take arguments. With no argument, the command acts as described above (increments the file extensions of FileA, FileB and the Import File name if they have numerical file extensions which can be incremented).  The new functionality allows the use of arguments.  If IE is followed by either “A” or “B” with no second argument, then the extension for file A or B, respectively,  will be incremented by one.  If there is a second argument it will be used as the amount by which the file extension is incremented. If the second argument is “2” the file extension will be incremented by 2, etc. Negative numbers are allowed as long as the decremented (negative increment) extension will be greater than zero.

IE [A or B] [amount]
IncrementExt [A or B] [amount]

It is important to understand the subtle distinction
between the commands "IA" and "IE A".  IA increments the slice counter of a 2D file to the next slice.  "IE A" changes the current name of file A by incrementing its file extension (provided file A’s name has a numerical file extension).

The use of IE in this mode is illustrated in a sample macro.

Using Links in non-2-letter command mode

When NUTS is operating in the new command mode, which allows use of commands longer than 2 letters, Links must be modified to tell the program to insert <ENTER> after each command.  This is done by inserting a comma after each command.  Spaces between commands are ignored.  For example, the following link will run correctly in the new command mode:

GA , BC , EM , FT , AP ,

See detailed description of the new command mode.

Main Help page

Command Index


Last updated: 12/15/03.