05-15-2015 03:16 PM - edited 05-15-2015 03:19 PM
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
05-17-2015 08:10 AM
05-17-2015 03:48 PM
Hi,
My initial settings are like this.
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
05-17-2015 05:46 PM
05-17-2015 09:15 PM
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
05-17-2015 09:31 PM
05-19-2015 05:36 PM
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