Sampling Analog Signals

Revised: 11/22/07

EXPO can sample continuously, at a specified rate, analog signals recorded through any device that supports CoreAudio or through a National Instruments DAQ card.

Sound recording hardware from a range of manufacturers provides high-performance analog input; the potential drawback is that inputs are AC coupled. On at least some devices (e.g., MOTU 1224) the AC coupling can be disabled. To configure sound input for analog recording choose Environment->Sound. Sound recording is managed by a real-time thread.

To configure a National Instruments card choose Environment->Cards.

EXPO provides several ways to use recorded signals. To monitor control signals (e.g., to record the setting of a potentiometer), use the analog sampling routine (Analog Input) called from within a state. To track a continuously varying signal (e.g., eye-position), and detect when it lies inside or outside a defined region, use the routine Analog Bounds. To record a continuous analog record that you will later save, you should use the Expo capabilities that put analog signals directly into an event queue.

A program will put analog signals into an event queue only when some slot in the program schedule specifies that these signals should be recorded.

Displaying Signals

EXPO can display analog signals continuously, much as an oscilloscope does. To view traces choose Signals->View Samples (this is dimmed if no analog recording has been enabled via Environment->Sound). Expo will display this window:

The window contains an XY panel (upper) that shows signals from paired input channels, and an X-T panel (lower) that displays signals on individual input channels.

The window can display signals from as many channels as have been enabled through the sound input configuration or the NI card configuration. Expo forms XY displays from signals on even numbered (x) and odd-numbered (y) channels.

The table at the top left of the window displays a row for each enabled channel. Each row contains two controls, which become active when row is selected:

In addition, the slider above the table control's the channel's gain (the slider sets only the gain for the selected channel, and is dimmed if no channel is selected). If an input device does not have adjustable gain the slider is permanently dimmed.

Use the vertical slider to control the gain (zoom) of the display. This affects only the display; it has no effect on the gain of recording. The vertical bar at the left-hand edge of each panel represents a 1° range for the standard calibration (see Calibration).

Expo can display a scale grid on the XY panel. To enable this click XY Display… and choose from the Grid popup menu.

Expo can display a token that shows the screen of the active display monitor. To display the token click XY Display… and check Monitor Token.

By default, the XY panel shows the most recent 40 signal samples, or the last 1 second's worth, whichever is less. You can control how much signal history is displayed. To do this click XY Display…. and set the limits.

You can control the sweep in the X-T display. Choose the sweep duration from the pop-up menu. Click Free Run to let the display to trigger itself automatically. Click Synch to trigger each sweep on the start of a state in the running program. If no program is running the sweep is not triggered. Click Auto to force synchronization when a program is running, but to allow a free-running display when no program is running.

A running Expo program triggers a sweep only if the slot controlling each state issues a trigger signal. This signal is enabled by a setting in each slot in a program.

Displaying Bounds

The program routine Analog Bounds can detect and take various actions upon signals that lie within a defined range of values on specified channels. Expo can display active boundaries in the analog signal window. To enable the display of bounds on a particular channel choose Show Bounds from the channel's drop-down list. An active threshold boundary is displayed in the signature color for the channel on which it is set (in the XY display the threshold is displayed in the signature color of the X channel).

Expo displays bounds only when the Analog Bounds routine is actively tracking signals. If the output of the Analog Bounds routine is locked TRUE, bounds are not displayed.

Displaying Tokens

Program routines that display objects on the video monitor (e.g., Surface, Surface Matrix, Dot Field) can create token objects that Expo will display on the XY panel, along with analog signal traces and any threshold bounds that are enabled. Tokens are created by the relevant routine and are displayed automatically when the associated object is on the video monitor.