Thread: using trigger with 8163A


Permlink Replies: 16 - Pages: 2 [ 1 2 | Next ] - Last Post: Mar 15, 2012 9:40 AM Last Post By: mkelly Threads: [ Previous | Next ]
fondeurb

Posts: 9
Registered: 08/25/10
using trigger with 8163A
Posted: Aug 25, 2010 11:24 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

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.

thanks a lot for the help!

Bart
mkelly

Posts: 145
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Aug 27, 2010 7:37 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello Bart,

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

Alternatively, the 816x Plug&Play driver makes programming of the logging function very convenient, especially for handling the binary block data results.
http://cp.literature.agilent.com/litweb/pdf/5988-2790EN.pdf
http://www.agilent.com/find/octfirmware

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

I hope this gets you going!

Mike

Edited by: mkelly on Mar 15, 2012 9:37 AM
fondeurb

Posts: 9
Registered: 08/25/10
Re: using trigger with 8163A
Posted: Sep 22, 2010 4:32 PM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Thanks!

I tried to download the plug and play and to run the visual basic sample, but it said "hp816x_32.dll" not found.

Could you please send me the procedure to run it?

thanks,

Bart
fondeurb

Posts: 9
Registered: 08/25/10
Re: using trigger with 8163A
Posted: Sep 24, 2010 7:14 PM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello,

I managed to use the functions you sent me:

-sens1:func:par:logg 22,20ms
-sens1:func:stat logg,star
-sens1:func:res?

and uses ilbr32 to read the array of 22 float.

It worked for n from 1 to 23. For larger size, it returns nothing or wrong data.

I tried to use sens1:func:res:maxb? and it returned 43. I tried then sens1:func:res:block? #0, 23 but did not get any results.

Is there a way to get more points than 23?

Thanks!

Bart
mkelly

Posts: 145
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Sep 27, 2010 10:25 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello Bart,

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?

The latest firmware can be found at this web site.
http://www.agilent.com/find/octfirmware

Best regards,
Mike
fondeurb

Posts: 9
Registered: 08/25/10
Re: using trigger with 8163A
Posted: Sep 28, 2010 10:52 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hi Mike,

Thanks for the support!

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.

thanks,

Bart
John Dorighi

Posts: 35
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Sep 28, 2010 3:29 PM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello Bart,

Thanks for the follow-up; it sounds like you are using VB6.0. I found the attached example using the PNP driver in VB6.0, here are a few more details on how to use the driver in VB6.0.

http://cp.literature.agilent.com/litweb ... 2790EN.pdf

Here is a link to the driver again

http://www.home.agilent.com/agilent/edi ... &id=112417

I have not had a chance to try the example recently as I would need to locate a PC w/ VB6.0 installed. Let us know if this helps and we can determine the next steps.

Regards,

John

Edited by: mkelly on Mar 15, 2012 9:38 AM
fondeurb

Posts: 9
Registered: 08/25/10
Re: using trigger with 8163A
Posted: Sep 29, 2010 10:54 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello,

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 all the help,


Bart
John Dorighi

Posts: 35
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Sep 29, 2010 2:49 PM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello Bart,

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.

sens4:chan1:power:range:auto 0
sens4:chan1:power:range 10dbm
trig4:input sme
sens4:chan1:func:par:logg 2000,0.1ms
sens4:chan1:func:stat logg,star
trig 1
sens4:chan1:func:state?

LOGGING_STABILITY,COMPLETE

sense4:chan1:func:result?
sens4:chan1:func:state logg,stop

A few things to think about.

*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.

Regards,

John
PeterDH

Posts: 4
Registered: 10/20/10
Re: using trigger with 8163A
Posted: Oct 20, 2010 10:40 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
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?

Thanks,
Peter

Edited by: mkelly on Mar 15, 2012 9:39 AM
mkelly

Posts: 145
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Oct 21, 2010 6:19 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
Hello Peter,

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.

Best regards,
Mike
PeterDH

Posts: 4
Registered: 10/20/10
Re: using trigger with 8163A
Posted: Oct 29, 2010 10:54 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
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
mkelly

Posts: 145
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Oct 29, 2010 11:50 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
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.

Mike
PeterDH

Posts: 4
Registered: 10/20/10
Re: using trigger with 8163A
Posted: Nov 3, 2010 3:42 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
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
mkelly

Posts: 145
Registered: 02/06/07
Re: using trigger with 8163A
Posted: Nov 3, 2010 6:04 AM   in response to: fondeurb in response to: fondeurb
Click to report abuse...   Click to reply to this thread Reply
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

1. hp816x_PWM_functionStop(instrHandle, 3, 0)
2. hp816x_standardTriggerConfiguration(instrHandle, 3, 0, 0, 0)
3. hp816x_set_PWM_parameters(instrHandle, 3, 0, 0, 0, 1, 1500.0e-9, 100.0e-3, 10)
4. hp816x_set_TLS_triggerConfiguration(instrHandle, 1, 0, 2)
5. hp816x_set_PWM_triggerConfiguration(instrHandle, 3, 1, 0)
6. hp816x_set_TLS_laserState(instrHandle, 1, VI_TRUE)
7. hp816x_set_TLS_sweep(instrHandle, 1, 2, 0, 1, 50m, 1.55u, 1.555u, 100p, 40e-9)
8. hp816x_set_TLS_lambdaLoggingStateEx(instrHandle, 1, VI_TRUE)
9. hp816x_set_PWM_logging(instrHandle, 3, 0, 50m, Data_Points, Estimated_Timeout)
10. hp816x_TLS_sweepControl(instrHandle, 1, 1)
11. hp816x_TLS_sweepWait(instrHandle, 1)
12. hp816x_get_PWM_loggingResults_Q(instrHandle, 3, 0, VI_FALSE, 0, Logging_Status, Logging_Result)
13. hp816x_get_TLS_wavelengthDataEx_Q(instrHandle, 1, Array_Size, Wavelength_Data)
14. hp816x_set_TLS_laserState(instrHandle, 1, VI_FALSE)
15. hp816x_set_PWM_triggerConfiguration(instrHandle, 3, 0, 0)

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.

Regards,
Mike

Point your RSS reader here for a feed of the latest messages in all forums