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.
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:
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 🙂
Try to add the '\n' character to the end of the write string.
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.
Please check out: https://forums.ni.com/t5/LabVIEW/Sending-New-Line-character-after-command/td-p/3739608 as it might give you some insight into what may be happening with the newline character.
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.
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.
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 😞
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
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:
At this point I'm out of ideas what to do. Any assistance would be greatly appreciated, thanks 🙂
Most probably you forget to add an end character to the visa write.
Max automatically adds this LabVIEW does not.