Thread: [N7788B] Loading waveplates configurations with LabVIEW


Permlink Replies: 5 - Pages: 1 - Last Post: Mar 1, 2012 2:09 AM Last Post By: skieck Threads: [ Previous | Next ]
vhenry

Posts: 7
Registered: 11/14/11
[N7788B] Loading waveplates configurations with LabVIEW
Posted: Feb 21, 2012 5:58 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I'm currently programming the N7788B using the LabVIEW drivers (although I know there are discontinued) and i want to make a simple loop in which a new sequence of waveplates configurations is loaded and SOP are measured. In order to do so, I first initialize the polarization controller in sequence mode, with the polarimeter clock as timebase and the polarimeter as trigger (oneshot sequence). Then, my loop consists essentially in two VIs : MIP_PolConSeqWaveplateSet, which gets a new array of waveplates configurations at each iteration, and MIP_PolarimeterMeasStartGet to retrieve the SOPs.

With this configuration, I observe I'm able to load and mesure correctly only the first sequence which is sent. Then, I measure again the same sequence as the first iteration, although when I'm debbugging and looking in the MIP_PolConSeqWaveplateSet, it seems to take the right sequence into account. In order to make it work, I have to add the VI MIP_PolConSetMode and reset again the sequence mode at each iteration. But in this case, it is quite slow and it annoys me...

Am I doing the things right or it exists a more satisfactory solution which don't need to reset the mode each time a new configuration is loaded ?

Regards.
skieck

Posts: 3
Registered: 02/22/12
Re: [N7788B] Loading waveplates configurations with LabVIEW
Posted: Feb 22, 2012 10:34 AM   in response to: vhenry in response to: vhenry
Click to report abuse...   Click to reply to this thread Reply
Hi,

before looking into this, I'd like to know some more details:

- how many entries does your sequence comprise (i.e. lines of five waveplate settings each)?
- how long does it take to reset/restart the sequence (just roughly)?
- do you call MIP_PolConSetMode twice, i.e. once to stop, then again to restart the sequence?

Best regards,
Sven
vhenry

Posts: 7
Registered: 11/14/11
Re: [N7788B] Loading waveplates configurations with LabVIEW
Posted: Feb 23, 2012 12:57 AM   in response to: vhenry in response to: vhenry
Click to report abuse...   Click to reply to this thread Reply
"
Hi,

before looking into this, I'd like to know some more details:

- how many entries does your sequence comprise (i.e. lines of five waveplate settings each)?
- how long does it take to reset/restart the sequence (just roughly)?
- do you call MIP_PolConSetMode twice, i.e. once to stop, then again to restart the sequence?

Best regards,
Sven
"

Hi,

So far i've used sequences whose the length is about ten. Concerning the "reset", i'd say it takes something like half a second. By reset, I mean the call of MIP_PolConSetMode with the argument "sequence" after the previous sequence has been processed (oneshot) but without having stopped it by calling the same VI with the argument "off".

Thanks.
skieck

Posts: 3
Registered: 02/22/12
Re: [N7788B] Loading waveplates configurations with LabVIEW
Posted: Feb 23, 2012 3:07 AM   in response to: vhenry in response to: vhenry
Click to report abuse...   Click to reply to this thread Reply
Hi,

when uploading a new sequence, the instrument firmware is processing the sequence data to improve transient behavior of the polarization controller. This takes some time and can be disabled, which should significantly speed up your application.

To do so you should use the MIP_CommonVariableGet and MIP_CommonVariable set Vis to modify the config flags.
The relevant variable is tree 4, Index 0 (default), VarNo 10.

To disable/enable the drift compensation processing, set bit 6 to 0/1.

In my test, the variable was 123 initially and I changed it to 59 (subtracted 64 /set 6th bit to 0). Then it was very fast. Setting 123 again, made the sequence update rate significantly slower.

