Code Monkey home page Code Monkey logo

Comments (3)

brianmapes avatar brianmapes commented on August 15, 2024

when I call aiStreamStart(1, [0], 200) as a method of my d object, I get this incomprehensible (to me) error:


AttributeError Traceback (most recent call last)
in ()
----> 1 d.aiStreamStart(1, [0], 200)

...
//anaconda/envs/ATMOcanes/lib/python3.6/ctypes/init.py in getitem(self, name_or_ordinal)
364
365 def getitem(self, name_or_ordinal):
--> 366 func = self._FuncPtr((name_or_ordinal, self))
367 if not isinstance(name_or_ordinal, int):
368 func.name = name_or_ordinal

AttributeError: dlsym(0x7fc937eca220, AIStreamStart): symbol not found

from labjackpython.

davelopez01 avatar davelopez01 commented on August 15, 2024

I recommend using the eAnalogIn method instead. Execution time is around 20 ms, it is easier to use, and will fit your few samples per second requirement. Example code is in the source docstring, which can also be displayed with the Python help method:

import u12
help(u12.U12.eAnalogIn)

Regarding the U12 stream functions, they are for sampling at faster rates such as 200 to 1200 samples per second. AI stands for analog input. The aiStreamStart example code in the docstring doesn't look clear enough. It should be something like:

import u12
dev = u12.U12()
dev.aiStreamStart(1, [0], 200)

u12 is the module and U12 is the class. Alternatively it could of had a "from u12 import U12" before the calls for them to be correct.

Regardng asterisks, our general documentation is based on the C/C++ header file. In C/C++, an asterisk indicates the parameter is a pointer (array or pass by reference).

"symbol not found" indicates a function from a library can't be found. On Linux and Mac, the u12 module only uses the Exodriver which does not have the AIStreamStart function. Currently that function is only available on Windows where the u12 module uses the ljackuw (UW) library. Let me know if you need the stream functions for Linux or Mac OS X and I can look into it further.

from labjackpython.

brianmapes avatar brianmapes commented on August 15, 2024

from labjackpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.