Intelligent Stimulus/Response Measurements
Data Acquisition Processor boards can intelligently control digital or analog output signals as well capture measurements, and do so on a consistent time base.
This example measures neuron response. There are four conditions to meet.
To produce a pulse stimulus that is never too early, never too often, never too predictable, you can randomize the sequencing using software triggering features. Unlike controls based on unreliable real-time behaviors of a PC host, you can get precise time control from your Data Acquisition Processor. Triggered data capture collects both statistical control data prior to each stimulus event and response data subsequent to each event.
You can use DAPstudio to help you set up this special processing configuration. The method depends on slow sampling so that data backlogs in data pipes do not interfere with process timing. For Data Acquisition Processors, slow means roughly 4000 samples per second or less. For this application, the sampling rate is 500 samples per second, well below the limit.
Events should be separated by at least 2 seconds, which is 1000 sample intervals. Declare a trigger with this holdoff. Reserve an additional trigger for stimulus bursts.
trigger tevent mode=normal holdoff=1000 triggers tstimulus
Also reserve some intermediate data streams.
pipes prand, pstimform, ppulse, psync, pcapture
Define the stimulus wave shape. Each output pulse lasts for 5/100 of a second, or 25 samples at full output. After each burst, the output level must be restored to zero, for a total of 26 updates. So make the burst length 26. Full output range is 0 to 32767.
vector vecBurst word = ( 4000, 16000, 26000, 29000, 32000, 32000, 28000, 25000, 22000, 18000, 14000, 9000, 4000, 3000, 2000, 1500, 1200, 1000, 850, 600, 450, 350, 200, 125, 80, 40, 0 )
Configure clocked output updating to present this data sequence
in bursts. The short
odefine outbursts set op0 a0 time 2000 update burst outputwait 26 end
To initialize the output level, set up a block of 26 zero samples in the pulse stream. This data will flush through to the output immediately when the application is started.
fill ppulse 0,0,0,0,0,0,0,0,0,0,0,0,0 // 13 values fill ppulse 0,0,0,0,0,0,0,0,0,0,0,0,0 // total 26 values
In the processing section, the measurements will be captured continuously and discarded automatically when nothing occurs. Release one random number value for each input sample received.
pdefine processing // begin processing procedure random(0,0,prand) psync = IP0*0 + prand
500 values appear in pipe
limit(psync, INSIDE,0,65, tevent)
When an event occurs, it initiates a stimulus sequence and also a data capture sequence. We need to have a plentiful supply of stimulus signal data ready to send.
Stimulus sequences must start at the exact beginning of a
26-sample waveform, regardless of when an event from the
trigscale(tevent, 0,26,26, tstimulus) wait(pstimform, tstimulus,0,26, ppulse) copy(ppulse, OPIPE0)
For the data capture, retain the 1/2 second before the stimulus event as a statistical control, and then retain 1/2 second of response data after the event.
wait(IP0, tevent, 250,250, pcapture)
Deliver the selected data to the host processor. If you are using DAPstudio, it will build this transfer for you.
copy(pcapture,$BinOut) end // end of the processing procedure
Observe that there are only 9 processing commands. You can reduce this number further, improve timing, and process more channels using a custom that you develop yourself – or that you have us develop for you. When you need it, there is a lot of embedded processing power in the DAPL system, and it is easy to apply.
Return to the Integrated Systems page.