Thread Subject: Passing external variable to a GUI

Subject: Passing external variable to a GUI

From: Michal S

Date: 29 Apr, 2008 07:53:01

Message: 1 of 1

Hi,
I need to pass an external variable (a serial object to be
precise) to make it visible "inside a GUI".
What I want to do is gathering data from a serial port
after pressing a GUI button. The serial object is opened in
workspace.

I've got GUI generated in Guide. I tried to modify the
first (opening function) as:
function varargout = gui(s1,varargin) %s1-serial object
and send s1 from workspace

But when the start_Callback procedure executes after
pressing button s1 suddenly changes from seial object to a
"Start_Callback" string (???) and the variable becomes
useless.

I'm not familiar with all these weird callbacks and Matlab
procedure starts.

Anyone has an idea how to do this?

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com