I am trying to use a santec tsl-510 sws laser with a 8163A to do a spectral scan of a device. I connected both with gpib, and used a bnc between the santec output to hp input. I can launch a sweep with the santec manually, and let the hp be triggered to take measurements. I have to use the santec has it has a range I need : 1510 to 1640.
My question is how to collect with gpib (using visual basic) all the power recorded by the 8163a after the scan. Could you please send me the GPIB command (FETC?,) to download all the power reading once the sweep is completed. also, what is the difference between complete and single measurements in the trigger menu.
I guess you have an optical power meter module in the 8163A, like maybe the 81636B or 81635A? You will want to use the logging functionality of the power meter, which can record a series of samples to be uploaded after the wavelength sweep.100K samples with the 81636B or 20K with the 81635A. The most important SCPI commands would be:
:SENSe[n][:CHANnelm]:FUNCtion:PARameter:LOGGing to choose the number of points and the averaging time :SENSe[n][:CHANnelm]:FUNCtion:STATe to start and stop the logging function :SENSe[n][:CHANnelm]:FUNCtion:RESult? to return the data
If your laser can give a trigger at each wavelength you want to measure, then you can use the single-measurement (SME) triggering mode. You need to make sure the laser gives the expected number of triggers, as chosen in the logging parameters.
If the laser only gives a trigger at the start of the sweep, then use the CME mode, in which case the logging will run freely with the chosen averaging time interval after the first trigger. But that won't be very well synchronized with the laser wavelength.
When used with the Agilent continuously sweepable lasers like the 81600B Option 160 for 1495-1640nm, the laser will send a trigger with the chosen wavelength step interval without stopping the sweep. At the same time the internal wavelength monitor also logs the exact wavelength at the time of the trigger and this lambda-logging data can then be used for the x-axis of the spectrum.With these lasers, the Plug&Play driver and the N7700A measurement software also provide complete coordination of the two instruments for swept-wavelength measurements. http://www.agilent.com/find/n7700
A couple external items could be limiting the number of points, like the allocated array sizes in the program or the time allowed for the measurement before trying to recall the data. But 43 does seem like a small number from this command. sens1:func:res:maxb? So we should check whether something is very old on the instrument.
What is the 8163A firmware version? What model power meter module is being used? What firmware version does the power meter have?
I updated the drivers to : main frame 8163A = V5.24 Dual Sensor = V4.06
I still have the same problem. I am using:
:SENS1:CHAN1:FUNC:PAR:LOGG nb,20ms nb = number of data :SENS1:CHAN1:FUNC:STAT LOGG,STAR start data logging mode then wait for 10 seconds :SENS1:CHAN1:FUNC:RES? Inquire for data ibrd32(ud, ibuf(0), 4 * nb) where ibuf() is an array of single :SENS1:CHAN1:FUNC:STAT LOGG,STOP stops data logging mode
this works great for nb=1 to 23, although the first and last point are missing.
when I increase nb above 24, it returns garbage instead.
I tried also using the dll from VXI but could not add it as reference in VB6, nor register it.
I am now able to download the data. I used the direct byte reading function, and decoded the byte array into floats. this works for all data size.
I am seeing a few problems though : if the power changes too fast in automode, and I collect 1000 points, the array returns some very large value ~1E+34. Is this normal with the 8163A and should I use a fix range mode to fix this?
I am now trying to use the triggering function while I do a data logging function, using an external Santec TSL-510 laser. I connected the trig output of the Santec to trig input of 8163A. I would like to set the 8163 in data logging mode, launch a sweep of the Santec that triggers 1000 measurements every 10pm, and once the sweep is done, download the data from data logging.
I have a few questions: - the 8163A has two modes : simple measurement and complete measurements. which one should I use? - should I set the 8163A in trigger mode (and which mode?) before or after setting it in data logging mode?
Thanks for the follow-up; I observe similar behavior using the power logging here. In general, we recommend putting the power sensor in manual range mode when using the logging function. Here are the commands you can use to perform the logging and also put the instrument in manual range mode.
You would want to use the SME triggering this will insure that a power measurement is ONLY performed when a trigger is received from the laser.
*Once the instrument is set to manual range mode the dynamic range of the measurment will be limited by the dynamic range of the power sensor. Some power sensors (i.e. 81636B and N7744A) have larger dynamic ranges (~ 55 dB) than the 81635A.
*If at some point more dynamic range is required you can use one of the power sensors above. Agilent also offers a driver which operates with one of the Agilent tunable lasers (i.e. 816xxA/B, 81940A/80A) which performs multiple sweeps and automatically decrements the power range during each sweep. The final data is stiched together and returned to the controlling program as a single array.
Let us know if this helps and we can determine the next steps.
Hi Mike, Bart, I got similar trigger problems with the Agilent TL 8164B, i guess a similar machine than the 8163A. The functionality I want to implement in the script (python) is a lambda logging continuous sweep, using the agilent laser (slot1) and sensor (slot2). But the trigger is not completely doing what i expect. This are the essential commands of my script.
SENS2:CHAN1:FUNC:PAR:LOGG 10,1ms # take 10 data point, averaging time 1ms TRIG2:CHAN1:INP CME # set module on set 2 on CME trigger mode (or do i need SME/SWS?)
SOUR1:WAV:SWE:MODE CONT # continuous mode TRIG1:INP CME # set module on set 1 on CME trigger mode (or do i need SME/SWS?)
SENS2:CHAN1:FUNC:STAT LOGG,STAR # prearm sensor SOUR1:POW:STATE 1 # switch on power of the laser SOUR1:WAV:SWE STAR # prearm laser SENS2:CHAN1:FUNC:STAT? # answer: LOGGING_STABILITY,PROGRESS
TRIG 1 # create trigger for sensor and laser, I expect the sensor starts logging at this point SENS2:CHAN1:FUNC:STAT? # answer: LOGGING_STABILITY,PROGRESS
SENS2:CHAN1:FUNC:RES? # get the results SENS2:CHAN1:FUNC:STAT LOGG,STOP SOUR1:POW:STATE 0
I do not notice a difference in the sensor's state before or after the trigger, how do i know the sensor started on time? Do i trigger right? Which trigger mode do i need for a single continuous sweep?
I guess you have either the 81940A or 81980A tunable laser for the continuous sweeps? It would be best to trigger the power meter sampling from the laser itself for best synchronization. After the command you use to trigger the sweep start, there will be some delay until the laser has accelerated to the chosen sweep speed and reached the chosen start wavelength where it would give its own trigger.
You can then also best use single measurement triggering so that each measurement point is synchronized with a laser trigger for which a measured wavelength value is then also logged by the laser's internal wavelength monitor.
For this you would use: TRIG2:CHAN1:INP SME
And the laser output trigger is configured for a trigger at each step. TRIG1:OUTP SWST
Probably you do not need to use the external trigger for starting the laser sweep, so you could use: TRIG1:INP IGN In that case the sweep will start when you give the command SOUR1:WAV:SWE STAR
You will also need to configure the mainframe triggering to Loopback, so that the output triggers from the laser are input to the power meter. TRIG:CONF LOOP
You should see on the display that the laser runs its sweep (however it has been set up) and then afterwards the response to SENS2:CHAN1:FUNC:STAT? should be LOGGING_STABILITY,COMPLETE
It is necessary to be sure that the laser sweep uses the same number of points as the power meter is set to log. Also that the power meter averaging time does not exceed the time needed by the laser for each step, depending on the step and speed. Note that step here is only giving the chosen distance between triggers and the laser moves continuously. After the sweep, the lambda logging data can also be read from the laser.
All of this is a rather standard operation that is easier to program using the MFlambda scan function of the 816x Plug&Play driver. I haven't heard how this would be done with python though.
There is also the ready to use software available in the N7700A package. http://www.agilent.com/find/n7700 The IL Engine is free and does measurements like described here.
Hi Mike, your answer was helpful, so thanks for that. But i got stuck again. It seems that the shortest averaging time of the detector is 0.1s, when the continuous sweep is performed. Which is not the case when i use the PACT application of the laser itself (as short as 100us). This is ok, although it is rather slow, but when i want to have a high resolution, let's say 1pm, the sweep speed is too slow = 10pm/s (and the slowest sweep speed is 500pm/s). If i use shorter averaging time, which should be possible to my opinion, then the output is a very high number indicating the sensor has an invalid output.
what i checked after initialization: -> 'check parameters' of the source: answer: 0,OK -> asking for the logging parameters gives the right parameters back
Initialization: different than you explained SOUR1:WAV:SWE:MODE CONT -> set the wavelength range, step, output power SOUR1:WAV:SWE:LLOG 1
TRIG2:CHAN1:INP CME (using SME, the logging is not complete when the laser is ready with the sweep, such that SENS2:CHAN1:FUNC:STAT is never complete) TRIG1:OUTP STF (using SWST, SOUR1:WAV:SWE:CHEC? gives error 375 and sweep does not start) TRIG1:INP IGN TRIG:CONF LOOP
-> start the measurement SENS2:CHAN1:FUNC:STAT LOG,STAR SOUR1:POW:STATE 1 SOUR1:WAV:SWE STAR
Do you have any idea what i do wrong? Thanks a lot, Peter
Hi Peter, Probably we should take a step back and find out what instruments you are using? What laser and power meter modules do you have? It can also be good to make sure that the firmware is reasonably up to date.
Your use of the trigger output mode STF instead of SWST for the laser makes sense and is what I intended. But then the power meter should be able to log with SME if the number of steps and points match in your parameters.
But that assumes your instruments can do this, so we should first confirm that.
Hi Mike, in slot 1 we have a TL module 81980A with firmware V4.57 (43414) and in slot 2 a dual sensor module with firmware V4.01 (1126). I assume these are not up-to-date so how can I update them? Peter
Hi Peter, Thanks for checking. The power meter must be the 81635A? Then both the instrument models and the firmware versions should be ok. Both modules could be updated, but I don't think that is causing your current complication. The 81980A now has version 4.84 and the power meter has 4.06. These and the module update program for updating over the GPIB are available from the page http://www.agilent.com/find/octfirmware
The 81635A should be able to log with averaging time down to 100us. One possible point: the dual power meter is a master/slave configuration, so if you are using only 1 channel it should be the master channel which is the top input. Since you mention high numbers, maybe there is a problem with the signal being too high for the chosen range? For fast logging, you should not use the autorange mode but select a power range before sending the logging parameters. Since the 81980A can supply quite high optical power, you probably need to use the +10 dBm power range and maybe also reduce or attenuate the laser power to below this level. Otherwise are you able to get the correct values when you read the logging results in the binary block format? It may be necessary to adjust to the byte ordering format that is used: least significant byte. If the ordering is reversed you will generally see unusual and erratic values for the logging result. Possibly either the range setting or the byte ordering is related to your difficulty? Also of course the number of points and averaging time should be compatible between the laser settings and power meter settings, but it looks like you're checking that. Getting the real number arrays from the binary block can also be assisted by using the 816x Plug&Play driver mentioned above. A sequence of commands using this driver could be like follows and these commands can also be replaced with SCPI commands: 816x PnP command series for swept wavelength measurement
Comments: 1. this is mostly to help program development, in case the PWM logging function is not finished. 2. this sets the mainframe trigger to “loopback” so the TLS step triggers are routed to the PWM 3. this sets up the PWM, the range and wavelength need to set here 4. this sets the TLS to output triggers after each wavelength step 5. this sets the PWM to use triggers for individual measurements 6. this turns the laser on 7. this sets up a sweep for a TLS in any slot (in this case #1) 8. This activates TLS lambda-logging. The “Ex” form is needed to use slot # >0 9. this activates the PWM logging function with the chosen averaging time, measurements wait for the triggers 10. this starts the TLS sweep 11. this waits for the end of sweep 12. this gets the results from the PWM 13. this gets the wavelength data from the TLS 14. this turns off laser 15. this sets PWM triggering back to default
Most of these details can be handled even simpler by using the MFlambdascan routine in the same driver.
You could also try using the IL measurement application in the N7700A software, at least to confirm that the hardware is working ok. Both the driver and the IL application can be found from this site: http://www.agilent.com/find/n7700
I hope one or more of these points help to move forward, otherwise let me know again.