DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Basic Script in CVI 9.0

Solved!
Go to solution

Hi

I'm trying to control a Lecroy oscilloscope with GPIB commands in CVI, and also I have

Automation Manual describing the controlling commands written as VBScript.

I want to use some of these commands, but I cannot call them in CVI.

Thanks

0 Kudos
Message 1 of 10
(5,600 Views)
Solution
Accepted by topic author sahin

Hello,

 

You will need the Remote Control Manual for your scope as well.

 

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 (GPIB) 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
1-800-553-2769

0 Kudos
Message 2 of 10
(5,598 Views)

Hi Leonard,

thanks a lot for your response (in fact for same reponse about my another queation I've posted before).

the reason for recurrence of this situaiton that I've asked same problem is that I overlooked  one sentence

in your response, descibing what I'm exactly looking for.

0 Kudos
Message 3 of 10
(5,581 Views)

Hi again,

I can use automation command in CVI, but I cannot figure out how to use commands

including double quotation marks. Namely, I write the command betwen two quotations("...") marks

in viWrite function, but if comand includes "..", CVI gives out error. What should I use insted of quotation marks

within the command?

 

0 Kudos
Message 4 of 10
(5,571 Views)

Hi again Mr. Brown,

I'm sorry for my last question, smalltime to ask it in forum, I have learnt how to use quotation marks in a string.

Anyway, now I'm at the same point about setting the samplingrate of the scope.

Automation Manual says nothing about setting the sample rate directly. I mean the code

VBS 'app.Acquisition.Horizontal.SamplingRate = 2000000' isn't valid fo scope.(So and so, it didn't work)

It's in the query form SamplingRate = VBS 'app.Acquisition.Horizontal.SamplingRate'

and this doesn't do a work.

Eventually, is it the only (and indirect) way of setting the sapmle rate from Sample number and horizontal scale (time/div)?

 

Regards.

0 Kudos
Message 5 of 10
(5,565 Views)

Hello Sahin,

 

The command (although I see both in the XStream Browser) to set the rate will be:

 

VBS 'app.acquisition.horizontal.samplerate = X'  (where X is the rate you want).

 

I see that I can query this as well as using "SamplingRate" but I can ony set the value with "SampleRate".

 

Cheers,

Leonard Brown

LeCroy Applications Engineer

0 Kudos
Message 6 of 10
(5,498 Views)

Hi Leonard,

thenk you very much. this is what I'm seeking after for weeks.

No problem setting sample rate of the scope directly.

0 Kudos
Message 7 of 10
(5,479 Views)

Hi Mr. brown after months,

I need trouble shooting again about remote controlling of Lecroy Oscilloscope,

I'm trying to query/set vertical scale of a math function (i.e. F1, that is "filter(C1)" ),

and automation manual describes how to set VerScale of a math function if it is derivative or integral of signal of a channel ,

but tihs code isn't useful in my case, scope gives out error.

 

is there another way to set VerScale of math function in case it's filtering a channel's signal

or VerScale property is only valid for derivative and intrgral operations (and others shown in manual) in math funcitons.

 

thank you very much.

sahin

0 Kudos
Message 8 of 10
(5,074 Views)

Hello Sahin,

 

We treat math functions like Zoom traces for scaling.  You can see in the annotation box for the channel (the little box that appears when you turn on the channel display that shows the vertical scale and offset for C1-C4) that we display the v/div and t/div settings for this trace.  The automation command to change the vertical scale will be:  app.Math.F1.Zoom.VerScale = some value

 

NOTE: The scale limits are based on the function results so if you attempt to set the scale to a value that does not make sense for displaying the result, the scope will coerce the value to be within the limits.

 

i.e. if it will only allow 200mV/div and you try to set it to 500mV, the scope will force the value to be 200mV.

 

If you have not already found and started using it, you should look on the desktop of the scope for the XStream Browser application.  It is a very intuitive way of finding and testing the automation commands that are available on your scope. (This is where I went to get you the command).

 

I am not always so prompt in my responses on the NI forums.

 

So if you would like, you may call our Applications Engineering staff and we will be happy to get you the command you are looking for.

 

You can reach us at 1-800-5LeCroy (1-800-553-2769) Select option 3 for Scope Technical Support.

 

It is an automated system so you have a good chance of not getting me on the other end but you may ask for me by name.  My office hours are 8am to 5p Pacific Time and we also have someone available from 8 to 5pm Eastern.

 

I am not a CVI user but I am a Certified LabVIEW Architect (at least I will be again when I take the re-cert. exam).

 

Cheers

Leonard Brown

0 Kudos
Message 9 of 10
(5,068 Views)

Hi Mr. Brown

'app.Math.F1.Zoom.VerScale = some value' did the job, thank you very much.

0 Kudos
Message 10 of 10
(5,047 Views)