LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can send SCPI through Putty, but not working with LABVIEW

Solved!
Go to solution

Hi,

We have a VIAVI MTS6000A bit error tester which we can send and receive SCPI through Putty. But none of these SCPI commands work through LabVIEW VISA write or read functions. The communication is through LAN cable. I could create a VISA instrument name in NI MAX using IP address and port number  and can open and close a VISA session without error. But even a *IDN? command through VISA test panel in NIMAX doesn't return anything. But this command works fine in Putty. I am fairly new to LABVIEW and my networking knowledge is bit scratchy. Could anyone have an idea what is going wrong here? I am not sure if the instrument support the LABVIEW VISA drivers . 

0 Kudos
Message 1 of 4
(2,106 Views)
Solution
Accepted by topic author mathew84

My first guess is something relating to line termination, but without more information it's just a blind guess.

LabVIEW doesn't (by default) append line termination characters to VISA Write calls, so if Putty appends \r\n or \n (CR, LF or LF) when you hit enter, it might be that you're missing this in LabVIEW.

The solution is to use Concatenate String to add a Line Feed constant, or similar, as appropriate. You can also manipulate the properties of the connection and have it always append a character on write, but I find explicitly writing it is clearer (imo).

 

A few quick questions:

  1. Is this the manual for your instrument? 6000A V2 Platform (It mentions V2, which you don't, so I'm not sure).
  2. If it is, which chapter describes what you're trying to do? I saw a few options for remote access but it wasn't clear to me which was applicable to your situation...
  3. How are you connecting with Putty? And can you describe any settings you've entered there to get your initial testing to work?
  4. Can you share your VI?

GCentral
0 Kudos
Message 2 of 4
(2,091 Views)

 Its working now. There was 2 issues.

One was the end of line character as you mentioned. The second issue is we had to give a *REM command to that instrument  before sending any other SCPI commands . So now i can talk to the instrument. Hopefully i can make progress now. Thanks for your help.Much appreciated.

0 Kudos
Message 3 of 4
(2,049 Views)
I am trying to link to a VIAVI instrument too. Did you have to install their Smart Access Anywhere software to talk to the instrument. My instrument has no ethernet port, so I can't directly link to it. I'd be interested to see an example of your VI's.
0 Kudos
Message 4 of 4
(1,602 Views)