Giter VIP home page Giter VIP logo

nipiezeojenapy's Introduction

Control of PiezoSystemJena NV40/3CLE via NI DAQmx

Control of the Jena's piezo accuators via their multi-channel amplifier. https://www.piezosystem.com/products/amplifiers/multi-channel/40ma-multi-channel-amplifiers/

Uses NIDAQ device to read and write analog voltages between 0 and 10 to three input and output voltage channels connected to a Jena NV40/3CLE amplifier. Each input/output channel controls one of three axis (x, y, or z).

When using this software, one must at least provide three analog channels on the NIDAQ that are connected to the NV40/3CLE amplifier that control (write) the location of the piezo stage.

This program does not need to read voltages from the amplifier. If no read channels are provided, this program will report the last written values when reporting the current location.

This controller does NOT lock out usage of analog input and output channels on the NI-DAQ card. It writes or reads to the analog channels and then releases the resource. This would allow external programs to access those channels, so long as the access is not simultaneous.

Installation

Requirements

This python package depends upon National Instruments driver and NI DAQ card that contains three analog input and output channels.

You must first install the NI DAQmx driver. http://www.ni.com/downloads/.

PIP should install the rest of the dependencies.

Local Installation

pip install nipiezojenapy

Usage

GUI Application

From the shell prompt, launch

> qt3piezo

For help on hardware configuration use the help option (qt3piezo -h)

Programmatically

import nipiezojenapy
pcon = nipiezojenapy.PiezoControl(device_name = 'Dev1',
                                  write_channels = ['ao0','ao1','ao2'],
                                  read_channels = ['ai0','ai1','ai2'])

Read Position

print(pcon.get_current_position())
[39.953595487425225, 40.047631567251806, 39.9510191567554]

Go To Position

pcon.go_to_position(x = 20, y = 20, z = 20)
pcon.get_current_position()
[19.935887437291537, 19.94876864898489, 19.872769502734947]

Note that each axis can be set independently. That is, one may move along a single axis without specifying the other axis values.

pcon.go_to_position(z = 40)
pcon.get_current_position()
[19.913989377848296, 19.988700406441584, 39.91623869419529]

LICENSE

LICENCE

nipiezeojenapy's People

Contributors

gadamc avatar mfparsons314 avatar nnguyenhtommy avatar

Watchers

 avatar chukwuemeka mordi avatar

nipiezeojenapy's Issues

Add "save current position" button

This button would load the values of the current position, as indicated in the application, to the entry values for the "go to position" button. This would allow the user an easy way to save a position and return to that position quickly

qt3piezo app -- set read channels to None

The underlying library supports setting read channels to None, but the GUI application fails to handle this scenario.
As a user, I want to be able to control the actuator even if I don't have analog read channels from the actuator controller connected to NIDAQ analog inputs.

Should be an easy fix.

Create properties around scale / offset variables.

The scale and offset parameters off the stage controller need to be changed on the fly by the qt3scan application. Of course, a user of an instance of the PiezoControl class can directly modify the underlying variables. But the proper way to do this to guarantee functionality is to make these accessible as a property and then do checks in the setter function.

self.scale_microns_per_volt = tuple([scale_microns_per_volt] * 3)

Generalize software for multiple devices

It's pretty clear that this software could be repurposed for any device that moves an object in 3 dimensions using analog input and output channels on NIDAQ. (In fact, it doesn't even need to be spatial dimensions!).

It would not be too much work to clone this repository, rename it to something more general, then layer on specifics.
In fact, the only thing that is really needed to is properly scale the analog voltage to the dimension of interest. (In the case of the Jena controller, this scaling is 8 microns per volt)

The very small downside of renaming is that there'd be a few side effects

  • would need to migrate qt3utils to new package name in future versions. This would be somewhat trivial, and would likely dovetail with a need to define a 3d stage controller interface in qt3utils.
  • would need to push new package to pypi - also trivial.

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.