Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

agilent 54622

The whole VI seems to reasonably work if there is no Write Instrument.vi used.
As soon as I include the Write Instrument.vi and give it any command string, the Read Delay & Measurement.vi at the end stops working.
It times out after 5secs. I increased its timeout to 10s to no effect.
Also when the Write Instrument.vi with ':MEAS:_DEL CHAN1, CHAN2' is ran ( without the underscore), the scope reverts back to measuring on the rising edge of CHAN1 even though the previous Write Instrument.vi configured it for falling slope. If i place a ? after the DEL in the command the scope configures correctly.

If I set up the scope manually and use both configure and read delay  & phase vi's, a result is returned.
Worringly though the returned value when compared to the value on the scope is always a few milliseconds out for some reason. For example the scope reads 40ms but returns 38.5ms. I dont know why this is.

If I use the write insrument.vi and configure each step, the scope configures correctly ( falling edge chan1, rising edge chan2), but it never returns a result.  I tried the Read Instrument.vi command but there are no bytes in the buffer to return, A timeout occurs on this vi also.

I'm not sure where to go with this from here but this function would be really useful to have if it could be got to work.
Here is my current VI with the write instrument.vi function included.





0 Kudos
Message 11 of 13
(1,134 Views)
Hi Mike,
 
This last VI you posted would work but not exactly the way you expect it to.
 
You are using 1 as the byte count to read however the instrument will return the results formatted as a string instead of an actual decimal number. Therefore each number will occupy one byte.  I would recommend using a large number like 1000 for the byte count since reading will be terminated when you reach the termination character anyways.
 
I don't see the Read Phase & Delay Measurement VI in this last VI you included.  However one thing that I can tell you is that when you include a "?" the command becomes a query for the specified measurement rather than an attempt to configure.  Therefore when you pass 'MEAS:_DEL? CHAN1,CHAN2' you are actually telling the instrument to measure and return the value without doing the configuration part.  When you use the '?' calling Read Phase & Delay Measurement VI would cause problems because that VI inherently is passing the same command according to the channel choices you made before reading and that probably would cause the scope to act out as well.
 
As it turns out, agilent has a separate, installable help file for this scope family and I would recommend installing that and referring to the commands in that file.  Here is an important note that I came across:
 
The :MEASure:_DELay command and the front-panel delay measurement differ from the :MEASure:_DELay? query. The delay command or front-panel measurement run the delay measurement in auto-edge select mode. In this mode, the user may select the edge polarity, but the instrument will select the edges to use to make the best possible delay measurement. The source1 edge chosen will be the edge that meets the polarity specified and is closest to the trigger reference point. The source2 edge selected will be that edge of the specified polarity that gives the first of the following criteria:
The smallest positive delay value that is less than source1 period. The smallest negative delay that is less than source1 period The smallest absolute value of delay.
The :MEASure:_DELay? query will make the measurement using the edges specified by the :MEASure:_DEFine command.
 
This file can be downloaded here.


Message Edited by BerkO on 04-10-2008 08:14 AM
Regards,
Berk
Instrument Drivers / IVI
Message 12 of 13
(1,126 Views)
Thanks Berk,

I think this VI will do me, ( see attached ).
I moved the slope configuration to after the channel configuration and now it works ok.

Thanks for clearing up the ? aspect of the command.
As you noticed I have not included the Configure Delay & Phase.vi and Measure Delay and Phase.vi in my program at all.
The Measure Delay & Phase vi changes the scope setting on Chan 1 back to rising edge when I had already set it to falling edge previously with the Write Instrument.vi command. I think this may be a bug in the driver.

By using only Write Instrument.vi and Read Instrument.vi, better results were found.

I think I should be ok from here. Thanks again !!Smiley Happy



0 Kudos
Message 13 of 13
(1,118 Views)