Skip to content

coanda/dactl-mcc-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dactl Plugin for Measurement Computing USB01208FS

This plugin is an interface between Dactl and the Measurement Computing USB-1208FS.

  1. Installation
    1. Dependencies
    2. libcld
    3. dactl
    4. MCC-USB
    5. HIDAPI
    6. Plugin
  2. Configuration
    1. Setup
    2. Dactl
    3. Sampling Rate
    4. Usage
    5. User Interface
    6. Acquisition
  3. Preferences
    1. Channel
      1. Tag
      2. Description
    2. Calibration
      1. Units
      2. Linear Term
      3. Constant Term
    3. Save Changes

Installation

Debian 10

# Comedi
cd ~/src
git clone https://github.com/geoffjay/comedi-vapi.git
sudo mkdir -p /usr/local/lib/pkgconfig
sudo cp comedi-vapi/comedi.pc /usr/local/lib/pkgconfig/
ver=`vala --version | sed -e 's/.*\([0-9]\.[0-9][0-9]\).*/\1/'`
sudo cp comedi-vapi/comedi.vapi /usr/share/vala-$ver/vapi/
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

# HIDAPI
cd ~/src
git clone git://github.com/signal11/hidapi.git
cd hidapi
./bootstrap
./configure
make && sudo make install

#MCC-USB
cd ~/src
git clone https://github.com/wjasper/Linux_Drivers.git
sudo cp Linux_Drivers/61-mcc.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger
cd ~/src/Linux_Drivers/USB/mcc-libusb
make
sudo make install
sudo ldconfig

#Vala Build Dependencies
cd ~/src
git clone https://github.com/coanda/mcc-vapi.git
cd mcc-vapi
sudo cp libmccusb.{deps,vapi} /usr/share/vala/vapi/
sudo cp libmccusb.pc /usr/share/pkgconfig/

# install the dactl plugin
cd ~/src/dactl-plugins # or whatever
sudo apt install gnome-common
sudo apt install libclutter-1.0-dev
sudo apt install libcomedi-dev-dev
sudo cp vapi/hidapi.vapi /usr/share/vala/vapi/
./autogen.sh --prefix=/usr --libdir=/usr/lib64
make && sudo make install

Dependencies

Run the following commands from a terminal window

sudo dnf install git gnome-common intltool gcc vala \
  gtk3-devel clutter-devel clutter-gtk-devel \
  gcc-c++ webkitgtk4-devel libpeas-devel \
  comedilib-devel libusbx libusbx-devel \
  hidapi hidapi-devel
mkdir ~/src

Comedi

cd ~/src
git clone https://github.com/geoffjay/comedi-vapi.git
sudo mkdir -p /usr/local/lib/pkgconfig
sudo cp comedi-vapi/comedi.pc /usr/local/lib/pkgconfig/
ver=`vala --version | sed -e 's/.*\([0-9]\.[0-9][0-9]\).*/\1/'`
sudo cp comedi-vapi/comedi.vapi /usr/share/vala-$ver/vapi/
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

libcld

sudo dnf copr enable geoffjay/libcld
sudo dnf install libcld*

dactl

cd ~/src
git clone https://github.com/coanda/dactl
cd dactl
meson _build
meson configure -Dprefix=/usr _build
ninja -C _build
sudo ninja -C _build install
sudo mkdir -p /usr/lib64/dactl/plugins

MCC-USB

cd ~/src
git clone https://github.com/wjasper/Linux_Drivers.git
sudo cp Linux_Drivers/61-mcc.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger
cd ~/src/Linux_Drivers/USB/mcc-libusb
make
sudo make install
sudo ldconfig

Vala Build Dependencies

cd ~/src
git clone https://github.com/coanda/mcc-vapi.git
cd mcc-vapi
sudo cp libmccusb.{deps,vapi} /usr/share/vala/vapi/
sudo cp libmccusb.pc /usr/share/pkgconfig/

HIDAPI

cd ~/src
git clone git://github.com/signal11/hidapi.git
cd hidapi
./bootstrap
./configure
make && sudo make install

Plugin

cd ~/src
git clone https://github.com/coanda/dactl-mcc-plugin.git
cd dactl-mcc-plugin
sudo cp vapi/hidapi.vapi /usr/share/vala/vapi/
./autogen.sh --prefix=/usr --libdir=/usr/lib64
make && sudo make install

Configuration

For a working configuration see this example.

Setup

cd ~
git clone https://github.com/coanda/dactl-mcc-config.git
sudo mkdir /usr/share/dactl
sudo chown -R `whoami`.$(id -gn `whoami`) /usr/share/dactl
chmod -R g+w /usr/share/dactl
cp dactl-mcc-config/dactl.xml /usr/share/dactl/

Running dactl with the mcc-plugin configuration provided requires a directory for logging.

sudo mkdir -p /srv/data/dactl
sudo chown -R `whoami`.$(id -gn `whoami`) /srv/data/dactl
chmod -R g+w /srv/data/dactl

Dactl

The configuration file defines the following:

  • data acquisition
    • data acquisition devices
    • channel definitions
    • calibrations
    • averaging
    • sampling interval
  • data logging
    • log file names
    • channel lists
    • loggin interval
  • plugin configurations
    • parameter settings
    • cross referencing to data acquisition configuration
    • controls
    • control placement within the layout
  • user interface
    • layout
    • graphs
      • axis
        • labels
        • ranges
        • grid lines
    • channel value tree views
      • channel groups
  • log file start/stop controls

Details on editing configuration files will not be described here since many changes can be made through the Dactl user interface "Preferences" More information on creating configuration files is at https://dactl.readthedocs.io/en/latest/index.html

Sampling Rate

Edit the following line int the configuration file in the plugin section to change the rate.

<ui:property name="sampling-rate">50</ui:property>

Usage

After copying the example configuration it can be used by:

dactl

Or, with a specified configuration file:

dactl -f path/to/file/configuration.xml

User Interface

Once Dactl has launched with the default configuration the screen should look like this.

dactl

Aquisition

  • ensure that the S/N of the USB-1208
  • click the "Connect" button
  • click the "Acquire" button

Graph Settings

Double click on the graph you want to change. The screen should look like this.

graph-settings

Preferences

Changes to some settings can be made while Dactl is running. Others will not take effect until the changes are saved and the program is restarted. Select "Preferences" from the dactl drop down menu

preferences-drop-down

Channel

Tag

Navigate to the channel settings through starting from the "Log" tab to edit the value.

tag-name

Description

Similarily...

chan-desc

Calibration

Units

units

Linear Term

linear

Constant Term

constant

Save Changes

Changes made to the user preferences can be saved by overwriting the configuration file so a copy should of it should be made before hand if it is neccessary to revert to the original.

Select the gear in th near the top right hand corner and confirm the overwrite.

save-config

About

Dactl Plugin to use a Measurement Computing device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published