Docs @ Psychtoolbox Wiki : Datapixx

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Datapixx

PsychtoolboxPsychHardwareDatapixxToolboxDatapixxBasic

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

Inside MATLAB:

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".

 

Usage:


The red keywords are links for per-function documentation!

% Setup functions:
isReady = Datapixx('Open');
isReady = Datapixx('IsReady');
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');
[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');

% 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('EnableVideoHorizontalOverlay');
Datapixx('DisableVideoHorizontalOverlay');
Datapixx('SetVideoHorizontalOverlayBounds', boundsRect);
Datapixx('SetVideoHorizontalOverlayAlpha', alphaTable);
Datapixx('SetVideoPixelSyncLine', rasterLine [, singleLine=1] [, blankLine=1]);
pixels = Datapixx('GetVideoLine' [, nPixels=HORIZONTAL_RESOLUTION]);
status = Datapixx('GetVideoStatus');

% 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');





Path   Retrieve current version of Datapixx.m from berliOS: beta | view in WebSVN with changelog
Psychtoolbox/PsychHardware/DatapixxToolbox/DatapixxBasic/Datapixx.m


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1256 seconds