Datapixx

Psychtoolbox>Datapixx

Usage:

% Setup functions:
isReady = Datapixx(‘Open’);
isReady = Datapixx(‘IsReady’);
isDatapixx = Datapixx(‘IsDatapixx’);
isDatapixx2 = Datapixx(‘IsDatapixx2’);
isViewpixx = Datapixx(‘IsViewpixx’);
isViewpixx3D = Datapixx(‘IsViewpixx3D’);
isPropixxCtrl = Datapixx(‘IsPropixxCtrl’);
isPropixx = Datapixx(‘IsPropixx’);
Datapixx(‘Close’);

% Global system information:
ramSize = Datapixx(‘GetRamSize’);
firmwareRev = Datapixx(‘GetFirmwareRev’);
time = Datapixx(‘GetTime’);
Datapixx(‘SetMarker’);
marker = Datapixx(‘GetMarker’);
supplyVoltage = Datapixx(‘GetSupplyVoltage’);
supplyCurrent = Datapixx(‘GetSupplyCurrent’);
is5VFault = Datapixx(‘Is5VFault’);
tempCelcius = Datapixx(‘GetTempCelcius’);
tempFarenheit = Datapixx(‘GetTempFarenheit’);

% DAC (Digital to Analog Converter) subsystem:
dacNumChannels = Datapixx(‘GetDacNumChannels’);
dacRanges = Datapixx(‘GetDacRanges’);
Datapixx(‘SetDacVoltages’, channelVoltagePairs);
dacVoltages = Datapixx(‘GetDacVoltages’);
[nextBufferAddress, underflow, overflow] = Datapixx(‘WriteDacBuffer’, bufferData [, bufferAddress=0] [, channelList=[0:numChannels-1]]);
Datapixx(‘SetDacSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, channelList=0] [, bufferBaseAddress=0] [, numBufferFrames=maxScheduleFrames]);
Datapixx(‘StartDacSchedule’);
Datapixx(‘StopDacSchedule’);
status = Datapixx(‘GetDacStatus’);

% ADC (Analog to Digital Converter) subsystem:
adcNumChannels = Datapixx(‘GetAdcNumChannels’);
adcRanges = Datapixx(‘GetAdcRanges’);
adcVoltages = Datapixx(‘GetAdcVoltages’);
Datapixx(‘EnableDacAdcLoopback’);
Datapixx(‘DisableDacAdcLoopback’);
Datapixx(‘EnableAdcFreeRunning’);
Datapixx(‘DisableAdcFreeRunning’);
Datapixx(‘SetAdcSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, channelList=0] [, bufferBaseAddress=4e6] [, numBufferFrames=maxScheduleFrames]);
Datapixx(‘StartAdcSchedule’);
Datapixx(‘StopAdcSchedule’);
[bufferData, bufferTimetags, underflow, overflow] = Datapixx(‘ReadAdcBuffer’, numFrames [, bufferAddress]);
status = Datapixx(‘GetAdcStatus’);

% DOUT (Digital Output) subsystem:
doutNumBits = Datapixx(‘GetDoutNumBits’);
Datapixx(‘SetDoutValues’, bitValues [, bitMask = 0x00FFFFFF])
doutValues = Datapixx(‘GetDoutValues’);
Datapixx(‘EnableDoutButtonSchedules’);
Datapixx(‘DisableDoutButtonSchedules’);
Datapixx(‘EnableDoutBacklightPulse’);
Datapixx(‘DisableDoutBacklightPulse’);
[nextBufferAddress, underflow, overflow] = Datapixx(‘WriteDoutBuffer’, bufferData [, bufferAddress=8e6]);
Datapixx(‘SetDoutSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, bufferBaseAddress=8e6] [, numBufferFrames=maxScheduleFrames]);
Datapixx(‘StartDoutSchedule’);
Datapixx(‘StopDoutSchedule’);
status = Datapixx(‘GetDoutStatus’);

% DIN (Digital Input) subsystem:
dinNumBits = Datapixx(‘GetDinNumBits’);
dinValues = Datapixx(‘GetDinValues’);
Datapixx(‘SetDinDataDirection’, directionMask);
Datapixx(‘SetDinDataOut’, dataOut);
doutValues = Datapixx(‘GetDinDataOut’);
Datapixx(‘SetDinDataOutStrength’, strength);
Datapixx(‘EnableDinDebounce’);
Datapixx(‘DisableDinDebounce’);
Datapixx(‘EnableDoutDinLoopback’);
Datapixx(‘DisableDoutDinLoopback’);
Datapixx(‘SetDinLog’ [, bufferBaseAddress=12e6] [, numBufferFrames=1000]);
Datapixx(‘StartDinLog’);
Datapixx(‘StopDinLog’);
[logData, logTimetags, underflow] = Datapixx(‘ReadDinLog’ [, numFrames]);
status = Datapixx(‘GetDinStatus’);

