Datapixx
Psychtoolbox>Datapixx
Usage:
% Setup functions:
isReady = Datapixx(‘Open’);
selectedDevice = Datapixx(‘SelectDevice’ [, deviceType=-1] [, deviceName]);
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 = hex2dec(‘00FFFFFF’)])
doutValues = Datapixx(‘GetDoutValues’);
Datapixx(‘EnableDoutButtonSchedules’ [, mode = 0]);
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’);
Datapixx(‘EnablePixelMode’);
Datapixx(‘DisablePixelMode’);
Datapixx(‘EnableVsyncMode’);
Datapixx(‘DisableVsyncMode’);
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’ [, touchPanelMode=0]);
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 [, source=0]);
[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(‘SetVideoGreyscaleMode’ [, mode=1]);
Datapixx(‘SetVideoClut’, clut);
Datapixx(‘SetVideoClutTransparencyColor’, color);
Datapixx(‘EnableVideoClutTransparencyColorMode’);
Datapixx(‘DisableVideoClutTransparencyColorMode’);
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(‘EnableVideoRescanWarning’);
Datapixx(‘DisableVideoRescanWarning’);
Datapixx(‘SetVideoBacklightIntensity’, intensity);
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);
Datapixx(‘EnablePropixxLampLed’);
Datapixx(‘DisablePropixxLampLed’);
Datapixx(‘SetPropixxAwake’);
Datapixx(‘SetPropixxSleep’);
isAwake = Datapixx(‘IsPropixxAwake’);
Datapixx(‘SetPropixxLedMask’ [, mask=0]);
Datapixx(‘EnablePropixxQuad4x3d’);
Datapixx(‘DisablePropixxQuad4x3d’);
Datapixx(‘SetGrayLEDCurrents’ [, index=0]);
% PROPixx T-Scope Mode routines
Datapixx(‘EnablePropixxTScope’);
Datapixx(‘DisablePropixxTScope’);
Datapixx(‘EnablePropixxTScopePrepRequest’);
Datapixx(‘DisablePropixxTScopePrepRequest’);
Datapixx(‘WritePropixxTScopePages’, pageData, pageIndex [, nPages=1]);
Datapixx(‘SetPropixxTScopeSchedule’, scheduleOnset, scheduleRate, maxScheduleFrames [, startPage=0] [, nPages=maxScheduleFrames]);
Datapixx(‘StartPropixxTScopeSchedule’);
Datapixx(‘StopPropixxTScopeSchedule’);
Datapixx(‘SetPropixxTScopeMode’ [, mode=0]);
Datapixx(‘SetPropixxTScopeProgramAddress’ [, addr=0]);
Datapixx(‘SetPropixxTScopeProgramOffsetPage’, offset);
Datapixx(‘SetPropixxTScopeProgram’, program);
% PROPixx Gaze Contingent Display (GCD) Mode routines
Datapixx(‘EnablePropixxTScopeQuad’);
Datapixx(‘DisablePropixxTScopeQuad’);
Datapixx(‘EnablePropixxGcdShift’);
Datapixx(‘DisablePropixxGcdShift’);
Datapixx(‘EnablePropixxGcdShiftSubframe’);
Datapixx(‘DisablePropixxGcdShiftSubframe’);
Datapixx(‘EnablePropixxGcdShiftHardware’);
Datapixx(‘DisablePropixxGcdShiftHardware’);
Datapixx(‘EnableGcdShiftHardwareBridge’);
Datapixx(‘DisableGcdShiftHardwareBridge’);
Datapixx(‘SetGcdShiftHardwareMode’, mode);
Datapixx(‘EnablePropixxSoftwareTestPatternLoad’);
Datapixx(‘DisablePropixxSoftwareTestPatternLoad’);
Datapixx(‘SetGcdShiftHardwareTransform’, xGain, xOffset, yGain, yOffset);
Datapixx(‘SetPropixxSoftwareTestPatternLoadPage’, page);
% 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(‘ResetAll’);
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”.