Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible reason(s): VISA: (Hex 0xBFFF0011) but resource is accessible through NI-MAX

Hi there, 

I am fairly new to Labview and I hope you can help. 

 

I am setting up a .vi to communicate with an instrument. The .vi is fairly simple: open VISA, write command, read buffer and close VISA. Screenshot attached below:

vferro1789_1-1606951487992.png

 

 

 

Unfortunately it gives this error:

Possible reason(s):

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

 

I can communicate with the device without any issue through NI-MAX (see below) and using proprietary software. 

vferro1789_0-1606951417278.png

 

 

Looking for solutions, I tested (unsuccessfully) all of the following suggestions:

- Added an alias in NI-MAX, and used the alias to select the VISA resource 

- Added instrument properties before opening the VISA: this reads the right instrument and setting, so it seems that the device name is actually correct

- tested different protocol (TCP/IP, GPIB, Serial) - all gave the same error. 

 

Finally, if I only open and then close the VISA (i.e. I remove the write/read blocks), I do not get any error. 

 

Since I am fairly new in Labview, maybe there is something very basic that I am missing. I hope you can help. 

 

Cheers, 

Vale

0 Kudos
Message 1 of 9
(4,594 Views)

Notice in the NI-Max window that the string terminates with a "\n" and in your program query you have it ending with "/n".

Change it to "\n" and see if that helps.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 2 of 9
(4,542 Views)

Hi there, 

thanks for replying and for spotting the "\"

 

I took the screenshot after a long day of tests, and that was one of the last thing I tried without success. Both "\n" or "/n" do not work. 

 

As an update, I contacted the manufacturer of the device to get an example .vi

Even using their example, I get the same error. 

 

Thanks again for the help. Hope to solve it soon

 

Cheers, 

Vale

0 Kudos
Message 3 of 9
(4,536 Views)

In your vi front panel, hit the down arrow for you Visa Resource Name options and select the one available for your instrument.  It could be that this instrument has an alias name that you set.

 

Usually for TCP connections, I would use the TCP primitives under the Data Communications => Protocols => TCP rather than the VISA Resources.

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 9
(4,532 Views)

Hi

If you are using \ codes in LabVIEW strings make sure that the visualization of the string is in '\' codes display.

Other wise you are sending a \ and an 'n' instead of a linefeed.

see pictur2020-12-04 12_08_49-Reply to Message - NI Community - Brave.jpge2020-12-04 12_04_45-Untitled 1 Block Diagram _.jpg

greetings from the Netherlands
0 Kudos
Message 5 of 9
(4,512 Views)

Hey, I am also facing a similar problem with my Instec mk 2000 temperature controller. Did you solve the problem ?

0 Kudos
Message 6 of 9
(4,458 Views)

Hi there, 

In my case, it turns out it was something to be fixed with the instrument provider. I was able to communicate with the instrument by taking the following steps:

 

- Using an actual ethernet port instead of the USB 

- In NI MAX using a VISA driver that was provided by the supplier instead of using the NI one

 

Even with these two conditions, I was only able to connect using the SOCKET port instead of the instrument one (which is slower than the actual instrument port). For my case this was sufficient, as I was demoing the device and I just wanted to perform some tests. 

 

If you are lucky enough that your problem is one of the most common one, there are a series of good posts on this forum on how to fix it (they did not work for me, but apparently nothing could in my specific case). 

 

The first sanity check is: are you able to communicate to the instrument through NI MAX? I.e. send and receive messages through VISA protocol?

If yes, you could try rename the instrument and test again in labview by using the alias name you renamed the instrument with. This seemed to be the most effective fix when I read around the forum. 

 

Sorry I could not help more. 

Cheers 

V

0 Kudos
Message 7 of 9
(4,453 Views)

@minions @albert.geven

Thank you both for the suggestions.

 

I tried using TCP primitives as well before posting on the forum and it did not work. 

 

It turns out it was something to do with the instrument itself.

 

Even using a small labviews script provided by the supplier (where they handled the linefeed better than I did - as @albert.geven pointed out), it was not working. 

 

Eventually we fixed it by using a different VISA handler. 

 

Thanks again for the help,

Vale

0 Kudos
Message 8 of 9
(4,452 Views)

Hello, thank you for the response. It is very help. I am still working on my issue and hope it will be resolved soon. 

 

Best Regards and wishes for holidays...

 

0 Kudos
Message 9 of 9
(4,436 Views)