Pre-ci test passed git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
13 lines
520 B
Matlab
13 lines
520 B
Matlab
function [] = sendgpib(addr, command);
|
|
% Sample file showing how to interface with gpibcmd
|
|
% Command in Octave: sendgpib (20, '"FREQ 5000"')
|
|
% Must have the quotes around the command to work
|
|
% addr = 20;
|
|
% command = '"FREQ 2000"';
|
|
|
|
% this could be rewritten as native octave, see http://www.gnu.org/software/octave/doc/interpreter/Dynamically-Linked-Functions.html#Dynamically-Linked-Functions
|
|
|
|
cmdstr= ["./gpibcmd " sprintf('%i' , addr) " '" command "'"];
|
|
disp(['sendgpib: executing >> ' cmdstr ' <<'])
|
|
system(cmdstr);
|