For a quick test, you can also change the corresponding value from PolarizationNavigator (instrument properties -> variables tab -> Tree 4:PolController -> Config).

Best regards,
Sven
vhenry

Posts: 7
Registered: 11/14/11
Re: [N7788B] Loading waveplates configurations with LabVIEW
Posted: Feb 24, 2012 5:41 AM   in response to: vhenry in response to: vhenry
Click to report abuse...   Click to reply to this thread Reply
Hi,

Thanks for your reply. I tried it and it effectively boosted considerably the speed. However, it didn’t really solve the issue I encounter. Previously, I could see in each iteration of the loop that the measured SOPs were different, that made me think a new sequence was loaded as expected. Now, identical SOPs are measured during some dozens of iterations before changing, that gives the impression the loop iterates too quickly and don’t let the polarization controller the time to process the new sequence.

Moreover, I’ve investigated deeply my set-up and discovered some weird effects. For instance, if I load a sequence and then make immediately two consecutive measurements, the second one is different from the first. Then, new measurements stay identical with the second. I can observe it even when debugging and by waiting several seconds between the initialization of the sequence, the first measurement and the second.

Actually, I wonder if I really understand how the sequence mode works. Initially, for me, if the time base and the trigger are the polarimeter it should have worked like:

- Set the mode as “sequence” (oneshot)
- Send a sequence
- Measure (here the sequence is played in synchronization with the polarimeter and regarding the prescaler)
- Send a sequence
- Measure …

In practice, I always measure the same SOPs (but different at each new execution), so I changed for:

- Set the mode as “sequence” (oneshot)
- Send a sequence
- Measure
- Set the mode as “sequence” (oneshot)
- Send a sequence
- Measure …

This time it seemed ok but it appeared that if I do:

- Set the mode as “sequence” (oneshot)
- Send a sequence
- Measure 1
- Measure 2
- Measure 3
- Set the mode as “sequence” (oneshot)
- Send a sequence
- Measure 1
- Measure 2
- Measure 3…

Measure 2 and 3 are the same, but different from measure 1. Each step gives different results though.
With your trick the steps are quicker, but there are bunch of steps which are identical…

Could it be a timing problem? I tried different repetition rates from 1 to 20 Khz, with no prescaling (I thus assume here every state is only measured once) and nothing changed.

Regards.
skieck

Posts: 3
Registered: 02/22/12
Re: [N7788B] Loading waveplates configurations with LabVIEW
Posted: Mar 1, 2012 2:09 AM   in response to: vhenry in response to: vhenry
Click to report abuse...   Click to reply to this thread Reply
Hi again,

ok, here are some more thoughts on this issue:

- It is important to set the number of samples for the polarimeter to the same value as the sequence length, but I assume you did that already.

- it is important not to have any other application accessing the instrument simultaneously. When I ran the PolNav in parallel to the VI, there were distortions somewhat similar to what you describe, i.e. it seems like sometimes the sequence did not get updated.

- With this in mind, I can also imagine that communication problems could cause a similar behavior. Is your instrument connected to GPIB or USB?

- When you say the first pattern always looks different, does that mean it's completely different or could it be basically the desired pattern, just with imperfections? The polcontroller switching steps depend on the recent history, i.e. previous steps. Usually preprocessing is done by the instrument firmware when uploading a sequence to compensate for this effect. But this takes time, which is the reason why I suggested to disable this option earlier. So right after switching to a new sequence, the initial pattern will depend on the previous pattern, while for subsequent pattern repetitions, the conditions are always the same. I think that's what you observing.

- I saw some improvement, when I stopped the polcontroller sequence before uploading a new one. You can try if it improves things for you.

However, I don't think it 's possible to get ideally shaped patterns right in the first run at the upload rates you're targeting at, i.e. without letting the firmware do the compensation.

How do you generate the polcontroller sequences?

If you like you can send me your email address in a pm, so we may also exchange some screenshots or program examples, if required.

Best regards,
Sven

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