From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Control PXI devices via PyVisa?

Solved!
Go to solution

Is it possible to control PXI devices via PyVisa in the same way as USB, and GPIB devices?

0 Kudos
Message 1 of 8
(8,014 Views)
Solution
Accepted by topic author k-rhyme

Hi k-rhyme,

 

It should be possible to do. You can definitely control PXI devices using NI-VISA and since PyVISA is just a Python wrapper, it should be possible. It also depends on the version of VISA that PyVISA is using. I would recommend looking at the NI-VISA User Manual for more info PXI specific functions. 

Using the NI-VISA Driver Wizard and NI-VISA to Develop a PXI(e)/PCI(e) Driver in Windows

http://www.ni.com/tutorial/4713/en/

 

NI-VISA User Manual

http://www.ni.com/pdf/manuals/370423a.pdf

Message 2 of 8
(7,994 Views)

Thanks Frank, I was unfamiliar with register based communication on NI devices.

0 Kudos
Message 3 of 8
(7,990 Views)

The PXI devices I have are the PXI-e 4143, and the PXI-e 4145. How would I perform simple tasks such as reading and writing voltages and currents using register based communication?

 

The documenation is very clear about how to read and write arbitrary data to the register, but it is not clear as to how that data can be useful.

0 Kudos
Message 4 of 8
(7,977 Views)

If you want to do analog acquistion with Python, you may want to consider PyDAQmx. This is a wrapper for the NI-DAQmx driver, which is built for data acquisition. This would be easier than using VISA calls.  

 

PyDAQmx

https://pythonhosted.org/PyDAQmx/

0 Kudos
Message 5 of 8
(7,967 Views)

Thanks! I will try this.

0 Kudos
Message 6 of 8
(7,963 Views)

It would appear that PCIe 4143 and PCIe 4145 devices are not supported by NI-DAQmx. Will support for these be added in the future, or am I limited to LabVIEW and LabWindows for development with these devices?

0 Kudos
Message 7 of 8
(7,948 Views)

Ok, sorry about that. Unfortunately, it seems you need the NI-DCPower driver to operate those. Your development options for this driver are LabVIEW or LabWindows. You could use the C API in LabWindoes if you want to use the C language. 

 

Download the NI LabWindows™/CVI Free Trial

http://www.ni.com/lwcvi/download/

0 Kudos
Message 8 of 8
(7,907 Views)