help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GPIB test on HP8510C electrical-optical calibration


From: martine1212
Subject: GPIB test on HP8510C electrical-optical calibration
Date: Sat, 13 Jul 2013 22:29:36 -0700 (PDT)

Hello guys:
I spent the afternoon converting my matlab scrpt to octave and I really
liked it.... very little changes, great compatibility, runs smoothly on
Opensuse 12.3 64 bit
I am using Xoctave for the GUI, very happy about it.

Now,  regarding the gpib_read.
Probably for something that only gives a few bytes the read in uint8 is
probably ok.... for huge amount of data in ASCII format
say a sweep from 45MHz to 67GHz with like 1M points, the current format made
Xoctave or Octave crash not sure of which one.

An Exception Occurred. Please see the following exception message. Please
save it if you'd like to report it.

Program exception!
Stacktrace:

Exception class: EInOutError
Message: Invalid input
  $0000000000607D03
  $00000000006288F7
  $0000000000576C01
  $0000000000B0517D
  $0000000000B050F0
  $0000000000575FEA
  $000000000086D673
  $00000000008624AF
  $00007F777B25C35B




The equivalent to gpib_read in matlab gives you like complex comma separated
pairs, and each pair is separated by spaces and LF characters.

0.12345678E00,0.87654321E00
1.234567EE00,0.123456798E00

so you can imagine that with 1Mpoints out of the VNA it gets very messy....
Everything in ASCII codes is sort of inconvenient to process...and this is
the problematic code

gpib_write(HP8510C,"OUTPDATA;WAIT;");
string_data=gpib_read(HP8510C,Buffer_size);
string_data=char(string_data);
num_data=strread(string_data,'%f','delimiter',',');
S11_real=num_data(1:2:end);      %Extract real component
S11_imag=num_data(2:2:end);      %Extract imaginary component
fansS11M=S11_real+i*S11_imag;

gpib_close(HP8510C); 

The moment I tried the  string_data=char(string_data); everything went to
hell....

I also know the matlab equivalent....

m=strread(d,'%f','delimiter',',');
mR12=m(1:2:end);      %Extract real component
mI12=m(2:2:end);      %Extract imaginary component

works without problems....

Anybody who could provide some light into the issue??.... the calibration
involves huge amount of data.
Right now I am just taking one reading... and it is not working.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/GPIB-test-on-HP8510C-electrical-optical-calibration-tp4655609.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]