Plexon Interface Module

Purpose: Merging Maestro and Plexon MAP data streams

In late 2003 our laboratory purchased the first of several Plexon™ Multichannel Acquisition Processors. The Plexon gives us the ability to record the signals from an array of extracellular electrodes and from these signals isolate one or more neural "units" in real time. While Maestro and the Plexon operate independently, it was important to design some mechanism by which online or offline analysis software could merge their data streams, i.e., synchronize their separate data acquisition timelines.

The Plexon is capable of timestamping character data on an 8-bit "strobed digital word" input port as well as pulses received on 8 individual TTL "event inputs"; both the 8-bit port and the event inputs are accessible on a 26-pin front-panel digital input connector. In addition, the Plexon has two higher-accuracy TTL inputs (25µs pulse width minimum, instead of 250µs). Given these resources, we decided that the simplest way to integrate the two acquisition systems was to have Maestro send both character data and marker pulses to mark key events during Trial and Continuous mode; these can be read in and timestamped by the Plexon.

In Trial mode, several ASCII character codes and other character strings are sent before and after a trial. All character data written during a single trial are always bracketed by the "start" (ASCII 02h) and "stop" (ASCII 03h) character codes. The "start" code is immediately followed by the null-terminated name of the trial, then the null-terminated data file name. The latter is particularly important so that an analysis program can properly merge the Plexon unit data with the behavioral responses recorded by Maestro. However, if the trial is not to be saved in the first place, a "noFile" (ASCII 07h) character code, followed by a null character (ASCII 00h), serves as a placeholder for the data file name. After the trial has ended, if the animal lost fixation, a "lostFix" (ASCII 0Eh) code is sent. If the trial aborted for any reason other than a fixation break, the "abort" (ASCII 0Fh) character is written. If the data file was saved successfully, the "dataSaved" (ASCII 06h) character is sent. Finally, the "stop" code is then sent to mark the end of character data for the trial.

A similar sequence of character data brackets the recording of a data file in Continuous mode. Before recording commences, the "start" character code is sent, followed by the null-terminated data file name. If the recording aborts prematurely for whatever reason, the "abort" character is sent (the data file is always discarded when recording is aborted in Continuous mode). Otherwise, if the data file is saved successfully, the "dataSaved" code is written. Finally, the "stop" character is always written to mark the end of the recording.

In both Trial and Continuous modes, several characters are written each time a reward is delivered to the animal: a "rewardDelivered" character code (ASCII 05h), followed by the nominal reward pulse length in milliseconds as a null-terminated string. This character sequence is sent after the reward is delivered. Note that, for the end-of-trial reward, the "rewardDelivered" character sequence will be sent prior to the "lostFix"/"abort", "dataSaved", and "stop" codes.

One could use the timestamps for the "stop" and "start" character codes to help align the Plexon and Maestro acquisition timelines during each Trial- or Continuous-mode recording. However, the accuracy with which the Plexon can timestamp the arrival of these character codes is poor, and there could be some variable delay in the delivery of a character. Thus, the character data only serves to provide information about what Maestro is doing. For synchronization purposes, Maestro dedicates the marker pulse on DO<11>; that pulse is routed to the high-accuracy XS1 or XS2 TTL input (25µs pulse width) on the Plexon's digital input module. In Trial mode, DO<11> is strobed immediately after the trial starts and immediately after the trial ends (even before the end-of-trial reward is delivered). In Continuous mode, DO<11> is strobed immediately after recording begins and then again just before it ends.

Keep in mind that Maestro is simply providing synchronization pulses, data file names, and other protocol information for recording in the Plexon data file. Analysis software must parse the Plexon file for this information and locate and digest corresponding Maestro data files in order to match Maestro-recorded behavioral data with Plexon-recorded unit data. Our lab has developed and maintained a Matlab tool for doing just that; consult the Data Analysis chapter for details.

Reserved ASCII codes for Maestro-Plexon integration

    • 0x2 ("start"): Trial started, or recording started in Continuous mode.

    • 0x3 ("stop"): Trial ended, or recording stopped in Continuous mode.

    • 0x5 ("rewardDelivered"): Reward delivered to subject. Immediately followed by reward pulse length in milliseconds, as a null-terminated string.

    • 0x6 ("dataSaved"): Data file was successfully saved.

    • 0x7 ("noFile"): Serves as a placeholder for data file name in Trial mode when no file is to be saved. Followed by a null character.

    • 0xE ("lostFix"): Trial aborted because subject lost fixation.

    • 0xF ("abort"): Trial aborted for a reason other than lost fixation. In Continuous mode, recording aborted for some reason.

Module specification

The Plexon interface module is a custom hardware component that was designed to stream character data and deliver synchronization pulses to the Plexon. It plugs into the digital IO rack in the experiment rig and sits on the DIO event timer's digital output bus. For the synchronization pulses, it includes a modified version of the standalone marker pulse module that accommodates the Plexon's minimum pulse width requirements. A second device sends 8-bit ASCII character sequences to Plexon using a simple "transmit-and-wait-for-not-busy" handshake protocol.

Modified Marker Pulse Device (device address DO<15..12> = 0001). The standard “marker pulse” device is just a simple latch for the 12 possible data lines, DO<11..0>. Maestro writes to the device to raise and then lower the TTL level on a digital output channel, thereby generating a short pulse. The problem is that these pulses are on the order of 1-3μs. The Plexon’s 8 general-purpose TTL “event” inputs require a minimum 250μs pulse width, while its high-accuracy inputs (XS1 and XS2) require a 25μs pulse. To address this problem, the “modified” marker pulse device introduces one-shot timers and associated logic to essentially "extend" the pulses to satisfy the Plexon's specifications (of course, the implicit assumption here is that Maestro does not need to deliver pulses to the Plexon more often than every 250μs or so). DO<8..1> are routed to the Plexon’s 8 general-purpose TTL event inputs; pulses on these channels will meet the 250μs requirement. DO<11..9> are routed to BNC front-panel connectors on the plug-in module, labelled XS2..XS0, respectively; pulses on these three channels meet the 25μs requirement.

Character Writer Device (device address DO<15..12> = 0111). Each time Maestro writes to this device, it stores the 8-bit ASCII character DO<7..0> into an internal FIFO. On the output side, whenever the FIFO is not empty, the device pops the next character off the FIFO, stores it in a separate output latch that drives the Plexon’s 8-bit “strobed word” input port, then handshakes with the Plexon by setting the INPSTRB line and then waiting for INPBSY to reset before writing the next character. The Plexon’s 8-bit input port requires a minimum interval of 150μs between strobe pulses (the strobe pulse itself must have a width >= 0.25 μs) without handshaking, but faster updates are possible with handshaking. Maestro will write the characters much faster than that (~1-3 μs) -- so the FIFO is essential. The logic must be able to simultaneously write to Plexon while receiving new “characters” from Maestro.

In addition to the 3 BNC outputs, the plug-in module includes a 26-pin flat ribbon cable connector on its front panel. The connector's pin-out matches the Plexon's digital input connector in Mode 2 (8 TTL event inputs plus an 8-bit strobed word):

Interfacing with the Omniplex D

Maestro's Plexon interface module was originally designed for the Plexon MAP system back in 2003-4. The MAP system has since been replaced by a newer model, the Omniplex D. The digital input ports are different on the Omniplex, but it is still possible to connect it to the existing interface module via a special connector provided by the manufacturer -- the OPX DI MAP Mode 2 Emulator. You'll find a technical description of this connector in the "Miscellaneous Documentation" folder on the Downloads page.