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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple VISA Write/Read not working in LabVIEW 2015 (works in LabVIEW 8.5)

I already checked the termination character, and I believe it's correct (0x0A, \n), please check the screenshots below, command buffer in NI I/O Trace shows exactly the same command in both cases. Before typing the sting constant for the VISA Write, I changed from "Normal Display" to "'\' Codes Display", which should properly interpret the \n as the New Line character. I also tried the 0x0D (Carriage Return), but it did not work either.

Tek7854-GPIB-NI-MAXTek7854-GPIB-NI-MAXTek7854-GPIB-LabVIEW-VITek7854-GPIB-LabVIEW-VI

0 Kudos
Message 11 of 13
(852 Views)

Is your NI-MAX a 32-bit or 64-bit executable? It's 32-bit if it's under C:\Program File (x86).

 

On my computer NI-MAX is a 32-bit executable, and LabView is 64-bit. Therefore, they aren't linking to the same NI-VISA library. It could be that NI-MAX is using an older/different version of NI-VISA than LabView.

 

Confusingly, 64-bit DLLs are in C:\Windows\System32 and 32-bit DLLs are in C:\Windows\SysWOW64. You can look in either directory for visa32.dll , or even visa64.dll.

Message 12 of 13
(843 Views)

Thanks Bitdiddle, you pushed me in the right direction and I fixed the problem, I was using x64 LabVIEW, by switching to x86 version it started working. In short: Agilent USB-GPIB adapter I'm using works thru NI VISA Passport for Tulip which is 32bit (x86) exclusively, therefore x86 LabVIEW is required so that it calls x86 NI VISA. I suppose x64 LabVIEW cannot use x86 NI VISA. I'm just a bit annoyed by the fact that it "almost" worked with x64 LabVIEW (the instrument was certainly getting the command), I expected that x86/x64 conflict would yield a straightforward full stop error like "cannot load library..." or so.

 

My NI-MAX is x86, and with your hint I figured out what was going on. I also found this thread:

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/LabVIEW-2013-64-bit-and-Agilent-82357A/td-p/...

dealing with a similar situation.

 

VISA deployment is...strange. I have both Agilent and NI VISA on my system (NI VISA as primary):

  • C:\Windows\SysWOW64\visa32.dll is version 18.0 signed by National Instruments
  • C:\Windows\System32\visa32.dll is version 5.9 signed by IVI Foundation
  • C:\Windows\System32\visa64.dll is version 5.9 signed by IVI Foundation

not sure which is which here, will leave it alone now since it seems to work.

 

Just hope that this experience helps the OP as well.

0 Kudos
Message 13 of 13
(831 Views)