06-11-2021 08:36 AM
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!
06-13-2021 07:24 PM
@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.
06-14-2021 08:37 AM
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
06-14-2021 11:35 AM
It's hard to blame the hardware when that didn't change.