Text editor and Script control

Control using the text editor

The text editor gives full access to all capabilities of the output sequencer. As well as the standard instructions for general digital and analogue output control, the text editor can make more efficient use of flow-of-control statements and has a number of additional commands for specialist operations. The text editor allows the user to set variables and expressions for sequencer instructions in place of fixed values.

Script language and sequencer interaction

The output sequencer can be controlled interactively or automatically using the built-in control commands. However, there are times when it is necessary to read and update output values in real time. For this kind of situation the output sequencer can be controlled by the Spike2 script language.

Custom pulse generation from a script and text sequence

A script interacts with the sequencer by sending and receiving variables which represent waveform amplitudes, digital states and timing values. Larger blocks of data, such as a list of pre-recorded spike intervals for stimulus output or a series of event times calculated to produce a linear frequency ramp, can be transferred using the built-in sequencer table.

As an example, in S1-S2 heart pacing protocols where the interval between pulses is progressively reduced until it reaches a defined time or the stimulus induces arrhythmia, a script and sequence combination can provide complete experiment control. The sequencer controls the real-time generation and timing of the pacing pulses while the script acts as a high level 'supervisor', allowing user interaction and updating the sequencer values in response to changes in the incoming data. Once arrhythmia is detected, the script automatically stops the stimulus output.

Example of S1 - S2 stimulus protocol generated
using a script and text sequence


The graphical sequence editor in Spike2 offers a user-friendly interface for the built-in output sequencer. This video tutorial gives an introduction to the graphical editor and how to use it to setup a range of outputs for use during sampling.

Cambridge Electronic Design Limited

Registered in England: 972132

Registered office:

  • Cambridge Electronic Design Limited,
  • Technical Centre,
  • 139 Cambridge Road,
  • Milton,
  • Cambridge CB24 6AZ

VAT: GB 214 2617 96

Producer Registration number: WEE/BD0050TZ

Terms and Conditions of Sale

For our US customers, we can provide tax form W-8BEN, that identifies us as a UK company.

DUNS: 219151016
NAICS: 423490
Commodity codes
Hardware: 84716070
Software: 85234945

By email:


By post:
  • Cambridge Electronic Design Limited,
  • Technical Centre,
  • 139 Cambridge Road,
  • Milton,
  • Cambridge CB24 6AZ
By telephone:

(Int.+44) (0)1223 420186

From North America (Toll Free):

1 800 345 7794


Privacy policy

CED, through this site, does two things that relate to privacy. We would like to explain them.

Emails from down-loads

We offer free down-loads of many files on our site, from test programs to complete install files for updated versions of major packages like Spike2 and Signal.

When customers wish to take a down-load of a major package, we ask a few questions, including their name, email address, the serial number of the software for which they seek an upgrade and whether they would like an automatic email whenever we update the product. This information is emailed back to CED when they access the final down-load screen. Within this email, your browser transmits the type and version of browser you are using, and the screen resolution you are running.

The reasons why we take and keep this information are that it is useful for our software development team to know who has taken the latest versions, and it is useful for our web site development team to know which browsers people are using to view our site, and what resolution they have their screens set to.


When people down-load a major package, we try to write a cookie, a small file in your computer, that records your name, serial number of the software package, and the version you are down-loading. These files have a lifetime of one year.

The reasons for storing this information are firstly that if you ask for another down-load some other time, your details are read from the cookie and are pre-written into the form, to save you looking them up again. The other reason is that next time you access our site, your browser looks through your CED cookies and compares the versions down-loaded with the latest version numbers read from our site. If there is a later version of a product you have already down-loaded, we tell you on the home page screen, so you know that it is worth going to the down-load page again.

None of this information is ever given to anyone outside CED. ×