LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Time Base Parameters of Lecroy Wave Runner Scope

Solved!
Go to solution

Hi,
I'm trying to control Lecroy WaveRunner 620Zi oscilloscope by -National Instr. CVI Samples- IviScope Class driver.
I want to set sample rate and sample number of the scope,
but due to that Scope is in "Set Max Memory" mode under "Real Time Memory" mode in default settings, I can set sample rate indirectly by
setting acquisiton time and sample number. I use the configuration function -IviScope_ConfigureAcquisitionRecord- of this driver For this operation.

I take sample rate and sample number from user and calculating acquisiton time, then setting the acquisiton time and
sample number of the scope.in this case, when I set the scope to an invalid time values (2.5 ms, 250 us etc.) scope adapts it to an valid ones
defined in "Set Max Memory" mode.
(2.0 ms, 200 us) .

For instance, I get 1GS/s sample rate and
2.5 MS sample number from user (namely  acquisiton time is 2.5 ms), but scope is being set to 2.0 ms automatically. My program checks the values entered by
user and setted by scope in order For ensuring that no conflict occurs.

However, I have problems in setting 10GS/s and 2.5 MS (250 us acquisiton time)
sample number (only in 10 GS/s sample rates, not 1Gs/s or 100 MS/s ).
Here, scope sets itself to 2 Ms sample no and 10GS/s as expected, but at the same time I get non-fatal runtime error in CVI:
invalid value (%1), For method (%2) parameter (%3).

Also I get "IO timeout error: %1" then I set the acqisition time to value greater than 1 second in the IviScope_ReadWaveform function of the
instrument driver mentioned. Eventhough I set 'Max Time' paramater of this function -time that is given to the scope in order For completing the acquisiton- to infinite , I get same
error.

I couldn't figure out the main reason For these problems, maybe due to instrument driver?

any help For this,
thanks.

0 Kudos
Message 1 of 6
(8,424 Views)
Solution
Accepted by sahin

Hello Sahin,

 

In order to set the sample rate (as you pointed out) the scope has to be in Fixed Sample Rate mode and not Set Maximum Memory.

 

You can use the IVI write function to send:

 

VBS 'app.Acquisition.Horizontal.Maximize = "MODE"'

 

Don't forget the single quote at the end and MODE can be either:

 

FixedSampleRate or  SetMaximumMemory

 

The timeout error you are getting may be from the driver.  I do not know how to set the timeout for the connection in an IVI driver but I think this is what you are getting.

When you read data from the scope, the timer starts and if there is no data detected in the buffer, the connection times out. (this is not the scope timing out, it is the port setting).

 

Look at the scope and see if it says there is an error.  I expect the scope says something like "waiting for trigger..." or "Slow Acquisition.." or "Processing..."

 

You can poll the INR register of the scope to see if it is done acuiring and processing the current acquisition before trying to read back the data.

 

The command is INR? and the result will be a 1.

 

Here is a link to the remote control manual for the LeCroy scopes:  http://www.lecroy.com/files/manuals/WM-RCM-E_Rev_D.pdf

 

The INR? command is covered on page 158.

 

Cheers,

 

Leonard Brown

LeCroy Applications Engineer

0 Kudos
Message 2 of 6
(8,417 Views)

thanks a lot for your helps,

checking the first bit of internal change register of the scope in a while loop until it's being set to '1' did work and

I overcome the IO timeout problem.

However, the problem I mentioned that setting the sample number and acquisiton time as parameters of the driver's related function continues:

Program's errors are inconsistent  for same entries at different trials.

I think it's also about the asynchronisation between the program and the scope.

I searcehd for low-level code for setting sample number and timePerrecord (or time/Div), but I couldn' t find in the Manual you sent?

or any other method for this setting?

 

Regards

0 Kudos
Message 3 of 6
(8,407 Views)

Hi,

 

The command to change from Max memory to Sample rate should have worked for your scope.

 

If it complains about the value you are trying to set it to, you can also use a numeric value. (the data type is an enum).

 

0:SetMaximumMemory

1:FixedSampleRate

 

VBS 'app.Acquisition.Horizontal.Maximize = "FixedSampleRate"'

or

VBS 'app.Acquisition.Horizontal.Maximize = 1'

 

should work.

 

You can also query the current setting, change it manually, and query it again to see if the syntax is different than what I am using, (although all of our scopes are the same so I don't expect this to be the issue).

 

VBS? 'return = app.Acquisition.Horizontal.Maximize'

 

Sorry, I should have sent all of these links the first time:

 

 

Here is a link to our Remote Control Manual:

http://www.lecroy.com/files/manuals/WM-RCM-E_Rev_D.pdf

Here is one to our Automation Manual:

http://www.lecroy.com/files/manuals/Entire_X-Stream_Automation_Manual.pdf

And finally, here is one for the Automation Command Reference Manual:

http://www.lecroy.com/files/manuals/Automation_Command_Ref_Manual_WR.pdf

The Remote Control Manual will have the IEEE 488 commands.

 

The Automation Manual will introduce you to the XStream Browser (an application on the scope) and the Automation Commands. (The automation commands can be used when there is no equivalent remote command).

The Reference Manual will cover all of the Automation Commands.

 

When you send an automation command in the 488 format, it has to be sent with the VBS command (covered in the remote control manual on page 71 and in more detail on page 248).

It is also covered in the Automation Manual on page 1-28 (This actually shows the syntax to use)

 

Cheers,

Leonard Brown

LeCroy Applications Engineer

0 Kudos
Message 4 of 6
(8,397 Views)

thanks again

 

0 Kudos
Message 5 of 6
(8,387 Views)

Hi, I can set the mode to fixed sample rate. But how do I set to a sampling rate for example 1mhz? What is the command in VBS ?

0 Kudos
Message 6 of 6
(264 Views)