08-03-2021 10:58 PM
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 .
Solved! Go to Solution.
08-04-2021 12:01 AM
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:
08-04-2021 08:45 PM
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.
08-24-2022 03:40 AM