DAQFlex Plugins  0.9.8
DAQFlex Plugins

Data acquisition devices of Measurement Computing's DAQFlex series.

Installation requirements for DAQFlex

You only need to install the libusb-1.0 development package:

$ sudo apt-get install libusb-1.0-0-dev

Then run ./configure and make to compile the DAQFlex plugins.

make install copies the firmware files from firmware/ to <prefix>/lib/daqflex/ .

Note
The firmware files are kindly provided by Measurement Computing Corporation. You may check their website http://www.mccdaq.com/ for more recent updates.

Setting up udev permissions for DAQFlex USB devices

You need to make sure that you (the user) have appropriate permissions for accessing the DAQFlex USB devices. One elegant way to achieve this is to create a new group and tell udev to add the usb device files with a DAQFlex device to this group.

  1. Create a new group "iocard":
    sudo addgroup --system iocard
  2. Add udev rules. On new (after mid 2012) Linux systems create the file /lib/udev/rules.d/98-daqflex.rules (as root) and paste the following lines into that file:
    # allow access to Measurement Computing's DAQFlex usb devices by users of the iocard group:
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00f0", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00f2", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00f9", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00fd", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00fe", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0110", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0111", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0112", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0113", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0114", MODE="0660", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00ea", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00e8", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="00e9", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0116", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0117", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0118", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0119", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0120", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="0121", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="012b", MODE="0666", GROUP="iocard"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09db", ATTR{idProduct}=="012c", MODE="0666", GROUP="iocard"
    On older system (prior to mid 2012) create the file /etc/udev/rules.d/98-daqflex.rules and paste the following lines into that file:
    # allow access to Measurement Computing's DAQFlex usb devices by users of the iocard group:
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="00f0", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="00f2", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="00f9", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="00fd", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="00fe", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="0110", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="0111", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="0112", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="0113", MODE="0660", GROUP="iocard"
    BUS=="usb", SYSFS{idVendor}=="09db", SYSFS{idProduct}=="0114", MODE="0660", GROUP="iocard"
    Both files are also installed to <prefix>/lib/daqflex/ . So you can simply copy them to the right directory. New system:
    sudo cp /usr/lib/daqflex/98-daqflex.rules /lib/udev/rules.d/
    Old system:
    sudo cp /usr/lib/daqflex/98-daqflex-old.rules /etc/udev/rules.d/
    (replace /usr by whatever path you specified as the prefix for ./configure, /usr is the default).
  3. Run
    sudo udevadm trigger
    to apply your new udev rules
  4. Add users to the "iocard" group:
    sudo adduser \<username\> iocard
    After the next login, <username> is a member of the iocard group and and has sufficient permissions to access the DAQFlex data acquisition boards.

Testing acquisition

Depending on your system the maximum possible sampling rates for analog input and output might be lower than the ones the data acquisition boards suppports. This happens in particular with simultaneous analog input and output. In case you get error messages (also on console) about overflows and underruns you need to reduce the sampling rates.