Hi, I have a line of code which is based on Agilent's +IVI-COM driver and VISA-COM I/O programming examples in Microsoft Visual C#+ document:
src2.WriteString("VBS? 'return=app.Acquisition.C1.Out.Result.DataArray'", true);
double [ ] results = (double [ ] )src2.ReadList(IEEEASCIIType.ASCIIType_R8, ",");
Console.WriteLine(results[2]);
I am using a LeCroy WaveRunner 44Xi so I can send VBS scripts to it and should receive an array for the waveform I see on channel 1, however, I get the following *error:*
*Unexpected I/O termination or couldn't convert list item # 1 to floating point format*
I have also tried using a more direct command to acquire the waveform arrray:
src2.WriteString("INSPECT? SIMPLE", true);
double[ ] results = (double[ ]) src2.ReadList(IEEEASCIIType.ASCIIType_R8, ",");
Console.WriteLine(results[2]);
But I get the same error. Could someone give me some insight on this? Would greatly appreciate it.
Edit: please ignore the space inside the arrays [ ]. If I did not add the space, the formatting in this forum made it invisible. Inside my program there is no space between [ ].
Edited by: Meta on Oct 20, 2015 3:54 AM
src2.WriteString("VBS? 'return=app.Acquisition.C1.Out.Result.DataArray'", true);
double [ ] results = (double [ ] )src2.ReadList(IEEEASCIIType.ASCIIType_R8, ",");
Console.WriteLine(results[2]);
I am using a LeCroy WaveRunner 44Xi so I can send VBS scripts to it and should receive an array for the waveform I see on channel 1, however, I get the following *error:*
*Unexpected I/O termination or couldn't convert list item # 1 to floating point format*
I have also tried using a more direct command to acquire the waveform arrray:
src2.WriteString("INSPECT? SIMPLE", true);
double[ ] results = (double[ ]) src2.ReadList(IEEEASCIIType.ASCIIType_R8, ",");
Console.WriteLine(results[2]);
But I get the same error. Could someone give me some insight on this? Would greatly appreciate it.
Edit: please ignore the space inside the arrays [ ]. If I did not add the space, the formatting in this forum made it invisible. Inside my program there is no space between [ ].
Edited by: Meta on Oct 20, 2015 3:54 AM