Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: matlab-instrument interface problem..
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Hagar

Posts: 1
Registered: 11/21/12
matlab-instrument interface problem..
Posted: Nov 21, 2012 2:20 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello all,

I'm having some trouble talking to a lockin amplifier through a matlab Gui program.
the command window keeps throwing the Error:

'Instrument object OBJ is an invalid object.'

while running the lines writing and reading data from the instruments:
Stn1=data.handles.Stn;

% Reading Current Aux mode
clrdevice(Stn1);

par.V= YOKO7651ReadVoltage(data.handles.Yoko);
%par.V=1;
pause(0.1) %
fprintf(Stn1, ['OF.' num2str(FREQ)]); %sets oscilator frequency
pause(0.1) %
fprintf(Stn1, ['OA.' num2str(SLVL1)]); %sets oscilator output voltage
pause(0.1) %
%fprintf(Stn1, ['XOF [0]'] );
% clears memory of instrument
pause(.1) %
fprintf(Stn1, 'X.');
pause(.1) %
Vtc= str2double(fscanf(Stn1));

This, although I already debugged the program and make sure it is working in debugging mode. When I run the Gui from start it just gets stuck with that Error.

anyone has an idea what could it be?


Message was edited by: Hagar



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.