From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in acquiring the data from the Agilent 86142B OSA and controlling Newport Modular Controller Model 8008 laser diodes

Hi.
 
I am a university student in HK and have problems in doing a photonics project where I need to download the data from the Agilent 86142B OSA to the computer via the GPIB cable. 
 
I have downloaded the instrument driver from NI website. The instrument can be detected in MAX when I do a scan for instruments and I can communicate with it in MAX. I can use other library VI of the driver to change the centre wavelength and span. But when I run the library VI, ag8614x Download Trace.Vi, error occurrs.
 
The message shows "An exception occurred within the external code called by a Call Library Node. This might have corrupted Labview's memory. ... VI"ag8614x Download Trace.Vi" was stopped at Call Library Function Node 0x6E0 of subVI" ag8614x Download Trace.Vi".
 
Does anyone know what happens? Thank you very much. Or can I just use the Instrument I/O Assistant to do it as I just need to download the data from the OSA.
 
Another thing I need to do is to control the current and temperature of the Newport Modular Controller Model 8008 laser diodes. I have also downloaded the instrument driver from NI website. But I dont' know how to start with.
 
I am using Labview 7.0 (Student Edition), Windows XP.

I am a Labview begineer and really don't know how can I solve the problems. I would be grateful if someone can knock up a VI or point me in the correct direction.

Many thanks!!!

Ryan
 
0 Kudos
Message 1 of 30
(5,970 Views)
Hello Ryan,
 
The error with the Agilent driver is that LabVIEW is not finding the dynamic link library  (dll) that the Call Library Function Node is seeking.  The dll it is looking for is the ag8614x_32.dll which is installed in a different directory after installing the driver.  The best thing to do here is to make sure that the VIs and the dll are in the same folder.  To accomplish this:
 
1.  Create a folder ag8614x in the C:\Program Files\National INstruments\Labview 7.0\instr.lib directory. 
2.  Copy the files in the C:\VXIPNP\WinNT\AG8614X\labview directory and paste them in the folder that you created in the previous step
3.  Copy the ag8614x_32.dll file in the C:\VXIPNP\WinNT\Bin directory and paste it in the folder that you created in the first step.
 
By placing these files in that folder in the instr.lib it also adds the VIs in LabVIEW's function pallete under All Functions >> Instrument I/O >> Instrument Drivers.  You will see a ag8614x sub-pallette.  If you still get the same errors it would be best to contract Agilent because the driver is not certified or maintained by National Instruments but by Agilent.
 
Now for the Newport device, you want to place the folder that is contained in the zip file that is downloaded into the C:\Program Files\National Instruments\LabVIEW 7.0\instr.lib directory which will also place a sub-pallete for the Newportr device VIs in LabVIEW.
This driver does no contain examples as the other driver, but there are three steps in creating the application which are:
 
1. Open a VISA session (Initialize)
2. Perform various writes and reads to the instrument
3.  Close the VISA session.
 
I hope thses steps are helpful in creating your LabVIEW application.
 
Daryl E
National Instruments
Applications Engineer
 
 
Message 2 of 30
(5,921 Views)

Hi Daryl

I have followed the step you taught me and put the drivers on the right directories.

However, I am not sure how to use the instrument driver. What I mean is that there are many VIs there, and I would only want to use those VIs which are useful to download the trace from the OSA. Do I need to initialize, configure and close the instrment driver?

This might be easy for all of you but please spare some time to help me! Many thanks!

0 Kudos
Message 3 of 30
(5,893 Views)
At the very least, you have to run the initialize at the very beginning and the close function when you are done. The initialize function will create a VISA reference (the instrument handle output) that you will wire to the instrument handle input of other functions you might use. It is optional to always do a reset or do the instrument query. I haven't used this particular instrument but there are three examples included with the download. I would suggest you start by looking at those. What functions you use besides the one to download trace data will depend on how you are using the instrument. If you need the program to set it up in a certain fashion, then you will have to study the provided functions. One way to do that is to open the VI Tree. Turn on context help and as you move your mouse over each function, you will see a description of each VI. It will help to be be familiar with the instrument's manual.
Message 4 of 30
(5,890 Views)
Hi, Im a university student from canada, and Ive also been using that instrument driver. Unfortunately I dont have much labview experience (I started teaching myself how to use labview two days ago), but some of the stuff I picked up might help. The driver has an extensive help index which becomes a lot more clear once you read the instrument manual and figure out what the functions correspond to. To get a trace there is actually a "Download Traces" vi that lets you do that, i believe the default is to download the one trace (a), just remember (like it says) use the "Get number of trace points" vi first so you can size an array to put the trace into. If you do that you should end up with an array of your trace points.
Jeff


Using Labview 7 Express
0 Kudos
Message 5 of 30
(5,887 Views)
HI.

I have  gone through the three examples included for the drivers, but I noticed they are not related to reading data . I have tried to use the initilaize function, download trace vi and close function to make my VI. I have attached it here.

I found that there was something wrong with the ag8614x Download Trace.Vi.

Errors Message:"An exception occurred within the external code called by a Call Library Node. This might have corrupted Labview's memory. Sace any work to a new location and restart LabView, VI"ag8614x Download Trace.Vi" was stopped at Call Library Function Node 0x6E0 of subVI" ag8614x Download Trace.Vi".

Then, there is a pop-up to the ag8614x Download Trace.Vi block diagram.

Anyone knows how I can solve the problem?  Thanks very much!

Best regards,
Ryan
Download All
0 Kudos
Message 6 of 30
(5,866 Views)

Hello Ryan,

I have modified the error handling of the ag8614x Download Traces.vi (screenshot attached).  If you could adjust the error handling wires in that way to where it passes through the call library function node and take a screen shot of the errors that you are getting.  If you moved the DLL to the same directory as the other VI's in the driver (the instr.lib folder) then this error should not be occuring.

Daryl E
National Instruments
Applications Engineer

Message 7 of 30
(5,843 Views)