Contributions:NIDAQFilter: Difference between revisions
No edit summary |
(No difference)
|
Revision as of 19:08, 27 July 2010
Synopsis
A filter that outputs different statesr from BCI2000 to outputs connected to a National Instruments Board running DAQmx 8.5 or higher.
Location
Not yet in the repository.
Versioning
Author
Justin Renga (justin.renga@gmail.com)
Version History
1.0
Source Code Revision
Functional Description
Parameters
The NIDAQFilter uses command line parameters to initialize the device(s) and set up the active ports. It then uses BCI2000 parameters for finer controls over the device, such as changing the sampling rate of the device.
Command Line Parameters
Initializing the NIDAQFilter
To begin using the NIDAQFilter, use the --LogNIDAQout flag and set it equal to 1. To activate device(s) for specific functions, use the following flags:
--LogDigiOut--> Enable the device to use digital output characteristics--LogAnaOut--> Enable the device to use analog output characteristics
The format for the outputs for above flags is as follows:
[flag]="[device specification]-[port specifications]"Please note that if --LogNIDAQout is enabled, then at least one of the above flags MUST be used.
Device Specification
The device name is to be written as "Dev1" or "Dev2" (without the quotes) in the first part of the parameter value. After the device name is specified, use a hyphen (-) to indicate the device name is finished. For example, the first part of the parameter value would look like this: "Dev1-.
If the device numbers are unclear, run the filter with just the --LogNIDAQout flag specified. The device names (along with their familiar names) will appear in the operator log.
Port Specifications
There are two acceptable states that the user can specify for each port that they are going to use:
- 0 --> the associated port WILL NOT be used
- 1 --> the associated port WILL be used
The values will be used for every single port that the user wants to use. For example, if the user wants to use ports 3 and 5 on a device with 10 ports, then the port specification for that device will be the following:
0010100000Notice how even though the user wants to use only 2 ports, all 10 ports have been indicated. This is required. Any port that is not needed should be marked with a 0. If the number of ports specified in the parameter file does not match the number of ports found on the device, an error will be thrown, showing the number of ports were specified and how many ports there are for that device function.
Important: If both the NIDAQLogger(Contributions:NIDAQLogger) and the NIDAQFilter are being used, and both are using the digital lines on the same device, make sure that any port that is being referenced in a parameter is referenced only once. One port cannot use both digital input and digital output functionality, and will cause BCI2000 to throw an error, saying that the line is RESERVED.
A Completed Flag
The following is the completed flag, whose parts were described above:
--LogAnaOut="Dev1-0010100000"The above flag tells the filter that the user wants to use the analog output ports on Device 1, which has 10 ports on it. The user wants to use the 3rd and 5th ports on the device, but leave everything else unused.
BCI2000 Parameters
After the commandline parameters have been set, more parameters may be configured in the Configuration dialog box in BCI2000. Under the header NIDAQFilter, the following parameters MAY appear, as some of them are dependant on flags being used:
- #OVRanges --> This parameter tells the user if there are multiple output voltage ranges that are acceptable for use. If not, then the parameter will NOT show up. The parameter is an enumeration, and is activated by the
--LogAnaOutflag. - #OutSamplingRate
- FilterExpressions