Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

Control digital output using nidaqmx in python

$
0
0

Hello

 

I am new to the combination of python and NI Daqmx. I managed to downlaod all needed packages/libraries and want to controll 3 digital outputs using python.

I am aware that the page http://nidaqmx-python.readthedocs.io/en/latest/index.html

exists, however, the syntax there is unclear to me and I would need some examples in order to understand the syntax on that webpage.
I am familiar with C, C++, and Matlab.

 

System:

Device: NI USB-6008

Python 3.6.4 (using PyCharm)

Windows 7

 

What I want to control: port 0 line 0:2 as digital output

What should it do: Set digital output on or off in order to switch connected relais.

 

My questions:

1) How can I address a channel? e.g. port 0 line 0

2) How do I tell a channel whether it is input or output?

3) How do I tell the Daqmx that I want to switch the state (off -> on)?

 

Thank you very much for your attention and I am glad upon each feedback.


Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>