|
|
||||||||
INNOVATIVE METHODOLOGY
1Dipartimento di Fisiologia Umana e Generale and 2Dipartimento di Elettronica, Informatica e Sistemistica, Università di Bologna, Bologna, Italy
Submitted 17 December 2004; accepted in final form 4 February 2005
|
|
ABSTRACT |
|---|
|
|
|
INTRODUCTION |
|---|
|
The algorithms described in the literature for neurophysiological experiments with animals or humans (Budai 1994
; Desimone et al. 2004
; Kling-Petersen and Svensson 1993
; Nordstrom et al. 1995
; Poindessault et al. 1995
) have two main problems. The first is due to the limited computer memory size. This forces algorithms to be developed with a maximum recording time limited by the hardware so that experiments must be designed in a trial-by-trial fashion. The second problem is a consequence of the trial-by-trial design of the experiment. When an animal does not react as predicted by the scientist (for instance a monkey does not perform eye movements as intended) during a trial, the program has to stop and wait until the experimental situation comes back to the origin before starting a new trial. Any information during this time is lost.
To overcome these limitations, we developed a new method based on trinary logic able to check the state of different control variables and continuously record electrophysiological data and data describing the animal's behavior. The basic information structure of the method is a time interval of defined maximum duration, called time slice, during which the supervisor system periodically checks the status of a specific subset of input channels. The status of a time slice is based on trinary logic which refers to the three behavior-dependent states: nonfulfillment of required behavior, correct performance of task, or erroneous task performance. An experiment is seen as a sequence of time slices, subsequently executed according to the final state of the previous time slice.
This paper describes the algorithm and its implementation using the real-time version of LabVIEW programming environment (National Instruments, Austin, TX). Since its introduction, the LabVIEW G-language (Kodosky and Dye 1989
) has been one of the most powerful software tools to create easily supervised systems to control experiments. This is demonstrated by numerous examples in the literature, showing the advantages of a graphical software environment in human and animal studies (in vitro: Budai et al. 1993
; Kullmann et al. 2004
; in vivo: Budai 1994
; Kling-Petersen and Svensson 1993
; Nordstrom et al. 1995
; Poindessault et al. 1995
; animal behavior: Puppe et al. 1999
).
Our algorithm also allows continuous recording in the case of unpredicted animal behavior, and can be used to drive psychophysical studies with normal human subjects or patients. Preliminary data have been presented in abstract form (Marzocchi et al. 2004
).
|
|
METHODS |
|---|
|
Theory
Control of experiments using behaving animals.
Experiments using awake, behaving animals are difficult to control because the behavior of an animal is only partially predictable. Although animals like monkeys can be trained for certain tasks (e.g., to perform a saccade toward a target), the induced behavior will be correctly performed with a probability <100%. Experiments based on animal behavior must be designed so that they take into account the probabilities of an animal producing behavior in the sequence and timing intended by the scientist. The timing of the task sequence expresses the given probabilities of an animal producing a behavior (for instance the maximum time from a stimulus to execution of a behavior). A supervisor system must be able to wait for the execution of an intended behavior and react immediately when it is produced or interrupt the task if the animal does not produce the behavior in a given time. Therefore any element of a task sequence can have three distinct states: ongoing behavior, correct completion of behavior or false completion of behavior. The three states can be expressed by trinary logic.
The problems of controlling an electrophysiological experiment with behaving animals are illustrated by an example from the literature (Fattori et al. 2001
). In this experiment, a monkey (Macaca fascicularis) had to produce straight arm movements from a start button toward a defined target button indicated by an illuminated light-emitting diode (LED) and then come back to the start button (Fig. 1A). In the meantime, the monkey had to maintain fixation of the reaching target (LED). Bioelectrical activity of single neurons in the posterior parietal cortex was recorded extracellularly. The computer had to set the LED (OFF, green, red) to control the buttons (OFF, pushed), control the position of the eyes, and record the event of neural activity as well as eye movements and events of change of the external apparatus (LED, buttons). The sequence of the experiment is the following. The monkey 1) presses the start button (placed at chest level in front of it), 2) waits for a variable time for a LED in front of it to light up green, 3) makes a saccade toward the position of the LED, 4) fixates the LED and waits for it to change color (green
red), 5) releases the start-button as a result of the color change, 6) makes an arm movement toward the target button and presses the target button, 7) remains with its hand on the target button and waits for the LED to switch off, 8) releases the target button as a result of the LED switch-off, 9) makes an arm movement back to the start button and presses the start button, 10) is rewarded.
|
An analysis of the state-graph in Fig. 1B will show how a supervisor system can control different behavior requirements. Behavior requirements can be classified as four kinds: to remain in the current behavior (e.g., fixation of a visual target), to reach a behavioral condition (e.g., starting to press a button), to end a behavioral condition (e.g., releasing a button), to avoid producing a behavior (e.g., not making a saccade to a distracter). Examples for the first three behavior requirements are shown in Fig. 1B in the first, fourth, and fifth intervals. At the beginning (interval 1), the supervisor system waits for the monkey to press the start button. Expressed in sense of information, the system waits for the condition "pushed" to be reached. In a subsequent interval (No. 4), when the LED lights up green and the monkey fixates it, the supervisor system checks that the start button remains pushed. In the next interval (No. 5), the LED changes color, and the system waits for the condition pushed of the start button is end. This description, confined for simplicity to the state change of the start button, shows that a predefined condition of a control variable can be reached in a time interval, can end during a time interval, or can remain for a time interval.
At the moment in which a predefined condition is reached or ends, the time interval finishes and the control program advances in the sequence. In contrast, in cases in which the condition has to remain at a predefined value, the time interval finishes after its whole execution. Thus during each interval, here often called time slice, the input channels (except channel Eye) and output channels remain unchanged, as the state graph reveals (Fig. 1B). In those cases in which a change in input channel is expected, it is the change itself which provokes the transition from one time slice to the next. The same is true for the output channels: output channels are changed at the beginning of a time slice. Any change in an output channel first needs a transition from one time slice to the next.
The input channel Eye is a special input channel, not only because eye-position data are analog and not digital (like the start button), but also because it is not always necessary to control eye movements. In the example experiment of Fig. 1, eye movements are controlled only during the third to eighth time intervals.
Time-slice state.
Summarizing the preceding description, a time slice can be defined as a time interval of defined maximum duration (Tmax) during which neither the input or output signals changed in relation to prefixed values. Four distinct time slices can be introduced in consideration of the behavior: Remain, Reach, End, and Avoid. The supervisor system periodically checks the time elapsed (T) and a time-slice-specific subset of input channels. Each of these input channels is compared with time-slice-specific conditions yielding a state value Sin = 0, 1, or 2 for each comparison (Table 1). In addition, time T is assessed compared with the maximum time allowed for that slice (Tmax) and the ST value is assigned. The sum of Sin + ST determines the time-slice state, and thus progression of the subsequent behavior of the control algorithm (Table 2).
|
|
An important feature of the time-slice concept is that during a time slice, only one input channel is monitored for a change while the other input channels are either ignored or are expected to maintain their status without a change. An example for the latter case is time slice 3 when the LED in front of the monkey is changed to green, and the monkey is expected to make a saccade toward the LED while keeping the start button pressed. In this time slice, the digital input channels of start and target buttons are expected to remain unchanged, whereas the channel Eye reaches a reference value (see Table 1). If the task consists of making the saccade and moving the arm from one button to another, it has to be split into two time slices. In the first time slice, the input from the analog channel monitoring eye position would be expected to change. Then, in the second time slice, the execution of the arm movement would be monitored. Because saccades are faster than arm movements, this strategy works quite well.
Condition: an orderly sequence of time slices.
The next step is the construction of an experimental condition based on a sequence of time slices. In principle, this involves composing an experiment as a sequence of time slices like the experiment shown in Fig. 1. In the experiment of Fig. 1, the supervisor system executes the sequence until the animal behaves as foreseen by the protocol. Problematic is the situation when the animal does not behave as required. To handle this situation, a specific time slice called error-handling slice (eh) has been introduced with the same data structure as the other time slices. Its function is to manipulate the experimental situation up to a point at which a new experimental condition can start. Therefore two pointers must be added to the data structure of a time slice, one for the advancement after a correct end of time slice (time-slice state = 1) and one after an erroneous end (time-slice state >1). These pointers will be called true index and false index, respectively. For convenience time slices in condition sequences will be called working slices (ws). An example of a condition based on a sequence of time slices is shown in Fig. 2A. The figure shows that the false index of the error-handling slice points back to itself. This behavior is necessary because any time slice must have a defined maximum duration, but it cannot be foreseen how much time is required until the experimental situation allows a new start of the experiment. Pointing the false index of the error-handling slice back to itself creates a continuous repetition of this time slice until the true-index condition is achieved (while-loop on a time slice).
|
The fact that each time slice has two successors, usually the next working slice and an error-handling slice, shows an important behavior of the algorithm, the possibility of implementing a branch in the execution. This possibility can be used to meet the needs of experimental interest. For example, you may want to study the neural response in a two-choice reaction task, like presenting two visual stimuli to an animal and asking it to decide if they are similar or not by making a saccade upward or downward, respectively. Depending on the reaction of the animal, the experiment will proceed in one of two different manners. In cases like this, the two pointers (true and false index) of the working slice revealing the animal's decision, will point to a working slice. Such a situation is shown in Fig. 2B. The branch point in the flow of the experiment is at the second working slice (ws_2 in Fig. 2B). The experimental condition described in Fig. 2B contains the time-slice sequence ws_1, ws_2, ws_3, ws_4, ws_7 as well as ws_1, ws_2, ws_5, ws_6, ws_7. It is worth noting that the two branches converge on one time slice (ws_7) before ending the condition. This is not necessary, but it simplifies the handling of the pointers to the first working slice of the next condition. A problem to solve here is again the defined maximum duration of the time slice. In the example, the branch of the false index will be followed either if during the previous working slice (ws_2) the animal made a saccade downward or if the time slice was timed out. So the first thing to do in the false-index branch is to check if the saccade occurred. This can be done by constructing a working slice (ws_5 in Fig. 2B) in which the animal has to fix on the downward position (
Remain in Table 1). If the animal has reached the position, the supervisor system proceeds as required otherwise it terminates immediately. In principle, another branch can be added in any branch. So, the program can behave like an if-else cascade.
Task: a sequence of conditions.
The task structure will be introduced to complete the description of the experimental protocol. A task is referred to as a set of one or more conditions. For example, if the experimental interest is to study the neural response to saccadic eye movements, it could be desirable to study the neural response to different movement directions and/or amplitudes. Each test to one direction or amplitude will be a different experimental condition. All conditions prepared for an experiment will be grouped in one task (e.g., the 8 conditions for studying saccadic eye movements along the directions of the cardinal and oblique axes). No order is imposed on the execution of the conditions. The decision to use an orderly sequence of conditions or a randomized one often depends on the experimental protocol, so it should be possible to present to the animal an orderly sequence as well as a randomized one.
Implementation
The method is implemented so as to perform a task, like that described by Fattori et al. (2001)
. Our actual setup (Fig. 3) allows single- and multi-electrode recordings. Neurons are separated by means of a Schmitt trigger (BAK Electronics, Germantown, MD) or a multiple spike detector (Alpha-Omega Eng., Nazareth, Israel) and their time stamps are recorded by a counter device used for buffered event counting. Eye positions are measured using an infrared oculometer (DR. BOUIS Devices for movement measurements, Karlsruhe, Germany) and recorded by an analog input device of a multifunctional board. LED and buttons are through a homemade interface controlled by a digital I/O device.
|
Hardware
PXI (PCI eXtensions for Instrumentation) is a CompactPCI specification, which combines the high-speed PCI bus with integrated timing and triggering designed specifically for high-performance measurements. Deterministic real-time performance is achieved with an embedded controller, and LabVIEW real-time environment. PXI boards can be connected together for precise synchronization of functions by means of a real-time system-integration bus (RTSI bus). LabVIEW and the PXI components are available from National Instruments (Austin, TX).
In our present system, the PXI PC control module is built into an eight-slot chassis and includes a Pentium III-processor, RAM, and a hard disk. We use a multifunction data acquisition device for analog acquisition, a 96-channel digital IO device for digital input/output operations and an eight-channel counter/timer device for spike acquisition and internal timing utilities (Table 3). We dedicated two counters of the timing IO device for timing purposes of the PXI program. One counter produces TTL pulses at a frequency of 500 Hz to command the analog acquisition. Higher frequencies to command an analog acquisition device are possible. The maximum frequency depends mainly on the characteristics of the device. The second counter serves to count the ongoing time and works at a frequency of 100 kHz. The other six counters are reserved for acquisition of time stamps of detected spikes or external digital events (for this reason, we use the word counter-data rather than spike data) and work at a frequency of 100 kHz. To record more time stamps, additional timing IO devices (each with 8 counters) can be added. The devices are wired to the periphery by a homemade interface which serves for output signal adaptation (i. ex. the reward system needs a 12-V command voltage) or stabilize incoming signals from pressed buttons (using flip-flop circuitry). In our application, the RTSI bus is used to trigger and synchronize analog data and spikes acquisition. One of the PXI trigger bus lines is used to start all hardware devices synchronously, and another one is used to route a square wave generated by one of the timing IO device counters to the scan clock input of the analog data-acquisition board. This allows a time synchronized analog data acquisition at constant intervals.
|
The supervisor system is organized in two main modules running on the host and the PXI PCs, respectively (for this reason indicated as host-PC program and PXI-PC program). This structure was fixed by the fact that the real-time system runs as a target on which the host computer downloads applications, and it does not provide a user interface for applications. Data could have been stored on PXI-PC hard disk; however, we preferred host PC because this allows us to perform some on-line analyses of the data, such as trials statistics and neural discharges visualization (raster plots and PSTH).
The front panel (user interface) of the host-PC program contains all the controls needed by the experimenter, such as task choice, selection of active spike channels, buttons to start and stop the experiment, and some useful indicators, like trial counters, program status, etc. Furthermore the host-PC program communicates by a TCP/IP line with the PXI-PC program, sending user commands and receiving data and other information. Received data are stored on a relational database, allowing easier retrieval of data for on- and off-line analyses using simple SQL queries. In particular, this enables highly flexible on-line analysis of the spike trains: during the acquisition it is possible to change the visualized spike channels, the marker used to align neural activity and the conditions analyzed. This provides the scientist with a good tool to understand recorded neurons behavior to optimize their investigation.
The host PC drives the PXI-PC program, which has three main duties: controlling the advancement of the experimental sequence, acquiring data and transmitting them to the host PC. The control loop, executed with a real-time priority, represents the implementation of the time-slice algorithm. It handles one time slice at a time. First, it sets the output values and then continuously reads the actual values of the input signals (digital lines, analog channels, and elapsed time), comparing them with the intended values to calculate the state value. Based on this result the control loop continues to check the input signals or proceeds with another time slice as described in the theory section. Further information on implementation details and a description of some emblematic procedures can be found in the APPENDIX.
Using relational databases for data and tasks
As previously mentioned, to achieve a flexible management of information regarding task structures and acquired data, we used relational databases based on the Structured Query Language (SQL), readable with different DBMS such as LabVIEW Database Toolkit using the Open DataBase Connectivity (ODBC).
The database containing information on the structure of time slices, conditions and tasks and their linkage includes five tables joined as shown in Fig. 4A. Any task/condition/time-slice is identified by a unique reference number called ID and is described by a record in the corresponding descriptor table, containing as fields all the general parameters necessary for its definition. The time-slice descriptor includes the ID of the time slice, its name and description, a set of output values and the subset of input to be monitored and their awaited values. The task descriptor record includes only its ID, its name, and a brief description string. The remaining two tables are used to define condition and task structures. Each record in the condition structure table associates a time slice with a condition, states the time-slice position in the sequence and specifies the true index and the false index. Therefore by querying this table predefined time slices can be assembled into any kind of experimental sequence considering all the records with the same ID Condition. Similarly different conditions can be assembled into a task by means of the task structure table.
|
different neurons) allows the incoming data to be separated for different response characteristics of different neurons and to adapt the query procedure as a result, thereby allowing us to resynchronize histogram and raster-plots to new events during the recording. |
|
RESULTS |
|---|
|
We calculated the accuracy of synchronous detection between data from the counter device (simulated spikes) and the entries for the first time slice of each condition in the table of chronological data (behavioral events) both triggered by the same event (the rising edge of a square wave). This means that we can estimate the accuracy with which behavioral data can be correlated with spike data. The results (Fig. 5) show that the system reacted with an error of synchronous detection <1 ms when the duration of a time slice was
40 ms. Forcing the system to react faster increased the error. The maximum error of synchronous detection of all measurements was not longer than 4 ms. Forcing the system to react faster than any 4 ms the supervisor system broke down. This dead time of the supervisor system was due to the fact that the inner while-loop of the control loop contains a sequence structure with four elements (see appendix). Executing all four sequence frames, 4-ms time was needed. During the execution of longer time slices (
40 ms), when the supervisor system needed to take a decision, the supervisor system was executing the third sequence frame of the control loop containing the time-slice control algorithm (see Fig. A4 in the APPENDIX). The loop contained in this sequence frame was performed with a precision of 1 ms. Taking into account the fact that the fastest behavior a monkey can produce is an expressed saccade (latency >50 ms), we can be sure that any relevant behavior of an animal can be correlated with spike data with accuracy <1 ms.
|
|
Figure 6 shows the continuous recording of neural activity, eye position, and behavioral data for >15 min in which the animal had to perform a delayed-reach task similar to that described in Fig. 1. The neurons discharged with varying frequencies during the whole recording. The neuron shown in the second line of the raster plot discharged throughout the recording, the one in the first line discharged less often, and the neuron in the third line discharged rarely. The animal performed the task during the first three minutes and paused for the following 7 min, with two exceptions. The supervisor system continued to record data, and during the pauses, it waited for the moment when the animal decided to restart the task. Continuous recording was possible thanks to the qualities of the algorithm. The first time slice of the condition was a Reach time slice set to wait for the animal to press the start button with a duration up to Tmax = 5 s. If after this duration, the animal has not pressed the start button, the time slice finished with an error, and the supervisor system proceeded with the error-handling slice. The error-handling slice waited for no button to be pressed, which was immediately fulfilled because the animal did not pressed any button. Therefore the supervisor system restarted the condition with its first time slice waiting for the animal to press the start button for another 5 s, and so on.
|
|
|
DISCUSSION |
|---|
|
The basic information structure of the algorithm is a time interval of defined maximum duration, called a time slice. The status of a time slice is based on trinary logic which takes into account three possible behavioral states: nonfulfillment of task-required behavior, correct performance of task, or erroneous task performance. The proposed data structure to implement the algorithm allows branching of the condition (if-else cascade) as well as looping of parts of a condition (while control). Therefore the proposed data structure itself contains the most basic control structures of programming languages. This advantage simplifies the construction of complex tasks because the construction of cascades or loops is done by the concatenation of time slices. In addition it should be noted that the construction of these control structures does not need knowledge of specific program languages.
The algorithm described is not the first to be published in the literature. Poindessault et al. (1995)
gave first complete program for stimulation and data acquisition using LabVIEW. This program was designed to perform stimulus control and data acquisition and off-line analysis of visually driven neurons in frog. The main difference of between our program and that of Poindessault can be summarized in two points: their program is constructed for experiments with animals that do not have to produce any kind of behavior and using the classical (non-real time) LabVIEW environment (LabVIEW 2 on a Macintosh II computer), the program was not suited to real-time needs. Any node of the program was executed
1/60s in round robin fashion. Therefore real-time application had needed to be design around the hardware (Poindessault et al. 1995
).
Recently, Kullmann et al. (2004)
described a new control and recording program using LabVIEW-RT. The program called "G-clamp" is an implementation of the dynamic clamp method for whole cell voltage-clamp studies. The authors divided their program into two parts, one to be executed in real time on a PXI PC and a second part, executed on a Windows PC, used as a user-interface. This program is designed for a fixed duration of trial/sweep, and therefore it is suitable for experimental studies different from those recording behaving subjects. It stimulates a cell and records data for a defined time, without the need to react on an intended behavior. Another difference lies in the possibility to extent the program. Kullmann et al. have foreseen the implementation of new virtual ion-channels as an addition to the software in the real-time cycle. The experimental task (application of pulses of defined duration) remains unchanged. In contrast, our program is designed to construct as many tasks as possible with the hardware environment.
Another program to control neurophysiological experiments with awake, behaving animals is CORTEX, developed by Robert Desimone in the early 1980s and re-elaborated by many of his colleagues in the following years. We will refer here to the VCortex Ver. 2.0 User Manual (Desimone et al. 2004
). This program is developed in the C-language for a Windows PC. CORTEX is mainly a program designed to study neural responses to visual stimulation. It is a trial oriented supervisor system in which a defined experimental condition is tested during one trial. The basic concept in organizing the experiment is called condition and it works similarly to our concept of condition. In CORTEX, a condition is divided into screens of images (TEST0 to TEST15). A TEST# contains a defined set of visual stimulation during a defined period. This is a concept similar to the output part of our time-slice notion. A difference between the two algorithms is the fact that a CORTEX condition cannot contain >16 TEST items.
The trial-oriented design of CORTEX has some disadvantages: it needs at least a gap of 500 ms between each trial to store and analyze data; the on-line analysis takes into account only the last stored trial, so during recordings, histograms cannot be resynchronized to a new event; and the maximum number of data for each type of data are set to 15,000. Although this number is large, it constrains the user to create conditions which are not too long. For example, recording eye positions (2 channels) at a sample frequency of 1 kHZ limits the maximum trial duration to 7.5 s. The design of our program allows continuous recording without an inter-trial gap (see Fig. 6), and we can theoretically store an infinite amount of data. In addition, the storage of behavioral as well as spike data in a relational database allows us to resynchronize histograms and raster-plots to different events during the recording. CORTEX contains a large set of predefined functions for visual stimulation. As our program was written with the intention to produce visual as well as other kinds of stimulation by hardware outside the supervisor system, the supervisor system controls only the start and end of different stimulations and the responses evoked by them. CORTEX contains also the possibility to branch the execution or create loops of different parts, but this can be done only of the level of the CSS program language and not in the data structure. If one wants to change parts of a task, it is necessary to rewrite the program.
In conclusion, our program does not contain any limitation in the length of a condition. It synchronously records the signals of four analog channels (i.e., eye-position signals, electromyography etc.), the time stamps of several single neurons simultaneously (by means of single- and multielectrode recording and multi-spike detection), sets digital output channels, and reacts immediately on changes of selected digital or analog channels. In our present system, we reserved six counters for acquisition of time stamps of detected spikes. This number can be scaled by installing additional Timing IO devices. The time-slice-based construction of experimental conditions allows an easy construction of different experimental protocols.
|
|
APPENDIX |
|---|
|
Host PC program
The main program running on the host PC contains two while-loops working in parallel as main structures. The first one, containing an event structure, controls all input elements of the front panel (Fig. A1A ) and sends the commands to the PXI PC. The while-loop interfaces the user with the program running on PXI PC. One example of an event case is shown in Fig. A1B. This event case is executed when the "load task" button of the front panel is pressed. It allows the user to select one of the tasks. When the event case is executed, it reads for the specified task the sequence of time slices, converts them to a string, and sends it with an identification letter ahead (here "t") through a TCP connection to the PXI PC. The PXI PC confirms the reception of the time-slice sequence sending back the identification letter. The event-case structure is set to have no timeout. In this way, it reacts immediately to any detected event on the front panel.
|
|
PXI PC program
The main program running on the PXI-PC is based on a while-loop for the communication and six sub-VIs running in parallel in real-time (Fig. A3). There are a couple of sub-VIs for acquisition and transmission of analog data (analog acq, tx analog data) and spike data (spike acq, tx spike data). The other two sub-VIs are the control sub-VI controlling the experiment (real-time ctrl) and a sub-VI transmitting the chronological data in relation to the advancement of the time-slice sequence (tx chron data). The task control sub-VI has time-critical real-time priority and is set to work with a time accuracy of 1 ms. The other sub-VIs have lower real-time priorities (see Table A1).
|
|
Control loop
The control loop (Fig. A4) is the core of the time-slice algorithm implementation. In fact it handles one time slice at a time, e.g., it reads the actual state of the input channels and compares them to the intended values until it finds a result value corresponding either to a correct end or to an erroneous end of the time slice. Then based on this value it starts the following time slice.
The control loop has the following construction going from outside to inside (Fig. A4): an outer while-loop, a case structure (not shown), an intermediate while-loop, and a sequence structure containing in frame 2 the inner while-loop. The outer while-loop cycles around all tasks applied during a recording session. The intermediate while-loop cycles around all time slices of a task and the inner while-loop cycles around all the evaluations of input channel values during a time slice. The main VI passes to this sub-VI the references of the start occurrence, the queues task, time_slices, exit, the notifier eyes, and the reference of the static TCP line. When started, the sub-VI first configures the input and output boards of the PXI-DIO96 device and one clock of the TIO device, which serves for time measurement of the time slices and waits at the start occurrence (for the start procedure see the description for all other sub-VIs later on). When the start signal arrives, the sub-VI sends the synchronization sequence to the TIO device to start counters and clock, takes one element from the task queue (an array of time-slices elements) and enters the intermediate while-loop. The intermediate while-loop contains a sequence structure with the following sequence frames: 0, reads the actual value of the clock at the start of the time slice; 1, reads the actual time-slice element of the task array, calculates the time when the time slice finishes, and writes the digital output values to the PXI-DIO96 device; 2, contains the innermost while-loop timing with 1 ms (minimum loop timing possible in LabVIEW 7.0), reads out the actual state of the digital input channels, the position of the eyes (passed by the notifier eyes), and the actual time, compares the values with the intended values and calculates the result value as described in the preceding text, stops when the state value is >0. The third frame reads the finishing time of the time slice, writes the number of condition, the time-slice index, the state value of the time slice, and the states of the digital input-channels in a cluster, which is set on the queue, these values will be transmitted to the host PC and constitute the chronological data. Finally the index of the next time slice is calculated in relation to the state value: actual index + true index, if state value = 1 or actual index + false index, if state value >1.
When the program has passed the sequence structure, the intermediate loop tests whether the task has terminated correctly and sends the stop-sequence for all sub-VIs by the exit queue. The outer loop terminates depending on the value taken from the exit queue.
PXI data-acquisition and transmission
The acquisition of data and their transmission is described using the example of analog data acquisition (Fig. A5). The acquisition of the counter data is solved in a similar manner. The sub-VIs are started immediately as the references of the queues, occurrence, and notifier are passed to them. As soon as the acquisition VI is started (Fig. A5A), the MIO device is configured for the number of channels to acquire (here 4 channels) and an external scan clock is assigned. The scan signal is sent on one of the RTSI bus lines from the dedicated counter. The MIO device is started and paused immediately, so it is armed to be used. The reference number of the MIO device and the references of the queues, notifier, and occurrence are passed to a while-loop containing a case structure. The case structure is guided by the start occurrence in the following way. The occurrence is set to have no time-out, and the program waits on the occurrence until the start signal arrives. Immediately after the start signal, the program passes into the case structure, starts the MIO device and begins to read out the buffer assigned to the MIO device. The buffer read procedure is organized in an inner while-loop, which is timed to be executed every 4 ms. In each loop, at least two samples are read from the device buffer and sent on the data queue (analog). The values of first two channels, containing the data of eye position, are stored also in a notifier (eyes). The number of data points remaining on the device buffer is stored in a shift register and used to extend the number of data to read in the next cycle of the inner loop. After reading the device buffer, it checks whether an element on the exit queue is present. If not, it begins with a new read operation, otherwise it stops the inner while-loop, immediately sets the MIO device to pause, and takes one element from the queue exit. In relation to the value from the queue, as explained previously, the program finishes the outer while loop and terminates the sub-VI or goes back to wait a new start signal on the start occurrence.
|
|
|
GRANTS |
|---|
|
|
|
ACKNOWLEDGMENTS |
|---|
|
|
|
FOOTNOTES |
|---|
Address for reprint requests and other correspondence: D. F. Kutz, Dipartimento di Fisiologia Umana e Generale, Univerità di Bologna, Piazza Porta San Donato 2, 40126 Bologna, Italy (E-mail: kutz{at}biocfarm.unibo.it)
|
|
REFERENCES |
|---|
|
Budai D, Kehl LJ, Poliac GI, and Wilcox GL. An iconographic program for computer-controlled whole-cell voltage clamp experiments. J Neurosci Methods 48: 6574, 1993.[Medline]
Desimone R, White TM, Norden-Krichmar TM, Olsen J, and Boulden E. CORTEXA program for data acquisition and experimental control (5 ed.): http://www.cortex.salk.edu/, 2004.
Fattori P, Gamberini M, Kutz DF, and Galletti C. "Arm-reaching" neurons in the parietal area V6A of the macaque monkey. Eur J Neurosci 13: 23092313, 2001.[CrossRef][Web of Science][Medline]
Kling-Petersen T and Svensson K. A simple computer-based method for performing and analyzing intracranial self-stimulation experiments in rats. J Neurosci Methods 47: 215225, 1993.[Medline]
Kodosky J and Dye R. Programming with pictures. Comput Language Mag 1: 6169, 1989.
Kullmann PH, Wheeler DW, Beacom J, and Horn JP. Implementation of a fast 16-Bit dynamic clamp using LabVIEW-RT. J Neurophysiol 91: 542554, 2004.
Marzocchi N, Cavalcanti S, Galletti C, Fattori P, and Kutz DF. A new real-time supervisor system for data acquisition analysis and control of visuomotor task experiments. FENS Abstr 2: A052.013, 2004.
Nordstrom MA, Mapletoft EA, and Miles TS. Spike-train acquisition, analysis and real-time experimental control using a graphical programming language (LabView). J Neurosci Methods 62: 93102, 1995.[CrossRef][Web of Science][Medline]
Poindessault JP, Beauquin C, and Gaillard F. Stimulation, data acquisition, spikes detection and time/rate analysis with a graphical programming system: an application to vision studies. J Neurosci Methods 59: 225235, 1995.[Medline]
Puppe B, Schon PC, and Wendland K. Monitoring of piglets' open field activity and choice behaviour during the replay of maternal vocalization: a comparison between Observer and PID technique. Lab Anim 33: 215220, 1999.
This article has been cited by other articles:
![]() |
P. Fattori, R. Breveglieri, N. Marzocchi, D. Filippini, A. Bosco, and C. Galletti Hand Orientation during Reach-to-Grasp Movements Modulates Neuronal Activity in the Medial Posterior Parietal Area V6A J. Neurosci., February 11, 2009; 29(6): 1928 - 1936. [Abstract] [Full Text] [PDF] |
||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HOME | HELP | FEEDBACK | SUBSCRIPTIONS | ARCHIVE | SEARCH | TABLE OF CONTENTS |
| Visit Other APS Journals Online |