MasterScan
Lab_Matlab_control Master Branch
|
Superclass for objects that write data as digital output.
The dotsWritable superclass provides a uniform way to write digital data, such as TTL pulses.
Properties and Events | |
Property | defaultPauseBetweenPulses = 0.1 |
for sendTTL pulses | |
![]() | |
Property | isAvailable = false |
| |
Property | clockFunction |
| |
Methods | |
self | dotsWritableDOut () |
Constructor takes no arguments. | |
timestamp | sendStrobedWord (self, word, port) |
Send a strobed digital word. More... | |
timestamp | sendTTLPulse (self) |
Send a single TTL pulse. More... | |
firstTimestamp lastTimestamp | sendTTLPulses (self, numPulses, pauseBetweenPulses, channel) |
Send multiple TTL pulses Timestamps are estimates of onset times of first and last pulses. More... | |
timestamp | sendTTLSignal (self, channel, signal, frequency) |
Send a TTL signal or waveform. More... | |
![]() | |
self | dotsWritable () |
| |
initialize (self, varargin) | |
| |
time | getDeviceTime (self) |
| |
close (self) | |
| |
delete (self) | |
| |
Static Methods | |
static dout | getDefault () |
get default Dout device | |
Additional Inherited Members | |
![]() | |
openDevice (self) | |
More... | |
closeDevice (self) | |
More... | |
timestamp sendStrobedWord | ( | self | , |
word | , | ||
port | |||
) |
Send a strobed digital word.
word | unsigned integer representing a word or code to send |
port | optional 0-based id indicating from which physical port to send word |
Must set the bits of the digital output indicated by @port to match word, then set a strobe bit to indicate to an external system that word is ready for reading, then clear the strobe bit.
If word is too large to fit within the bits of port, must set as many least-significant bits as possible, and must not clip or round word. For example, if word is a 16-bit integer and port has only 8 bits, must set word modulo 2^8, instead of clipping or rounding word to 2^8-1.
If port is omitted, or of there is only one physical output port, should treat port as 0.
Must return a positive timestamp, based on the local host's clock, that is the best estimate of when the strobe bit was set, or a negative scalar to indicate an error.
timestamp sendTTLPulse | ( | self | ) |
Send a single TTL pulse.
channel | optional 0-based id indicating from which physical channel to send the TTL pulse. |
Must send a standard transistor-transistor-logic(TTL) pulse on the given channel.
A TTL pulse should begin with channel already at a low value, within 0.0-0.8V of ground. The channel should transition to a high value, within 2.2-5V above ground, for a duration long enough to be detected by an external system. Then channel should transition back to a low value.
If channel is omitted, or of there is only one physical output channel, should treat channel as 0.
Must return a positive timestamp, based on the local host's clock, that is the best estimate of when channel transitioned to its high value, or a negative scalar to indicate an error.
firstTimestamp lastTimestamp sendTTLPulses | ( | self | , |
numPulses | , | ||
pauseBetweenPulses | , | ||
channel | |||
) |
Send multiple TTL pulses Timestamps are estimates of onset times of first and last pulses.
timestamp sendTTLSignal | ( | self | , |
channel | , | ||
signal | , | ||
frequency | |||
) |
Send a TTL signal or waveform.
channel | optional 0-based id indicating from which physical channel to send the TTL signal. |
signal | logical array specifying a sequence of TTL values to output from channel, with true->high and false->low. |
frequency | frequency in Hz at which to move through elements of signal. |
Must output standard transistor-transistor-logic(TTL) voltages on the given channel, according to the given signal and frequency. Once output begins, must make every attempt to output all of signal withoug timing jitter, for example by buffering signal in external hardware.
Must output each element of signal, one at a time, with true elements corresponding to logic high and false elements corresponding to logic low. Each logic value should persist on channel for the 1/frequency seconds. Consecutive high or low otuputs should be continuous, without gaps, so that signal may specify a sequence of logic pulses, or a square logic wavform.
May or may not block in order to complete and/or verify output. If signal is too long or frequency is unattainable for the given channel, should return immediately and return a negative status value.
If channel is omitted, or of there is only one physical output channel, should treat channel as 0.
Must return a positive timestamp, based on the local host's clock, that is the best estimate of when the first element of signal was output, or a negative scalar to indicate an error.