Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
labjack-module
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
14dcf3b8
authored
Feb 26, 2018
by
John Donnal
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
updated docs and changed repo structure
parent
7dd8fe88
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
5 deletions
labjack/__init__.py → joulelabjack/__init__.py
labjack/u3_module.py → joulelabjack/u3_module.py
labjack/u3_raw.py → joulelabjack/u3_raw.py
setup.py
labjack/__init__.py
→
joule
labjack/__init__.py
View file @
14dcf3b8
File moved
labjack/u3_module.py
→
joule
labjack/u3_module.py
View file @
14dcf3b8
...
...
@@ -4,7 +4,7 @@ from joule.utils.time import now as time_now
from
joule.client
import
ReaderModule
import
asyncio
import
numpy
as
np
import
pdb
import
textwrap
import
u3
import
LabJackPython
...
...
@@ -12,6 +12,80 @@ import time
import
traceback
import
sys
ARGS_DESC
=
"""
---
:name:
LabJack U3 Reader
:author:
John Donnal
:license:
Open
:url:
http://git.wattsworth.net/wattsworth/labjack_modules.git
:description:
Read analog FIO/EIO channels on U3 LabJack
:usage:
Read analog data from FIO and EIO channels on the U3 LabJack. The
FIO channels are on screw terminals and the EIO channels are available
on the expansion board connector. On the HV model FIO0-3
are marked AIN0-3 and accept voltages between +/- 10V. All other channels
are 0-2.44V. *Specify at least 2 channels*
| Arguments | Description |
|---------------|--------------------|
|``channels`` | comma separated channel numbers (0-15) |
|``rate`` | data rate in Hz |
:inputs:
None
:outputs:
output
: float32 with N elements specified by [channels] argument
:stream_configs:
#output#
[Main]
name = LabJack Data
path = /path/to/output
datatype = float32
keep = 1w
# [channels] number of elements
# units are voltages
[Element1]
name = Channel 0
units = V
[Element2]
name = Channel 1
units = V
[Element3]
name = Channel 2
units = V
#additional elements...
:module_config:
[Main]
name = LabJack U3 Reader
exec_cmd = labjack_u3
[Arguments]
#valid values are [0-15]
channels = 0,1,2
#data rate in Hz
rate = 500
[Inputs]
#none
[Outputs]
output = /path/to/output
---
"""
class
U3Reader
(
ReaderModule
):
"Read data from U3 LabJack"
...
...
@@ -24,7 +98,7 @@ class U3Reader(ReaderModule):
help
=
"sample rate in Hz"
)
#--channels
grp
.
add_argument
(
"--channels"
)
parser
.
description
=
textwrap
.
dedent
(
ARGS_DESC
)
async
def
run
(
self
,
parsed_args
,
output
):
...
...
labjack/u3_raw.py
→
joule
labjack/u3_raw.py
View file @
14dcf3b8
File moved
setup.py
View file @
14dcf3b8
...
...
@@ -2,7 +2,7 @@
from
setuptools
import
setup
,
find_packages
PROJECT
=
'
LabJack Joule Module
'
PROJECT
=
'
joulelabjack
'
# Change docs/sphinx/conf.py too!
...
...
@@ -13,7 +13,7 @@ except IOError:
setup
(
name
=
PROJECT
,
version
=
'0.5'
,
# versioneer.get_version(),
version
=
'0.5
.1
'
,
# versioneer.get_version(),
#cmdclass=versioneer.get_cmdclass(),
description
=
'Use the LabJack U3 with Joule'
,
long_description
=
long_description
,
...
...
@@ -38,7 +38,7 @@ setup(
entry_points
=
{
'console_scripts'
:
[
'labjack_u3 = labjack.u3_module:main'
,
'labjack_u3 =
joule
labjack.u3_module:main'
,
],
},
zip_safe
=
False
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment