Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 7.1 IVI-C Wrappers and VISA Property Node not working together?

Solved!
Go to solution

Hi everybody

 

 

I want to use VISA Property Node with LabVIEW 7.1 Wrapper from two different well known instrument companies, Rodhe-Schwarz and Agilent Technologies.  
Both companies releasead their IVI-C drivers for NI LabVIEW 7.1 version in NI Instrument Driver Network and they are ready to be installed and used.

I have found a bug that manifest only LabVIEW 7.1 version as the bug is not present in LabVIEW 8.0 or LabVIEW 8.6 versions whhen these IVI LabVIEW wrappers from LabVIEW 7.1 are used.

Anybody could exeperience this bug if they have LabVIEW 7.1 installed and try to use the LabVIEW 7.1 version of these wrappers that are published in NI Instrument Driver Network under the links below.

 

Agilent ag81150ni IVI Driver for LabVIEW 7.1 install from here. Run in simulation only by setting Simulate=1

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=55798957B1A633BDE0440003BA7CCD...

  

Rodhe Schwarz rsngpt IVI Driver for LabVIEW 7.1 install from here. Run in simulation only by setting Simulate=1

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E91D6659CE034080020E748...

 

After installation of these two drivers complete close LabVIEW 7.1 if it was open, then restart LabVIEW 7.1. You may see under the LabVIEW Instrument Driver Palette  two new IVI drivers ready to be used as LabVIEW 7.1 wrappers in a LabVIEW 7.1 VI test.

Open a new blank VI and from Instrument Driver Palette use two known VI, Initialize With Options.vi and Close.vi by adding them on the block diagram, connect thm together. Accept all default parameters except Simulate parameter that must be set as Simulate=1.

Both VI run OK in simulation mode without errors.

 

Now pick a Property Node from VISA Advanced Panel and squeeze this Node between the "Initialize With Options" and "Close" VI and do all required in-out and error in-out connections.

 

Run these two simple Vis in simulation

  1. When I run Rodhe Schwarz IVI driver the Property Node passes OK until the end. No Error 
  2. Whne I run Agilent IVI driver the Property Node is always getting out the Error Code 7.

Question is why they behave different with respect to Property Node when used with LabVIEW 7.1 wrappers? Btw the failing VI from Agilent LabVIEW 7.1 wrappers works fine in labVIEW 8.0 and 8.6. That means this problem is confined only the LabVIEW 7.1 version.

 

I posted the same question on the LabVIEW board and no one picked their interest in it there so I decided to post it here. As this issue is also related to IVI, VISA drivers it is possible the someone from this group to get a hint about this anoying behaviour.

 

I attached the screen shots of PNG files that show the difference of VISA Property Node different behaviour between these two drivers.

 

 

AttachmentScreenTestShots.zip (152 kb)

 

Thanks

 

 

Sorin

0 Kudos
Message 1 of 11
(4,970 Views)

Hi Sorin,

That’s strange, I tried recreating your error and I didn’t get any errors in LabVIEW 7.1.  Have you tried this on other computers? Are you getting an error doing something else that you are trying to demonstrate?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(4,938 Views)

Hi

 

I tried on other computer that has only labVIEW 7.1 installed and had the same error. That means is something related to my LabVIEW 7.1 or NI VISA version and/or configuration that could trigger this kind of error?

Strange that this error show only on Agilent driver and not on Rodhe-Schwarz driver?

 

As I have .fp, .h, .c and .sub source files of these two drivers I think of building a LabWIndows ActiveX DLL in Debug mode from those source file then trying to get inside the source in LabWindows when this error happens on Agilent driver.

 

Maybe I could catch the real issue there when calling a property node? Do I have other options beside this one?

 

 

 

Thanks

 

Sorin

 

Sorin

0 Kudos
Message 3 of 11
(4,915 Views)

Hi,

 

Can you please specify the version of VISA you have?  Do you have both NI-VISA and Agilent VISA? With some systems there seems to be issues when both are on the same system.

0 Kudos
Message 4 of 11
(4,891 Views)

Hi

 

I know that at some point I had on my PC both VISA from NI and Agilent but later I removed Agilent from Control Panel and kept NI. There is a place where I should look to know if the Agilent VISA is still on my PC or not?

I have also VISA-COM that is installed under C:/Program Files/IVI Foundation/VISA/VisaCom/GlobMgr.dll version 3.1.0 and BaseFrmIO.dll version 3.0.0 both from 2007 and installed with IVI Foundation base drivers.

 

For NI VISA I have NI-VISA version 4.4, NI-VISA Runtime 4.4.1 and NI-VISA Server 4.4.

 

 

 

Thanks

 

Sorin

 

 

0 Kudos
Message 5 of 11
(4,883 Views)

Hi,

 

You can try checking the Description on visa32.dll as documented in this KB

0 Kudos
Message 6 of 11
(4,859 Views)

