Code Monkey home page Code Monkey logo

node-daqmx's Introduction

node-DAQmx

node-DAQmx enables Remote Procedure Calls (RPCs) from a node.js server to DAQmx driver functions. Using WebSockets, this is extended further to client-side javascript.

This project uses node-ffi to expose the driver functions to the node.js server. Then, the client uses WebSockets to connect to the server and make calls to the exposed functions.

Running instructions

Requirements

  1. Make sure you have DAQmx drivers on the computer you plan to run the node server on
  2. Also make sure you have DAQmx hardware plugged into theat same computer, or a simulated channel using NI MAX
  3. Install node.js https://nodejs.org/

Run the demo!

  1. In the top directory, do an npm install to get the packages installed
  2. Run node ffi-app.js
  3. Go to localhost:3000
Do continuous data aquisition
  1. Select a channel from the dropdown menu
  2. Adjust the sample rate, max voltage, and min voltage
  3. Click setup for collection, then click run
  4. At the moment, you will have to restart the node app and refresh the page to select a different channel or change any settings
Do digital I/O (Somewhat hardcoded for now, to be improved upon)
  1. Click set up for digital I/O
  2. Click read to read in the state of the digital port on the DAQ device
  3. Click some of the checkbox buttons to change them, then click write to write those values to the DAQ device

Writing the client

  1. Establish a standard WebSocket connection
  2. To call the functions from the client, you must send a json message with the correct data. Examples of messages that could be sent are available in the jsonMessageExamples.txt file

node-daqmx's People

Contributors

tnelligan avatar

Stargazers

Milan Raj avatar Liutauras Rusaitis avatar

Watchers

James Cloos avatar Liutauras Rusaitis avatar  avatar

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.