From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Function viOpen VISA return value 1073807343

Hi everyone,

 

I am using Labwindows/CVI 8.5.1 and I am facing an unpredictable (to me) error.

 

I have two equipments that I control with TCP/IP protocol using VISA Library in Labwindows. The two devices are connected to an Ethernet HUB which is connected to my development computer.

Most of the time, it works very well, I can acces both instrument and make them do what they are supposed to. But sometimes, i don't know why, I get the VISA error 1073807343 from the function viOpen. This means that "the datas of the position are note sufficient or the device is not present in the system"  (french traduction). When I get this error, I can't found one thing that has changed or that is different.

I am not even able to reproduce this error because I don't know what's causing that.

 

Can you help me finding the possibly reasons of this behavior ? I think that I have to know what can bring error 1073807343, and i will find a solution.

In the VISA documentation i haven't found the answer yet ...

 

Thanks by advance for any help.

 

Vincent.

0 Kudos
Message 1 of 6
(5,927 Views)

Hello,

Do you have the latest version of NI-VISA ?

You can found it here : http://www.ni.com/download/ni-visa-5.2/3337/en/

It is supported by CVI 8.5.

Best regards,

Jovan N. - Application Engineering
0 Kudos
Message 2 of 6
(5,891 Views)

Thank you for your reply Jovan.

 

I was working with the 4.0 version.

I am downloading the 5.2 version of VISA library and I am going to work with this one this afternoon.

I will let you know how it is going.

 

Vincent.

0 Kudos
Message 3 of 6
(5,861 Views)

Hello again.

 

Even with the latest version of NI-VISA, the error mentionned above appears sometimes.

For example it happens after running 15 times my program. The first 14 times it went well and I haven't changed anything between the 15th time.

 

To me, the errror should appear only when :

- A wrong adress is sent

- The device is not correctly connected

This is not the case.

 

I thought that it could happen when the device is "busy" so I added Delays but it didn't fix it.

 

Does anybody have any other suggestion ?

 

Thanks by advance.

 

Vincent.

 

0 Kudos
Message 4 of 6
(5,851 Views)

Hello NI forum !

 

I have a few more information about my problem.

I still can't say what's happening but here is what I know :

 

To open a visa session, you have to call viOpenDefaultRM() and then viOpen.

 

The code is something like this :

 

status1 = viOpenDefaultRM(&defaultRM);

if (status1 < VI_SUCCESS)

     {
     return -1;
     }

 

status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);

if (status2 < VI_SUCCESS)

     {
     return -2;
     }

 

The code never returns -1 => viOpenDefaultRM seems not to be the problem.

I thought I could double the viOpen instruction to see if it is a really random error.

 

status1 = viOpenDefaultRM(&defaultRM);

if (status1 < VI_SUCCESS)

     {
     return -1;
     }

 

status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);

if (status2 < VI_SUCCESS)

     {

     status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);        

     if (status2 < VI_SUCCESS)

          {

          return -2;

          }
     }

 

But it didn't work the viOpen fail the two times when it fails at the first.

So I try this :

status1 = viOpenDefaultRM(&defaultRM);

if (status1 < VI_SUCCESS)

     {
     return -1;
     }

 

status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);

if (status2 < VI_SUCCESS)

     {
     return -2;
     }

 

The code never returns -1 => viOpenDefaultRM seems not to be the problem.

I thought I could double the viOpen instruction to see if it is a really random error.

 

status1 = viOpenDefaultRM(&defaultRM);

if (status1 < VI_SUCCESS)

     {
     return -1;
     }

 

status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);

if (status2 < VI_SUCCESS)

     {

     status1 = viClose(defaultRM);

     status1 = viOpenDefaultRM(&defaultRM);

     if (status1 < VI_SUCCESS)

          {
          return -1;
          }

     status2 = viOpen(defaultRM, addr, VI_NULL, VI_NULL,&vi);        

     if (status2 < VI_SUCCESS)

          {

          return -2;

          }
     }

 

That works. It's not perfect but  this erros had a probability of something like 0.05 to happen. Now if it happens, then I try again with another DefaultRm Session and it works.

With that workaround it has a probability to fail of 0.05*0.05 = 0.0025.

 

If anybody has an idea of what's causing this error it would be great to reduce this probability to 0.

 

Thanks by advance.

 

Vincent

0 Kudos
Message 5 of 6
(5,792 Views)

Hello Vincent,

There are two things I would like to try on your Issue.

1. Rename the instrument with a costum name

http://digital.ni.com/public.nsf/allkb/FF9EEE0B28569617862573210073B69F

2. Use the low level name (ex: GPIB0::5::INSTR)

Try both of options and let me know if one of them solve the issue.

Best regards,

 

Jovan N. - Application Engineering
0 Kudos
Message 6 of 6
(5,781 Views)