nidaqmx-python | A Python API for interacting with NI-DAQmx | REST library

 by   ni Python Version: 0.7.0 License: Non-SPDX

kandi X-RAY | nidaqmx-python Summary

kandi X-RAY | nidaqmx-python Summary

nidaqmx-python is a Python library typically used in Web Services, REST applications. nidaqmx-python has no bugs, it has no vulnerabilities and it has low support. However nidaqmx-python build file is not available and it has a Non-SPDX License. You can install using 'pip install nidaqmx-python' or download it from GitHub, PyPI.

A Python API for interacting with NI-DAQmx
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nidaqmx-python has a low active ecosystem.
              It has 316 star(s) with 129 fork(s). There are 33 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 34 open issues and 120 have been closed. On average issues are closed in 102 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nidaqmx-python is 0.7.0

            kandi-Quality Quality

              nidaqmx-python has 0 bugs and 0 code smells.

            kandi-Security Security

              nidaqmx-python has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              nidaqmx-python code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nidaqmx-python has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              nidaqmx-python releases are available to install and integrate.
              Deployable package is available in PyPI.
              nidaqmx-python has no build file. You will be need to create the build yourself to build the component from source.
              nidaqmx-python saves you 22500 person hours of effort in developing the same functionality from scratch.
              It has 47013 lines of code, 3288 functions and 102 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed nidaqmx-python and discovered the below as its top functions. This is intended to give you an instant insight into nidaqmx-python implemented functionality, and help decide if they suit your requirements.
            • Read from the stream
            • Convert a parameter to a string
            • Wrap ndpointer
            • Read data from an analog channel
            • Write data to the stream
            • Write a 64 bit array to a dask array
            • Writes a frequency freq to the task handle
            • Write ticks to the task
            • Create a CILinEncoder channel
            • Reads an unsigned 32 - bit integer from the stream
            • Reads an integer value from the stream
            • Reads an integer from the stream
            • Adds an AIOS LVDT channel
            • Creates a CNG encoder channel
            • Creates a new AIAccel4 WireDCVoltage Channel
            • Reads an unsigned integer from the stream
            • Adds a rosettelli strain to a channel
            • Creates a new AITorque bridge table channel
            • Creates a new AI force bridge
            • Add an Ip pressure bridge
            • Add an I - torque channel polynomial channel
            • Creates a PA Pressure bridge table
            • Creates an AI force bridge table channel
            • Adds an A force bridge to a channel
            • Creates a new API pressure bridge
            • Add a two - point AITor bridge to a specific channel
            Get all kandi verified functions for this library.

            nidaqmx-python Key Features

            No Key Features are available at this moment for nidaqmx-python.

            nidaqmx-python Examples and Code Snippets

            No Code Snippets are available at this moment for nidaqmx-python.

            Community Discussions

            QUESTION

            Timers cannot be stopped from another thread (short example with nidaqmx-python and callbacks)
            Asked 2020-Apr-06 at 13:13

            I have seen other questions on the topic on this forum, but none have helped me understand how to deal with this. Most of them also seem to me to be about quite intricated and long code. I believe I am doing something rather simple / would like to do something rather simple. I hope someone can help! Here below extensive explanations and then my current code.

            NOTE: please do not delete this question. I have given the following a lot of thought and I have carefully gone through related threads, but to no avail. I also believe it makes sense to post this because it is partly related to a more generic question: that of how to plot in real-time while having callbacks running in the background (see summary at the end), which could be summarized to be my general goal.

            Setup and goal: National Instruments acquisition module (this matters litlle) NI cDAQ9178, interfaced via nidaqmx-python, a package maintained by NI with documentation here. Some analog signal is inputed in there, and the goal is to acquire it continuously (until I decide to stop the acquisition) at a certain sampling rate (approximately 1000 Hz) while plotting the signal in real time. The plotting needs not be refreshed nearly so often (10Hz refresh rate would even be fine). I'm using Windows 10 with Python 3.7 in a conda virtual environment, and editing is done in PyCharm. Ideally things should work both in PyCharm and any terminal.

            Situation: nidaqmx-python provides high-level functions that allow one to register callbacks (which one defines as one wishes), which are called everytime a certain number of samples (in my case 100, but that's not strict) fills the PC buffer. The idea is that the callback, defined below, reads the buffer at that point, and does something (in my case some low-pass filtering, which I have taken out for conciseness, some storing into a global variable data, and maybe plotting - see below).

            Problem: I have been fooling around with having whatever plots the data in real time be included in the callback, but with matplotlib that is a nightmare because the callback uses threads other than the main one, and matplotlib does not like to be called from anywhere outside the main thread. I've googled the heck out of other libraries optimized for real-time plotting (and, I was thinking, hopefully thread safe) but it's not so easy: I cannot get vispy to work and I cannot get pyqtgraph to even install, just to give you some examples. Then I saw several posts on the internet of people actually managing pretty decent real-time animations with matplotlib, despite it having been developped with publication in mind and not these applications; so I thought let's give it a go.

            My take: Since I could not have matplotlib do the work from inside the callback, I did the following (which is the code you see below): after the callback and after the task is started with task.start() (that's specific to nidaqmx-python), I just create a while loop which plots the global variable buffer. I thought it was a nice trick: see, buffer is updated (call it that) by the callback every 0.1 seconds or so (does not matter) and, on the side, the while loop is plotting the buffer variable over and over, erasing everytime before plotting, effectively yielding a real-time like plot.

            NOTE: I am perfectly aware the plotting part is not nearly as good as it could be made (I probably should use the ax API of matplotlib and the subplots, not to mention animation), but I do not care for the moment. I'll deal with that later and refine it to make it more efficient.

            What I want: this actually does what I want ... except, in order to stop it, I introduced the try: and except: statements around the while loop, as you see in the code below. Naturally, pressing CTRL+C does break the loop ... but it then also breaks the whole running script and leaves me with the following error: forrtl: error (200): program aborting due to control-C event, in PyCharm, and the following precision when run from a terminal:

            ...

            ANSWER

            Answered 2020-Apr-03 at 19:50

            The first thing I did was get rid of the keyboard interrupt loop. I replaced it with a global variable running, and another thread that sets the variable to False when returned from.

            Source https://stackoverflow.com/questions/61018720

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nidaqmx-python

            You can install using 'pip install nidaqmx-python' or download it from GitHub, PyPI.
            You can use nidaqmx-python like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ni/nidaqmx-python.git

          • CLI

            gh repo clone ni/nidaqmx-python

          • sshUrl

            git@github.com:ni/nidaqmx-python.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link