% TOUCHPixx (touch panel) subsystem:
Datapixx(‘EnableTouchpixx’);
Datapixx(‘DisableTouchpixx’);
coordinates = Datapixx(‘GetTouchpixxCoordinates’);
Datapixx(‘SetTouchpixxStabilizeDuration’, duration);
Datapixx(‘SetTouchpixxLog’ [, bufferBaseAddress=12e6] [, numBufferFrames=1000]);
Datapixx(‘StartTouchpixxLog’);
Datapixx(‘StopTouchpixxLog’);
[logCoords, logTimetags, underflow] = Datapixx(‘ReadTouchpixxLog’ [, numFrames]);
Datapixx(‘EnableTouchpixxLogContinuousMode’);
Datapixx(‘DisableTouchpixxLogContinuousMode’);
status = Datapixx(‘GetTouchpixxStatus’);

% Audio Output subsystem:
Datapixx(‘InitAudio’);
Datapixx(‘SetAudioVolume’, volume);
[nextBufferAddress, underflow, overflow] = Datapixx(‘WriteAudioBuffer’, bufferData [, bufferAddress=16e6]);
delay = Datapixx(‘GetAudioGroupDelay’, sampleRate);
Datapixx(‘SetAudioSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, lrMode=mono] [, bufferBaseAddress=16e6] [, numBufferFrames=maxScheduleFrames]);
Datapixx(‘StartAudioSchedule’);
Datapixx(‘StopAudioSchedule’);
status = Datapixx(‘GetAudioStatus’);

% Microphone input subsystem:
Datapixx(‘SetMicrophoneSource’, source [, gain]);
Datapixx(‘EnableAudioLoopback’);
Datapixx(‘DisableAudioLoopback’);
delay = Datapixx(‘GetMicrophoneGroupDelay’, sampleRate);
Datapixx(‘SetMicrophoneSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, lrMode=mono] [, bufferBaseAddress=20e6] [, numBufferFrames=maxScheduleFrames]);
Datapixx(‘StartMicrophoneSchedule’);
Datapixx(‘StopMicrophoneSchedule’);
[bufferData, underflow, overflow] = Datapixx(‘ReadMicrophoneBuffer’, numFrames [, bufferAddress]);
status = Datapixx(‘GetMicrophoneStatus’);

% Video subsystem:
Datapixx(‘SetVideoMode’ [, mode=0]);
Datapixx(‘SetVideoClut’, clut);
Datapixx(‘SetVideoHorizontalSplit’, mode(0=MIRROR,1=SPLIT,2=AUTO));
Datapixx(‘SetVideoVerticalStereo’, mode(0=NO_STEREO,1=STEREO,2=AUTO));
Datapixx(‘SetVideoStereoEye’, eye(1=Left,0=Right));
Datapixx(‘EnableVideoStereoBlueline’);
Datapixx(‘DisableVideoStereoBlueline’);
Datapixx(‘SetVideoStereoVesaWaveform’, waveform);
Datapixx(‘EnableVideoHorizontalOverlay’);
Datapixx(‘DisableVideoHorizontalOverlay’);
Datapixx(‘SetVideoHorizontalOverlayBounds’, boundsRect);
Datapixx(‘SetVideoHorizontalOverlayAlpha’, alphaTable);
Datapixx(‘SetVideoPixelSyncLine’, rasterLine [, singleLine=1] [, blankLine=1]);
Datapixx(‘EnableVideoScanningBacklight’);
Datapixx(‘DisableVideoScanningBacklight’);
Datapixx(‘EnableVideoLcd3D60Hz’);
Datapixx(‘DisableVideoLcd3D60Hz’);
pixels = Datapixx(‘GetVideoLine’ [, nPixels=HORIZONTAL_RESOLUTION]);
status = Datapixx(‘GetVideoStatus’);

% PROPixx-specific routines:
Datapixx(‘SetPropixxDlpSequenceProgram’ [, program=0]);
Datapixx(‘EnablePropixxCeilingMount’);
Datapixx(‘DisablePropixxCeilingMount’);
Datapixx(‘EnablePropixxRearProjection’);
Datapixx(‘DisablePropixxRearProjection’);
Datapixx(‘SetPropixx3DCrosstalk’, crosstalk);
Datapixx(‘SetPropixx3DCrosstalkLR’, crosstalk);
Datapixx(‘SetPropixx3DCrosstalkRL’, crosstalk);

% Reading and writing register cache:
Datapixx(‘RegWr’);
Datapixx(‘RegWrRd’);
Datapixx(‘RegWrVideoSync’);
Datapixx(‘RegWrRdVideoSync’);
Datapixx(‘RegWrPixelSync’, pixelSequence [, timeout=255]);
isTimeout = Datapixx(‘RegWrRdPixelSync, pixelSequence [, timeout=255]);

% Miscellaneous Routines:
Datapixx(‘StopAllSchedules’);
error = Datapixx(‘GetError’);
Datapixx(‘ClearError’);
Datapixx(‘Reset’);

Datapixx is a MEX file for precise control of the DataPixx device from
VPixx Technologies. It has many functions; type “Datapixx” for a list:
Datapixx

For explanation of any particular Datapixx function, just add a question
mark “?”. E.g. for ‘Open’, try either of these equivalent forms:
Datapixx(‘Open?’)
Datapixx Open?

Most of the time you won’t use this function directly, but instead use
the PsychDataPixx() function for more convenient control and execution of
common tasks.

For setup of Datapixx video operations, check the online help of
PsychImaging(), which has multiple functions for interacting with the
Datapixx device.

For an overview of demos and other useful helper functions for the DataPixx,
type “help DatapixxToolbox”.