Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Sequences

A sequence is a list of commands to execute in a specific order and one of three options for automating a measurement. Trajectories and scripts are the other two. Of the three options, sequences are the easiest to set up; however, they do not provide as robust functionality as trajectories or scripts do. To learn more about trajectories and scripts, go to the Trajectory Guide and Scripts.

To make a sequence, go to Window > Editor.

 

seq_1

Inside the Editor window, go to File > New Sequence.

 

seq_2

This will open the Sequence Editor, a text editor catered to writing commands by leveraging tab-completion functionality. To learn more about tab-completion, go to The Nice Console.

For example, if you want to move a motor to a given position and then start a count, then you can write a sequence to do it:

 

seq_3

Once the sequence is written out in the editor, you must save it in the experiment’s /sequences directory.

 

seq_4

 

seq_5

Then, from the command line, you can use the runSequence command to select your saved sequence file and run it.

 

seq_6

The commands that were written to the file will be placed in the queue as a runSequence command. The runSequence command nests one level inside of it and all that one levels holds all the sequence file’s commands.

 

seq_7

The commands will be in the same order that they were written in the editor and will begin running one after another. All queue-specific command functionality and operations can be used on the sequence of commands written once the sequence file has been imported into the queue.

As such, however, it is important to note that sequences can only contain queued commands! For an in-depth discussion on how to manipulate commands in the queue and the difference between queued and immediate commands, go to Queue.

Sequences do not necessarily have to be written from scratch. From inside the editor, you can load existing sequences and edit them to suit your needs. Go to File > Load... and then choose a .seq or .txt file.

NOTE: .txt files are applicable because one can write a sequence in any text editor outside of the NICE client and then save to disc for future use within the client.

Sequences can also can both silent and noisy line comments.

 

seq_8

By using the double forward slash //, you can create a silent line comment. This means that the comment will only ever be visible within the sequence file.

By using the hash tag #, you can create a noisy line comment. These comments are written to the console and the queue as they are reached within the sequence.

 

seq_9

 

seq_10

A sequence can be time estimated using the dryrunSequence command.

 

seq_11
Created December 4, 2018, Updated February 9, 2023