AnsweredAssumed Answered

Anyone got a National Instruments GPIB card in a Linux computer?

Question asked by drkirkby on Sep 20, 2014
Latest reply on Sep 22, 2014 by WDrago
If anyone has a National Instruments GPIB board on a Linux computer, and has a few spare minutes, I would appreciate a bit of help in determining if a bit of software will compile and link on a linux machine. The file is open-source (GPL2 or later). 

The attached file (md5 checksum = 7cf280113db47daf5bd25987088eacd1)  was written to collect data from an 8720D VNA on a unix computer. It works on my 8720D, but I have only tested on Solaris (SPARC), not Linux. 

I would like to know if it compiles and links on a Linux box, and if not, what the error message(s) is. 

If you have an 8720, or something with a compatible command set, it should be able to collect data too, though I think there are some commands which wont work on early models, and might actually cause another VNA to lock up. If necessary, powering it off and on again will clear it. 

The software uses the normal

$ ./configure
$ make 

method on Unix systems, and should generate a binary "vna" that can collect S-parameters and sticks them in a .s2p Touchstone file with something like 

$ vna --log --s11 --s12 16 > foo.s2p

where 16 is the GPIB address - change if necessary. 

This will collect S11 and S12 data and stick it in foo.s2p

Other things that should work are:

$ vna --start 1000
(set start frequency to 1000 MHz)

$ vna --if-bandwidth 1000
(set IF bandwidth to 1000 Hz)

$ vna --help
(list all command line parameters. Unfortunately, not all are implemented!!! I think it only works to save data in log magnitude format. I can't check at the minute, as my VNA is at Keysight being calibrated)

Here's a typical file created - I hope the line that starts with a **** character shows up properly, as I had a problem getting it to print - the markup is interpreting it as a list. I think I found a way to "escape" that, but it might be browser dependent. (I'm using Firefox on an x86 based Sun running Solaris). 

The code is a bit slow, as it downloads data in ASCII not binary format. Doing in binary would be more tricky as I'd then need to worry about the fact that x86 and SPARC processors store numbers in a different way - big vs little endian. 

! This is a touchstone format file. 
! It should be saved with .s2p extension 
! HEWLETT PACKARD,8720D,0,7.74  
! Date = 18 Aug 2014
! Time = 20:20:18
! Start frequency = 0.050000000 GHz
! Stop frequency  = 7.000000000 GHz
! IF bandwidth = 300 Hz
! Smoothing = OFF
! Smoothing aperture = 1.000000 %
! Averaging = OFF
! Averaging factor = 16
! Source power = On
! Source power = Auto mode
! Output power level = 5.000000 dBm
! Retrace power = Off
! Testset switching = Continuous
! Number of sweeps for test set switching (0=hold, 1=continuous,2-999 = number o
f sweeps) = 1
! Step sweep = On (check)
! List frequency sweep = Off (check)
! IFBW setting for a list-frequency table in swept list mode = Disabled (Check)
! Power setting for a list-frequency table in swept list mode = Disabled (Check)
! Measurement mode = Alternate A and B
! Port extensions = OFF
! Port extension 1 = 0.000000 ps
! Port extension 2 = 0.000000 ps
! Points  = 401
! Calibration kit = 3.5 mm D
! Calibration = Full 2-port
! Power = 5.000000 dBm
! freq magS11 angS11 magS21 angS21 magS12 angS12 magS22 angS22
! Magnitudes are in log form
! Angles are in degrees
\\# MHz S DB R 50
50.00000 -62.52734 -159.49219 -9.93018 -3.01440 -9.89258 -2.69861 -49.98242 -91.28906
67.37500 -64.00391 -155.37500 -9.98535 -4.15161 -9.99072 -4.18457 -48.89453 -82.14844
84.75000 -65.75000 -178.07031 -9.99023 -5.30371 -9.98486 -5.25562 -48.54492 -70.34766  

Attachments

Outcomes