LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is SCPI working in NI Max but not in Labview using Visa Write?

Solved!
Go to solution

Hello,

i added in MAX a network device and by using the VISA Test Panel i can send for example *RST\n .

 

When doing the same in Labview i get error 0xBFFF0011

 

I checked in IO TRACE and the sent command are the same, also with the needed \n at the end.

 

But there is a difference in the logged line:

In Ni Max it says "*RST.", 5, 5"

In Labview it logs only "*RST."

 

What is here the problem? What is missing?

 

Labview says to this error:

VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.

But the connect string is 100% correct as it selected from the resource name dropdown which shows the same instruments as in MAX.

 

Thanks

Download All
0 Kudos
Message 1 of 6
(2,453 Views)

You most likely are not sending RST<lf> to the device but literally RST\n.

 

The difference is in the Display Mode. Right click on your string control or constant and select “Display \ Codes”. When you now enter \n in this string LabVIEW will use the line feed or also called new line character code, rather than literally sending \n!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 6
(2,443 Views)

No, it must be something else. As you can see in the screenshots of the buffer contents both commands end with 0x0A = linefeed

0 Kudos
Message 3 of 6
(2,436 Views)

NI-MAX is closed when you try to run your VI? Although that typically should give a different error. I’m however not seeing the TCP/IP port number in the resource name either and doubt that inst0 would identify that sufficiently.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 6
(2,389 Views)

The errormessage is  the same no matter if NI MAX with the VISA Test Panel is open or not.

 

The connect string should be correct as it is displayed automatically in Labview when using the visa resource name constant. It is also the same as what is displayed in the instruments webpage. And also the same what is displayed in the title of the Visa test Panel.

 

very strange

0 Kudos
Message 5 of 6
(2,380 Views)
Solution
Accepted by topic author OnlyOne

Portnumber is only needed for socket communication...

But i switched to a socket connect string "TCPIP0::192.168.0.63::5025::SOCKET" and now its working 🙂

 

0 Kudos
Message 6 of 6
(2,373 Views)