{ "info": { "author": "Jason R. Jones", "author_email": "slightlynybbled@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Purpose\n\nTo provide an easy-to-use, object-oriented instrument interface for the [DATAQ DI-2008](https://www.dataq.com/products/di-2008/) from within any Python environment.\n\nThe intent of this project is not to provide an API that will be useful in 100% of use cases, but will target the 90%. In my experience, most of us need pretty basic functionality and have only modest timing requirements when working with such instrumentation. As a result of this, the API will attempt to abstract away the lowest-level functionality which may result in a hiding or loss of feature implementation available in the hardware. If this happens to you, feel free to use the nuts and bolts exposed herein to inform your own development or, better yet, send us a pull request!\n\nMore complete documentation may be found at [readthedocs](https://di2008.readthedocs.io/en/latest/index.html).\n\n# Installation\n\nThe hardware drivers must be installed before this package may be utilized. Hardware drivers may be downloaded from the [manufacturer's product page](https://www.dataq.com/products/di-2008/).\n\nOnce drivers are installed:\n\n $> pip install di2008\n\n# Project Status and Future\n\nThe objects provided are tested and demonstrated to function well, however, there are still some features that have not been implemented.\n\nItems marked out have already been completed. The list is in approximate order of priority and marked out items have been completed.\n\n * ~~Implement Analog Scan List~~ complete\n * ~~Read Thermocouples~~ complete\n * ~~Read Analog Inputs~~ complete\n * ~~Read Rate Input~~ complete\n * Read Event Input\n * Read Counter Input\n * ~~Read Digital Input(s)~~ complete\n * ~~Write to Digital Outputs~~ complete\n * Better sample hardware timing control\n * Hardware Synchronization\n\n# Usage\n\nRegarding the specifics of usage, it may be very helpful for the user to read the device documentation so that some of the concepts enshrined herein are more precisely interpreted. Specifically, the concept of a \"scan list\" is somewhat unique to the product and difficult to abstract. As the project matures, more of the hardware idiosyncrasies are expected to be exposed to the user.\n\n## Hardware Setup\n\nPlace device into 'COM' mode:\n\n 1. Disconnect from USB\n 2. Wait 5 seconds\n 3. Connect to USB and press button on side rapidly until LED changes\n\nThe device setting is persistent and will not need to be changed again. You should see a COM port in your device manager with the label `DATAQ DI-2008` when the device is in the appropriate mode.\n\n## Software Setup\n\nTo read a few analog inputs, device setup is relatively simple.\n\n 1. Define the ports\n 2. Create the `Di2008` instance\n 3. Add the scan list\n 4. Start the scanning process\n 5. Read inputs at whatever timing is desired as the inputs will be updated \"live\"\n\nSome sample code might be more illuminating. A simple script to set up the scan list and to print the values every second:\n\n from time import sleep\n from di2008 import AnalogPort, RatePort, Di2008\n\n # create each of the inputs that need to be sampled\n an0 = AnalogPort(1, analog_range=10.0, filter='average')\n an1 = AnalogPort(2, thermocouple_type='j')\n an2 = AnalogPort(3, thermocouple_type='j')\n rate = RatePort(5000)\n\n daq = Di2008()\n daq.create_scan_list(\n [an0, an1, an2, rate]\n )\n daq.start()\n\n while True:\n print(f'{an0.value:.02f}')\n print(f'{an1.value:.02f}')\n print(f'{an2.value:.02f}')\n print(f'{rate.value:.02f}')\n print()\n\n sleep(1.0)\n\n# Contributions\n\nProject could use some work, particularly in documentation.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/slightlynybbled/di2008", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "di2008", "package_url": "https://pypi.org/project/di2008/", "platform": "", "project_url": "https://pypi.org/project/di2008/", "project_urls": { "Homepage": "https://github.com/slightlynybbled/di2008" }, "release_url": "https://pypi.org/project/di2008/0.3.8/", "requires_dist": [ "pyserial (>=3.4)" ], "requires_python": ">=3.6.0", "summary": "Object-oriented API for DATAQ DI-2008", "version": "0.3.8" }, "last_serial": 5752505, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "807ef85440f34cc3e7be8f8a35177767", "sha256": "9c8b49b15212561c398d3219c497a64b5fb066257c6105a1c63f5ae9acd4535a" }, "downloads": -1, "filename": "di2008-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "807ef85440f34cc3e7be8f8a35177767", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 6714, "upload_time": "2019-03-20T14:00:55", "url": "https://files.pythonhosted.org/packages/cc/f4/9b7908bc2ed2b049a0d4e6c52b1388bdd6f7089fb67163048b71af19c4c5/di2008-0.0.1-py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "6c619f213c2f8d729ff480c987ac02eb", "sha256": "8f8cf2d1525a4d48778d9155133a40f4613e27ce272d440e107b61def8fa17ac" }, "downloads": -1, "filename": "di2008-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6c619f213c2f8d729ff480c987ac02eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 7638, "upload_time": "2019-03-20T14:22:10", "url": "https://files.pythonhosted.org/packages/44/93/59a5cd0172e6ee13ca8dedcc8246d7cbc7224dc60a3ee144cc9835f8fe09/di2008-0.1.0-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "822ab69fedd8fea3696768cc9a461b15", "sha256": "bc1217f53e496a7925f336f4958992b0243deff2247406bf76e998869e714adf" }, "downloads": -1, "filename": "di2008-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "822ab69fedd8fea3696768cc9a461b15", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9430, "upload_time": "2019-07-10T15:11:21", "url": "https://files.pythonhosted.org/packages/e8/3f/da4852a90d0f9c80d98b7780796e62060b3efbcd7a84546111902b0ad783/di2008-0.2.0-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "870edff48814cb81d4eb58f328d322f3", "sha256": "ea17a5ea44219fb4ec6ba3b891e28eb305c8c9ad0bb119293559670f5841ecdd" }, "downloads": -1, "filename": "di2008-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "870edff48814cb81d4eb58f328d322f3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10251, "upload_time": "2019-07-11T12:04:43", "url": "https://files.pythonhosted.org/packages/3e/41/5f21f461e0b71da6686c9254a7a0120489c3a3fa4423926fb0901b297ade/di2008-0.2.1-py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b53f1dd52d5f64eb46d6140456430ee8", "sha256": "4189f8f83b900a3d1c9621b7fc76f3be9bd22100663b9ee968566902db47f8cd" }, "downloads": -1, "filename": "di2008-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b53f1dd52d5f64eb46d6140456430ee8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10809, "upload_time": "2019-08-06T14:46:53", "url": "https://files.pythonhosted.org/packages/f2/fb/05bdfae7a1a3fbf2ec8fe9d2d2c4021517426c11116ae6d6f25c59c81d8e/di2008-0.3.0-py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "5af0597cca33ceb24c012badd607924b", "sha256": "6a3dd8302d7dbfab0f1be95d6b7706a84fa529d8cc69053ddc5bc18bb68319c5" }, "downloads": -1, "filename": "di2008-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5af0597cca33ceb24c012badd607924b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10826, "upload_time": "2019-08-06T19:11:55", "url": "https://files.pythonhosted.org/packages/e1/54/5b1fe61200639de451a265bc215088bbd52e8e987ad4212bd4689e763d38/di2008-0.3.1-py3-none-any.whl" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "ccb5cc867156eb523c1cc334d2c87eb6", "sha256": "85b0f5df7cf4591b90142d1303ac9b3013493f45cb5a63a30d93e5cb66e787e5" }, "downloads": -1, "filename": "di2008-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ccb5cc867156eb523c1cc334d2c87eb6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10828, "upload_time": "2019-08-07T12:15:30", "url": "https://files.pythonhosted.org/packages/07/a9/c4d4723ac1603828a4940a0366cd43993d096083ec8ddb0b93b2ba600090/di2008-0.3.2-py3-none-any.whl" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "2df6b9a31a8817c46406578e13874a0a", "sha256": "107923f6da0571b4ba9918891c94942034270507eeb510f4b31a67bafa37e320" }, "downloads": -1, "filename": "di2008-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2df6b9a31a8817c46406578e13874a0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10953, "upload_time": "2019-08-07T14:06:43", "url": "https://files.pythonhosted.org/packages/e5/12/66ea2cd97ee3b81b9b7f7ff7e3179c8b372e1e27d17dcb641a4d15ee15f7/di2008-0.3.3-py3-none-any.whl" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "fba2ff5938adc5571c9ec6d6ec19a882", "sha256": "65eac4a2b46fc503e665b86df92d20e301eaf20b611642a37d01893018f80615" }, "downloads": -1, "filename": "di2008-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "fba2ff5938adc5571c9ec6d6ec19a882", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10952, "upload_time": "2019-08-08T12:34:30", "url": "https://files.pythonhosted.org/packages/59/14/be87e079689a641d1b22e9bd59f3fdcbe5d4dcc6407bc6c29316a49e60d0/di2008-0.3.4-py3-none-any.whl" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "a85ea37366b69819b1d274336b490c22", "sha256": "2467dbaa95e34e005bc43969420a1a8aea907f0b7c6f6669b6e4ffece98a0acb" }, "downloads": -1, "filename": "di2008-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a85ea37366b69819b1d274336b490c22", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 10986, "upload_time": "2019-08-08T13:41:17", "url": "https://files.pythonhosted.org/packages/77/06/e3b274a1d0d868ed2ab9e4f30e0c76b7b0d2c4bd552d5bea6767ecdd5ccb/di2008-0.3.5-py3-none-any.whl" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "5eba8708332c46440b8bdf47f9332e10", "sha256": "c3effdb94e2617c2b8ede12561d167c7ea2b70b0368b519b9bc4b854e1cf8740" }, "downloads": -1, "filename": "di2008-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "5eba8708332c46440b8bdf47f9332e10", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 11328, "upload_time": "2019-08-29T12:00:23", "url": "https://files.pythonhosted.org/packages/47/bb/19156bd430bfd9a12f882995c7420354361a39cefe2644d166d71e60ba3d/di2008-0.3.6-py3-none-any.whl" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "0ac1d7da0908f89ad2fd949e8463ea5a", "sha256": "0af0ac58aacc742ebd09e013111e411d6a683e3a5fde86449ca65c208beaa910" }, "downloads": -1, "filename": "di2008-0.3.7-py3-none-any.whl", "has_sig": false, "md5_digest": "0ac1d7da0908f89ad2fd949e8463ea5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 11480, "upload_time": "2019-08-29T12:51:43", "url": "https://files.pythonhosted.org/packages/0c/71/320698404bdd0a91eb398637806e28d8c8b048bea526846219ff41603d60/di2008-0.3.7-py3-none-any.whl" } ], "0.3.8": [ { "comment_text": "", "digests": { "md5": "a6c86cc79d7f5df450ddabfd8edf8a14", "sha256": "543794a809744b8285410c5be22d91d4cbecdf2de0ee81ca67d000b4aadc9b2c" }, "downloads": -1, "filename": "di2008-0.3.8-py3-none-any.whl", "has_sig": false, "md5_digest": "a6c86cc79d7f5df450ddabfd8edf8a14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 11509, "upload_time": "2019-08-29T13:20:48", "url": "https://files.pythonhosted.org/packages/4c/73/66c2fff68264709163b4500711a64713e80d32db295b88b1915f25e9f3f3/di2008-0.3.8-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6c86cc79d7f5df450ddabfd8edf8a14", "sha256": "543794a809744b8285410c5be22d91d4cbecdf2de0ee81ca67d000b4aadc9b2c" }, "downloads": -1, "filename": "di2008-0.3.8-py3-none-any.whl", "has_sig": false, "md5_digest": "a6c86cc79d7f5df450ddabfd8edf8a14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 11509, "upload_time": "2019-08-29T13:20:48", "url": "https://files.pythonhosted.org/packages/4c/73/66c2fff68264709163b4500711a64713e80d32db295b88b1915f25e9f3f3/di2008-0.3.8-py3-none-any.whl" } ] }