Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

LeCroy Waverunner 104 xi store trace / destination file setup

 

 

Hi Leonard,

 

 

Thanks for the answers.

Well, i dont need GPIB way of communication as i have connected Scope to CPU through ethernet only 

 

Is there any function in IVIScope which can send the remote commands to scope?

if not, how we can communicate with the IVI driver to read and write strings that can be used to send/receive any command.

 

Including some portions of remote commands...

==============================================================

 

sprintf(cmdIn, "CRMS CUST"); // Command string
statusResult = Ivi_viWrite (ScopeHandle, cmdIn, strlen(cmdIn), &writeNoOfBytes);  // Used IVI.h write method
statusResult = viWrite (ScopeHandle, cmdIn, LEN, &writeNoOfBytes); // Used VISA.h write method

 

sprintf(cmdIn, "PACU 2,TLEV,C1,POS,25PCT"); // Command string
statusResult = Ivi_viWrite (ScopeHandle, cmdIn, strlen(cmdIn), &writeNoOfBytes);
statusResult = viWrite (ScopeHandle, cmdIn, LEN, writeNoOfBytes);

 

sprintf(cmdIn, "PAVA? P2");  // Command string

statusResult = Ivi_viRead (ScopeHandle, LEN, cmdOut, &readNoOfBytes);// Used IVI.h read method

statusResult = viRead (ScopeHandle, cmdOut, LEN, retCnt); // Used IVI.h read method

 

==============================================================

 

I am getting statusResult = -1073807346 as error code and the EventLogs are not filled with any while executing these commands. 😞

 

Could you help me to figure it out?

 

Thanks,

Kiran

 

 

0 Kudos
Message 11 of 17
(1,740 Views)
As the error explains, you have a problem with the reference to the scope. You don't show the creation of that in your code segment.
0 Kudos
Message 12 of 17
(1,720 Views)

Hi,

 

My initial settings are like this.

  1. Using NI Labwindows CVI /Ansi C .
  2. Lecroy oscilloscope is connected through LAN cable and using TCP/IP communication
  3. Driver which i am using the latest one from Pacific minds, IVI Driver 3.2.9.0 x86.

I was trying to access the lecroy scope in such a way so that i can automate by Setting/Getting data from it. Some of the functions i have tried using using IVIScope (). But some attributes cannot be found, like IVISCOPE_ATTR_HORIZONTAL_OFFSET in IVIScope(where i can get the waveform data point in X-axis after the trigger point). i can only found IVISCOPE_ATTR_VERTICAL_OFFSET in the IVIScope Class driver.

 

To get these information from Lecroy Scope, the only way you have mentioned in the forum is to use the remote command querying(Write/Read).

Can i do send/receive GPIB/VBS remote commands in ANSI C using IVI library? If so, how is that possible.

 

Attaching the source code which has queries using VBS and GPIB commands.
I am getting a ScopeHandle referencing error while doing ViWrite using IVI drivers. (error code = -1073807346)

 

This code snippet queries for the Voltage divisions currently set for Channel 1, C1 through VBS and GPIB
I guess i am missing some thing after the initialization.

 

Expecting your help here to sort this out.

 

Thanks,
Kiran

0 Kudos
Message 13 of 17
(1,709 Views)
Sorry, I get an error when trying to open the zip file. Probably a fault of my phone.

It would be more polite to say 'Hope for some help'. Your problem has nothing to do with NI hardware or software. It's a fault of your programming.
0 Kudos
Message 14 of 17
(1,704 Views)

 

 

Sorry if i have n't mentioned specifically about the help.

Anyway, it would be more helpful if you can give me some hints on using the IVI class for remote commanding the scope.

 

Thanks,

Kiran

0 Kudos
Message 15 of 17
(1,700 Views)
As I said, I can't open your zip file and you need to fix the resource problem. I can't suggest what is wrong since I can't view your code. You'll have to be patient.
0 Kudos
Message 16 of 17
(1,697 Views)

Hi Guys,

 

 

Finally, I fixed the issue and got the answer too for why i got my remote commands not working in my sample program which was shared.

 

Reason : It was because i was referring to the IVI library, Ivi_VIWrite/Ivi_ViRead which is obsolete in doing a remote command.

Solution : Use the latest driver for the scope and use the corresponding function panel (*.fp) WriteString/ReadString methods to do the remote commands.

Note : I was using Lecroy Scope.

 

Hope this helps for those who came across these situations.

 

Thanks for all your extended help.

 

Best Regards,

Kiran

 

 

0 Kudos
Message 17 of 17
(1,680 Views)