Skip to content

Commit

Permalink
- added and tested better mac support.. at least it's tested :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
mazerj committed Mar 30, 2018
1 parent 8a4d96f commit f415f40
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ USB device using LabJack's supplied tools to do continuous analog
sampling and digital I/O sync'd to the host computer's clock (to
within 1 ms precision).

*Only tested under Linux!* Timing measuresment validated against a
Measurement Computing PCIe-DAS1062/16 using `comedi`.
Tested under Linux (Mint 18.2) and OSX (10.12.6 Sierra). Timing
measurements validated against a Measurement Computing PCIe-DAS1062/16
sing `comedi` under linux (only).

To setup and use you should run the lj-python-setup.sh script to
install current versions of the LabJack drivers. This is a fully
automated script that needs to be run as root:
To setup and use you should run either {mac,linux}=lj-python-setup.sh
script to install current versions of the LabJack drivers if they're not
already installed. These are fully automated scripts that needs to be
run as root:

% sudo sh ./lj-python-setup.sh

Expand All @@ -23,10 +25,10 @@ the data to stdout.

If you're using this -- it's not a bad idea to sample for 10ms or as
soon as the labjack module is imported to initialize all the
code. Otherwise, you can get some lag the first time the acquisition
is started. Pretty sure this has something to do with delayed loading
of `librt` by `ctypes` monoclock.py - it's not actually loaded until
it's used, or something like that.

code. Otherwise, it looks like you can get some lag the first time
the acquisition is started. I'm pretty sure this has something to do
with delayed loading of `librt` by `ctypes` in the monotonic clock
function. This problem could be gone, but not worth testing right
now.


File renamed without changes.
22 changes: 22 additions & 0 deletions mac-lj-python-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
# complete installation of labjack-python support for mac osx

wget --no-check-certificate https://labjack.com/sites/default/files/software/Exodriver_NativeUSB_Setup.zip
unzip -l Exodriver_NativeUSB_Setup.zip
unzip Exodriver_NativeUSB_Setup.zip
open Exodriver_NativeUSB_Setup.pkg

git clone https://github.com/labjack/LabJackPython.git
cd LabJackPython
python ./setup.py install
cd ..

rm -rf LabJackPython Exodriver_NativeUSB_Setup.* __MACOSX

cat <<EOF
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Labjack drivers installed - root and group:${LJGROUP} have access.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
EOF

0 comments on commit f415f40

Please sign in to comment.