Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Status returns -1073807346 when assigning RsrcName property

I have a VB6 application using the CWVisa control from Measurement Studio 6.0.  The application was built in a Windows 2000 environment.  The application worked fine on a Windows 2000 machine until it was replaced with a Windows XP machine. 

 

When I attempt to assign a resource name to the VISA control, it fails returning a VisaStatus code of -1073807346.  This is the first interaction with the control, so there are no other open sessions.

 

    frmMain.CWVisa1.RsrcName = "GPIB0::16"  <-- error happens when this line of code is executed

    frmMain.CWVisa1.Open

 

The target machine has a PCI-GPIB card installed.  The Measurement & Automation Explorer shows the card and is able to interact with the device at address 16. 

 

Any ideas?

0 Kudos
Message 1 of 6
(3,807 Views)

New information:  I installed Measurement Studio (6.0) for VB6 and the application now works.  This is not a permanent solution since I only have 1 licensed copy of MS and it will need to be removed.

 

I am puzzled because the visa control (CWvisa.ocx) is included in my application's installation package and was placed in the WINDOWS\system32 folder.  I'm not sure why installing MS would change anything.

0 Kudos
Message 2 of 6
(3,790 Views)
So this issue is seen whenever you deploy your application in an installer to another machine?
David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 3 of 6
(3,781 Views)

Hey Sminch,

 

It sounds like some other dependency other than the CWvisa.ocx you mentioned is needed for your application to run.  Have you followed this KnowledgeBase article when building your installer to include all of the needed features?  Check out that link and see if there is something you missed when including files with your installer.

 

Thanks,

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 4 of 6
(3,773 Views)

I've deployed the application to several Windows 2000 boxes over the past few years without a problem.  In this case, the owner of the client had to replace his Windows 2000 box with an XP Pro box.  After he installed his NI-PCI-GPIB card and before he installed my application, he was able to communicate with the instruments (Agilent Network Analyzer and Agilent LCR Meter) using MAX.  After he installed my application (which includes CWvisa.ocx, among other things, in the setup package), the application errors the first time it interacts with the CWvisa control, as described in my first post.  He could still interact with the instruments using MAX.

 

For the purposes of debugging, we installed Measurement Studio on the client box.  After this installation, my application is able to interact with the visa control, however we are having a different problem:  after executing the ReadToFile method, the file created contains random garbage.

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

Hi sminch,

 

I have a couple of questions to help clarify the issue:

 

Are there any other CW controls in this application that are working properly? 

Also, does this problem only occur on a single xp machine, or have you been able to replicate it?

 

I look forward to your reply!

 

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 6 of 6
(3,734 Views)