LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating LabVIEW GPIB communication to Python

Hello everyone,

 

In the lab that I work in, LabVIEW is used to communicate to all the instruments and equipment to collect data. Recently, we started migrating communication and data gathering to Python and I am running into an issue with only one of my devices.


This device is a simple multiplexer called the Data Proof 164 and is connected with a GPIB-USB-HS. When looking at the LabVIEW program, I can see that the only process to change the channel on the multiplexer is to GPIB write a code corresponding to what channel needs to be closed. The multiplexer does not send any data back so '*IDN?' returns nothing.

In order to do the same process in Python, I installed PyVisa and used the write functions to send commands. However, sending commands through PyVisa shows weird behavior such as closing incorrect channels or becoming stuck on only one channel. 

PyVisa works great with my Fluke multimeter, but not with my data proof multiplexer. I was wondering if anyone has experienced this before and what the issue could be. 
Thanks!

0 Kudos
Message 1 of 4
(1,093 Views)

@rpatel392 wrote:

Hello everyone,

 

In the lab that I work in, LabVIEW is used to communicate to all the instruments and equipment to collect data. Recently, we started migrating communication and data gathering to Python and I am running into an issue with only one of my devices.


This device is a simple multiplexer called the Data Proof 164 and is connected with a GPIB-USB-HS. When looking at the LabVIEW program, I can see that the only process to change the channel on the multiplexer is to GPIB write a code corresponding to what channel needs to be closed. The multiplexer does not send any data back so '*IDN?' returns nothing.

 

Honestly the language should not matter as it all comes down to sending text commands to your device over GPIB.

 

 

  1. This device is not IEEE488.2 compliant so it will not respond to *IDN? or any other IEEE488.2 common command.
  2. I am guessing your termination character is wrong or something like that.
  3. https://dataproof.com/Publications/Programming-Tips.pdf has some tips...
  4. Good Luck
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(1,015 Views)

Using IO Trace, I found that LabVIEW uses a "\n" as the termination character and that is what I have setup in PyVISA. I have already looked into the Programming tips provided by the manual, and I think one of my problems may be that the device does not return any handshake lines. This may cause some problems when writing commands to the bus. I am not sure how to disable handshaking on the GPIB-USB-HS, but I will look into that to see if I can.

If you have any other tips, please let me know!

Thanks

0 Kudos
Message 3 of 4
(980 Views)

It's hard to blame the hardware when that didn't change.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(968 Views)