Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP VISA Instrument communication works in MAX but not when I run VISA commands from LabVIEW

Using NI MAX, I configure a (TCP/IP) network device, then open the test panel and am able to send commands/read responses to my instrument.

I then make a shell of a LabVIEW VI with a basic open/write/close command and the VI generates an error (-1073807343).

The VISA "open" command doesn't generate any errors (on the wires), but I am suspicions that the open somehow failed, which caused the write to subsequently fail.

I have an export from the I/O trace log...

On line 108, this is being run from within MAX

From line 168 and below this is where the trouble starts (running the VI).

   This is the message received:   Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)

0 Kudos
Message 1 of 11
(1,710 Views)

Hi,

 

I am having the same issue. Did you find a solution yet?

 

Thanks 

 

Peter

0 Kudos
Message 2 of 11
(1,637 Views)

Hi all,

 

unfortunately I cannot contribute to the solution, but have the same problem as you described.

 

I try to communicate with a PSU (IT-M3223) by using SCPI commands via TCP:

 

What does work:

- Configure in NI Max and communicate using VISA-Testpanel: OK

- Configure express vi "instrumentation assistent" and communicate when assistant is opened: OK

 

What does NOT work:

- Use LabVIEW to build a simple vi try to communicate

- Use above mentioned express vi in LabVIEW

 

After trying all possible variations and combinations I'm quite lost here. NI Max and LabVIEW obviously behave different but I don't have a clue where to look.

So any hints on this topic would be greatly appreciated.

 

Thank you!

 

Markus

0 Kudos
Message 3 of 11
(1,421 Views)

Hi

The biggest difference is that NIMAX offers to aad a new line as end character. And you should have in both connections the same visa resource.

Maybe we can help you better when you post the vi with the correct visa resource as far as you know.

To save a vi with front panel settings use before saving use edit/make all values default. 

greetings from the Netherlands
0 Kudos
Message 4 of 11
(1,414 Views)

Hi Albert,

 

here's the vi-snippet:

VISA-Test_TCP.png

 

I copied the resource name from NI MAX, where the device was found automatically.

LabVIEW throws an error directly after the write-command.

Error -1073807343

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

 

Thanks,

Markus

0 Kudos
Message 5 of 11
(1,346 Views)

Hi Albert,

 

here's the vi-snippet:

VISA-Test_TCP.png

 

LabVIEW throws an error after the write command.

Error code -1073807343

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

 

Thanks!

Markus

0 Kudos
Message 6 of 11
(1,388 Views)

Hi

Simpler said: your visa resource name is not correct.

How did this look in MAX?

greetings from the Netherlands
0 Kudos
Message 7 of 11
(1,372 Views)

Hi Albert,

 

it looks exactly as it does in LabVIEW. I checked again.

I tried using the alias as well, which is listed in LabVIEW correctly, but it gives me an error, though.

VISA_Alias.JPG

 

But I meanwhile found some kind of workaround.

It seems, that I need to execute the write command once and delete the specific error. 

From then up to closing the connection I now can send any command and get proper responses.

Well, I don't understand why this would work, but it does...

 

Here's the modified snippet:

 

 

VISA-Test_working.png

 

 

Thanks!

Markus

0 Kudos
Message 8 of 11
(1,367 Views)

So either the instrument has a problem by being spoken to, or something else but anyhow weird is going on.

greetings from the Netherlands
0 Kudos
Message 9 of 11
(1,355 Views)

As I can successfully communicate with other devices using the original vi, there may be indeed some problem with this kind of PSU. I use three of them and they all have this problem.

The different behaviour of NI MAX and LabVIEW is weird nonetheless.

 

Well, I've sent a mail to the manufacturer. Maybe a newer firmware exists.

 

Otherwise I will have to use the workaround...:(

 

Thanks!

Markus

0 Kudos
Message 10 of 11
(1,341 Views)