Hi

 

I did check visa32.dll under Windows/System32 and is NI-Visa 4.4.0.49152 version.

 

Thanks

 

Sorin

0 Kudos
Message 7 of 11
(4,854 Views)

Hi

 

My next step in this Agilent IVI driver issue with LabVIEW 7.1 was to create a debug DLL from Agilent source file ag81150ni.c, ag81150ni.h, ag81150ni.sub and ag81150ni.h installed under C:/Program Files/IVI Foundation/* standard folders after I installed ag81150ni driver on my PC.

 

In LabWindows CVI 9.0 I created a new project with a target of DLL in debug mode, exported the .h file with all the exported driver functions and then build a ag81150ni_dbg.dll library in debug mode.

 

After this DLL has been created and installed in the right standard path I opened LabVIEW 7.1 and from Tools->Instrumentation->Import CVI Instrument Driver and selected my ag81150ni_dbg.dll as input. The LabVIEW 7.1 import tool created for me all the LabVIEW wrappers under LabVIEW 7.1 inside the instr.lib folder

 

 

From LabWindows CVI I chosed LabVIEW 7.1 as executable for my debug DLL and inside the ag81150ni.c source file I set breakpoints inside the Initialize With Options function and then in GetAttributeViString that gets called any time there is a property node calling for an attribute string inside the driver.

 

Inside labVIEW 7.1 I build a small testing VI with Initialize With Options VI one Property Node to read a string and the Close VI and put my option in simulation=1.

 

Then I started to run in Debug mode from LabWindows CVI ... perfect hit my breakpoints in Initialize With Options then went to read the string property inside ag81150ni_GetAttributeViString where there is a Read Callback then calling the Ivi_GetAttributeViString defined inside C:/Program Files/National Instrumnets/Shared/CVI/Include/Ivi.h file and it may read the property string with no error getting out fine and then my Agilent debug version run without any error.

 

Later I tried to replace the debug version of my Agilent dll with the original Agilent dll and the error disappeared....

 

Last but not least I uninstalled the ag81150ni driver from my PC and then reinstall again the same driver.

 

Now any test with a Property Node inside is afiling again with the famous error 7.

 

The conclusion is that after running the same driver build with labWindows CVI version 9.0 the Property Node error is not present but installing the same driver from NI site would lead to Property Node error 7.

 

I hope this shed some light on this elusive error

 

Thanks

 

 

Sorin

 

 

 

0 Kudos
Message 8 of 11
(4,838 Views)

Hi everybody

  

 

I want to see if the LabVIEW wrappers build for labVIEW 7.1 are working for one of my custom IVI drivers.

 

The driver must be run in simulation mode only.

 

The LV wrappers folder must be copied under intr.lib folder inside LV 7.1 folder. The LV wrappers for LV 7.1 are attached with this email.

After copying the LV wrappers folder restart LV 7.1 for Instrument Driver Palette to update.

The driver name is jdMAP200_VOA and could be installed from the .msi file attached to this email.

  

 

1. Install the jdMAP200_VOA IVI driver

2. Copy LV wrappers for LV 7.1 under instr.lib in LV 7.1 folder

 

 

Open a blank VI, go to Instrument Driver Palette and take <Init With Options.vi> and <Close.vi> from jdMAP200_VOA instrument and add them to block diagram.

 

1. Create input controls for Resource Name and Option String terminals in <Init With Options.vi>. For Id Query and Reset Device terminals create constants with False value. Add the standard input error control.

 

Fill the Resource Name control with "GPIB0::13::INST2::INSTR" and Option Strings control with "simulate=1"

 

 

2. Select a <Property Node>  from All Functions->Application Control->Property Node and add it on the VI block diagram. Connect the instrument handle coming out from <Init With Options.vi> into <Property Node> input reference and the error out into the error in terminals.

 

3. Connect the reference out terminal from <Property Node> to reference in terminal of the <Close.vi> and connect also the error out terminal to error in terminal

 

4. Create an indicator for <Close.vi> error out terminal and connect them together.

 

 

Please make sure that the Resource Name is always "GPIB0::13::INST2::INSTR" and Options String is "simulate=1"

 

Run this simple VI and let me know if you get the Error 7 coming out from <Property Node>

 

 

The two zipped attachments contain the jdMAP200_VOA installation package and the LV 7.1 wrappers folder. 

 

Thanks

 

 

Sorin

 

 

Download All
0 Kudos
Message 9 of 11
(4,753 Views)

Hi Sorin,

Unfortunately I can’t run installers, exes etc. on our work machines. As I mentioned I could not reproduce this error with my verision of LabVIEW. Can you double check if you have LabVIEW 7.1 or LabVIEW 7.1.1 installed (it will show up in the lower right hand corner of the splash screen as LabVIEW loads.)

Matt
Applications Engineer
National Instruments
0 Kudos
Message 10 of 11
(4,713 Views)