Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

agilent 54622

Hi,

I am trying to read back a result from a Agilent 54622 scope over GPIB with LAbview 7.1.

I am switching two signals to chan 1 and chan 2 of the scope and I need to read back the time from CH1 going low to CH2 going high.

For this I am using the read delay and phase VI in the ag5462x library. (I also have Agilent 546xx Scope library but this measurement function is not included for some reason ).

My problem is that the scope displays "Paramater Not Allowed" message on the screen when the configure delay and phase vi is executed, but there is no indication why the vi is not configuring the scope. The VI continues until it reaches the read delay and phase vi where it waits for ages.

I have attached my vi.

Thanks !
0 Kudos
Message 1 of 13
(4,281 Views)
Just another note.

The ag5462x Configure delay and phase vi returns error code -1074130544, session handle not valid.
Is there a vi which has to be executed before this ?
0 Kudos
Message 2 of 13
(4,275 Views)
Hi Mike,
 
That error means that your resource isn't properly configured.  Please try and communicate with your instrument in MAX first.
 
I can actually see that the Initialize VI you are using that came with the driver doesn't have the correct connector pane.  I don't know if you fixed it already but the VISA Resource in terminal wasn't connected.
 
Try initializing using "Initialize with Options" Vi using the default option string.
 
You can also manually wire the connector pane to the VISA resource control on the front panel of Initialize if you haven't done so already.
 
Let us know if it works after that.
Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 3 of 13
(4,268 Views)
Hi BerkO.

Thanks for the reply.
I have changed the vi to use the initialise with options instead as you suggest.
However the Configure phase and Delay vi now returns an error of -1074135039, instrument error detected.

In max I can query the scope and it returns its name and model number no problem.

I have also been able to take other measurements without any trouble but this delay measurement seems to be more difficult.
Perhaps there is some other setting up to be completed first ?

Thanks
0 Kudos
Message 4 of 13
(4,263 Views)

I unfortunately don't have the instrument and can't reproduce the problem directly.  The VI description mentions that you need to call Configure Reference Levels VI and set the proper reference levels before trying to read.  Please try to do that before the read and let's see if that helps.

Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 5 of 13
(4,261 Views)
I have modified the vi to include the reference levels using ag5462x Configure Reference Levels.vi, and have set them to 10,50,90 as default.
The ag5462x Configure Delay & Phase.vi still returns an error of instrument error detected ( BFFA001 ), with Paramater Not Allowed on the scope screen.  I have also tried a second scope which returns the same error.

If I change the initialise with options.vi string input to not read back the instrument status then the vi runs until a measurement is started where it times out eventually.

There must be some additional configuration required for this scope.

I have attached the vi.


Thanks !!



0 Kudos
Message 6 of 13
(4,238 Views)

Hi Mike,

We have looked into the driver directly and it seems like there might be a bug in the code where the configuration function is also querying with wrong parameters instead of setting.

As a quick fix for now please use "Write Instrument Data" vi instead of the "Configure Delay & Phase" VI and type ":MEAS:_DEF DEL,-1,+1" (without the double quotes and the underscore) in the Write Buffer control. I placed an underscore because the forum is converting : and D to a smiley... We are planning to fix the issue however since we don't have the instrument we need some way of confirming that this works.

We derived this command from the constants you were using in the VI that you posted.  In a nutshell, "-" means negative slope, "+" means positive slope, and "1" is the occurrence.

Please let us know if it works for you so that we can fix the issue and update the driver on the web with the correct command.

For more information on the command that you are passing through the "Write Instrument Data", you can look at the programmers manual here (page 8-8).



Message Edited by BerkO on 04-09-2008 09:51 AM
Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 7 of 13
(4,220 Views)
Hi Berk,

I managed to get it working just now with a bit of help. The attached Read_Scope_Delay.vi shows.
The Configure Delay and Phase.vi does not error once the initialise with options.vi has an empty string but it does when a config string is used.
I'm not sure why this did not work yesterday when I tried it . Smiley Mad

I tried your suggestion also.
The write instrument data vi executes correctly with no errors but the final Read Delay and Phase measurement.vi times out even after the signal has appeared on the scope. But along with timing out it reports a measurement also. I have tried this with an empty string and the config string on the initialise with options vi, same result.

I have attached both vi's
I can do more measurements if you need me to so that the driver can be updated,

Thanks !


Download All
0 Kudos
Message 8 of 13
(4,211 Views)
Hi Berk

It seems that the write instrument vi with the string you specified tells the scope to set up for a delay measurement with a falling edge and a rising edge on the same channel.
How do you specify a falling edge on channel 1 to a rising edge on channel 2 with this command?
 
If I set up the scope manually with the correct measurement configuration and then run the full vi, a correct result is received.
If however I auto setup the scope or change the settings to a different measurement, the vi returns incorrect measurement.


0 Kudos
Message 9 of 13
(4,202 Views)

Hi Mike,

That command doesn't state which channels should be used as the source for the rising or the falling edges specifies. It simply tells the instrument what kind of edges that the scope should use to start and finish the delay measurement.

The command that tells which channels to use is in the Read Delay & Phase Measurement VI and it looks correct to me.  If you are passing CH1 for the first source and CH2 for the second source the measured delay should be the delay between a falling edge on CH1 and a rising edge on CH2.

The specific command to set the sources can be found on page 8-8 of the programming manual that I linked in my previous message and in your case it should be: "MEAS:_DEL CHAN1,CHAN2".  I drilled down into the code and it seems like the driver is properly building this command.

One thing that I can suggest is to use the "Write Instrument Data" VI again and pass the above mentioned command manually after you specify the edges and before you read the measurement.

Also for the timeout issue you mentioned in the previous message, please try to increase the maximum time value in the Read VI and see if that helps at all.



Message Edited by BerkO on 04-09-2008 01:48 PM
Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 10 of 13
(4,194 Views)