Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO and Analog Output using Python

Hello everyone,

 

I am using NI cRIO-9063 device and I want to generate an analogue voltage output from NI 9264 Module with the help of nidaqmx library in Python. I have tried the code given below but did not get any result. the device is not detected actually. 

 

Have anyone worked with it, please help!

...

import nidaqmx

 

with nidaqmx.Task() as task:
task.ao_channels.add_ao_voltage_chan("Dev1/ao0")
data = task.read()
print (data)

...

Regards

0 Kudos
Message 1 of 5
(1,954 Views)

Hi, 

 

You cannot see it on the NI MAX as well? Try checking the test panel, if this doesn't work you may be having driver problems.

If you have issues with connecting with the python code, you could try using the system functions in your code, to check if the port connections/channels are set ? Or switch the lights on/off to check if the connection is there?

nidaqmx.system — NI-DAQmx Python API 0.5.0 documentation (nidaqmx-python.readthedocs.io)

 

 

 

0 Kudos
Message 2 of 5
(1,865 Views)

I tried all things that you suggested but also didn't get any output. What should I do now?

0 Kudos
Message 3 of 5
(1,793 Views)

The cRIO-9063 does not offer DAQmx support, so your attempts to use this API will always fail.

 

Either programm your aquistion in FPGA code or use the scan engine.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 4 of 5
(1,789 Views)

Oh, I understand that I have to use FPGA.

 

My question is I built a model in python using OpenCV libraries.

For the physical voltage control model, I would like to use cRIO-9063 and voltage controller NI 9264 with DSUB. Could you guide me on how can build LabVIEW connections for this and how can join this LabVIEW circuit with python so I can execute my full script?

0 Kudos
Message 5 of 5
(1,740 Views)