Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

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



I have an issue when I try to use LabVIEW 2015 to talk to a Tektronix TBS 1052B oscilloscope using VISA (with a USB connection). In particular, I seem to be able to write commands (e.g. '*IDN?'), but 'VISA Read' always returns nothing, and without errors. I know that VISA Write is working because I am able to write in a LabVIEW 2015 VI and then successfully read using the VISA Test Panel.


What is most confusing to me is that the both the VISA Test Panel as well as an identical VI written in LabVIEW 8.5 both Write/Read perfectly fine. I've attached screenshots to show the two VI's, as well as a log from NI Trace.


LabVIEW 2015:



LabVIEW 8.5:



NI Trace log:



You can see that in 8.5 and in NI Trace, the read commands return 'TEKTRONIX, TBS 1052B...' while 2015 returns nothing. All give no errors.


Things I've tried:

  • Playing with Termination Character. I thought that maybe 2015 VISA Read always immediately encountered a Termination Character '\n' and thus returns 0 bytes. I tried disabling the Termination Character in the Instr. Property Node before VISA Open, but this didn't change anything.
  • Adding a delay before VISA Read. I tried up to a 2 second delay to give the oscilloscope time before the Read command, but this didn't change anything.
  • Different version of NI-VISA. Both NI-VISA 17.0 and NI-VISA 15.0 give the same results. Note that LabVIEW 8.5 uses NI-VISA 4.4.

Anyone have suggestions? Another question: what are the differences in the LV8.5 VISA blocks and the LV2015 VISA blocks?


Thank you for the help 🙂

0 Kudos
Message 1 of 13

Try to add the '\n' character to the end of the write string.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 13

Thanks for the suggestion. I tried adding \n but this results in a timeout error at the VISA Read block. LabVIEW 8.5 also times out on the VISA Read block. VISA Test Panel successfully Writes/Reads when I add \n. I really wish I knew more about the VISA Test Panel, since it is very much a black box to me at this point.

0 Kudos
Message 3 of 13

Please check out: as it might give you some insight into what may be happening with the newline character.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 13

Now I'm thinking it may have to do with my computer's installation of LabVIEW 2015. I say this because:


-Communication works in LabVIEW 8.5, VISA Test Panel.

-Same exact issues with a second Tektronix scope, and even with a RIGOL scope.

-It works perfectly on LabVIEW 2015 on a different computer.


I will try to repair the installation or re-install (hope I don't have to do this).


Re \n: I actually inserted \n using the "Line Feed constant" from the toolbox, so I don't think it has to do with typing/special characters issues.

0 Kudos
Message 5 of 13

You are trying to use LabVIEW 8.5 and 2015 on the same computer?  Due to driver incompatibilities, I don't think that will work.  I think VISA will not allow multiple versions installed, so you are probably trying to use the old version of VISA with a version of LabVIEW it does not support.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 13

Hmm, I've uninstalled old LabVIEW 8.5 as well as all older software that are incompatible with 2015 (e.g. NI-VISA 4.4). Furthermore, I re-installed LabVIEW 2015 with the latest version of NI-VISA. Lastly, I used NI Package Manager to install the Tektronix drivers. Same problem still exists 😞

0 Kudos
Message 7 of 13



Did you fully uninstall LabVIEW 2015 before the re-install or use the force re-installation process? I would recommend the latter to ensure associated files and dependencies are re-created during install.


NI Software Force Reinstall

0 Kudos
Message 8 of 13

I have almost the same problem as the OP, VISA read works perfectly in VISA Test Panel in NI-MAX and returns data from the instrument, but in my simple VI it does not return anything. My setup:

  • LabVIEW 2018 (v18.0 x64) on Win7 x64
  • NI-VISA 18.0 (reinstalled, and set as primary system VISA), also tried version 18.5 but the same result
  • Agilent USB-GPIB adapter 82357B
  • Agilent VISA installed as secondary VISA

General notes:

  • LabVIEW installation is fresh and clean, I doubt it should be the issue
  • VISA diagnostic tools report no conflicts (since I have 2 VISA's side by side)
  • Agilent USB-GPIB adapter is detected properly in NI-MAX (normally after enabling VISA Passport for Tulip...)
  • Instrument is detected properly in NI-MAX, and responds (returns data) when queried using VISA Test Panel I/O
  • My VI is almost identical to the OP's, and I believe I'm correctly sending the line feed character (0x0A, \n) after the command string
  • NI I/O trace shows almost the same as OP (I get data when I query the instrument through VISA Test Panel, but not through LabVIEW/VI)

At this point I'm out of ideas what to do. Any assistance would be greatly appreciated, thanks 🙂

0 Kudos
Message 9 of 13

Most probably you forget to add an end character to the visa write.

Max automatically adds this LabVIEW does not.

0 Kudos
Message 10 of 13