This plugin is an interface between Dactl and the Measurement Computing USB-1208FS.
# 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
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
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/
sudo dnf copr enable geoffjay/libcld
sudo dnf install libcld*
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
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
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/
cd ~/src
git clone git://github.com/signal11/hidapi.git
cd hidapi
./bootstrap
./configure
make && sudo make install
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
For a working configuration see this example.
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
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
- axis
- 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
Edit the following line int the configuration file in the plugin section to change the rate.
<ui:property name="sampling-rate">50</ui:property>
After copying the example configuration it can be used by:
dactl
Or, with a specified configuration file:
dactl -f path/to/file/configuration.xml
Once Dactl has launched with the default configuration the screen should look like this.
- ensure that the S/N of the USB-1208
- click the "Connect" button
- click the "Acquire" button
Double click on the graph you want to change. The screen should look like this.
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
Navigate to the channel settings through starting from the "Log" tab to edit the value.
Similarily...
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.