Currently, I'm trying to work out a labview program that sweep a wavelength range and log the wavelength and corresponding power value and save it to a file. The issue is that the file i get from the log is filled with data that have nothing to do with the actual scan. i use a 8163b mainframe with a 891940a laser module and a81634b power meter (firmware mainframe rev: 5.04) (laser rev: 4.84) (power meter rev: 4.01) )I attached a few pictures of the labview program that i use, the laser seems to run ok (wavelength range and power are fine) If somebody could give me an idea on what i am doing wrong, it would be really apreciated.
The hp816x PnP driver that you are using has high-level functions for doing swept-loss measurements using an Agilent tunable laser and power meter(s). These are the "Lambda Scan" and "Multi-Frame Lambda Scan" functions. See the hp816x help file under "Application Functions". Even if you are not using multiple mainframes (for more power meters), the Multi-Frame Lambda Scan gives you more parameter choices than the Lambda Scan functions. So you'll probably want to use that. Samples for LabView are installed with the hp816x driver. Sample5.llb is an example for Multi-Frame Lambda Scan. Since that program was written, later versions of LabView do not work correctly with a LabView function "Type Cast" that is used in the Initialize.vi in that example. I've attached a modified version of Sample5 where that is removed. The program no longer searches for and "registers" additional mainframes, but that will not be a problem if you are just using the single 8163B mainframe with the 81940A tunable laser and 81634B power sensor module.
Another solution is to use our new turn-key software, the N7700A. This will run the measurement for you. The basic swept-wavelength part of this software is free. Currently this does not store the data to a spreadsheet, but it is planned to add that capability in the future. You can download this software here, you should give it a try:
The VISA resource string is not at the front panel and set for GPIB 20 which is the default for 816x mainframes. If you are not using GPIB address 20, either change your 8163B to 20 or find the Initialize_mod.vi ("INI") and change the GPIB value in the diagram of that vi.
Multi-Frame Lambda Scan will find which slot you have the laser and power meter installed in. However, an additional function, not actually required, is added in this modified example, "hp816x Set TLS Wavelength.vi", and that does required a value for the Slot. That is set to 1 in the program. Easiest is to put your 81940A in slot 1. If you want to change to Slot 2 in the program it is in the main vi, sequence =2 inner case = True. You will see the pull-down "TLS Slot". This vi was added to make the tunable laser return to the Start wavelength after each measurement run. That makes the next run a little faster after pressing the "Measure" button since the laser has already returned to the Start wavelength.
Some settings are only applicable to the full-size tunable lasers such as the 81600B. For your compact laser, the Optical Output must be set to "High Power". The "LowSSE" (low spontaneous emission) output is only on full-size lasers. A good Laser Power for your 81940A / 81634B setup is + 9dBm (ignore the text above that setting which is applicable for full-size lasers). The maximum power input to the 81634B is + 10dBm and the minimum output power of the 81940A is + 6 dBm. 80nm/s sweep speed is only available on full-size lasers, so do not select that. Normally just leave the Sweep Speed at "Auto Select" and the program will set the fastest sweep speed possible for the Step Size (sample spacing) that you have selected.
That data is only put to the graph, you will need to modify the program to store to a spreadsheet.
In swept-IL measurements it is best to take a reference measurement (no device, patchcord from laser to power meter) and then subtract (in dBm's) that from the device measurement trace. That removes repeatable ripple, wavelength dependence of the sensor and gives a correct absolute power reference. The N7700A software does this, but the LabView example does not, it just shows how to get a trace. You will need to add referencing to the program yourself.
I hope that helps. Post again with any problems or issues.
Thank you for your answer its much apreciated. I have tried Sample5.llb from the driver but it seems that the registers issue is not there but instead i get the following error message "hp816x Prepare Multi Frame Lambda Scan.vi<ERR>Driver Status: (Hex 0xBFFF000E) VI_ERROR_INV_OBJECT_MSG" It seems that i cannot see the vi that you attached, could you try to submit it again? Thanks you for your help on the matter.
I realized after first posting the message that it rejected my attachment because ".llb" extension is not allowed. I have since attached it to the original post as a .zip. Do you see that now? If not please send me an email
Thanks for your answer. I do have some issues with the driver. It seems that the sub VI of the lambda scan are not wired correctly and some vi's interface connection do not actually match the undelaying wireing. This seems very strange do you have any idea why this is happening? I use the 8.5 version of labview. If I try to rewire the vi and change the prepare multiframe lambda scan to the one present in the driver that displays the correct wireing, i get the following error message : The given session or object reference is invalid. Thanks again for your help.