Thread Subject: GUI controlpanel

Subject: GUI controlpanel

From: Thomas Bruun Clausen

Date: 12 May, 2005 08:27:24

Message: 1 of 3

I have a complex industrial system modelled in simulink. I now need
to create a GUI controlpanel that allows me to see the ON/OFF status
of different components like valves etc. Where can I get hold of a
simpel LED-like indicator to use in GUIDE? Just being able to change
between two different graphic symbols (e.g. an ON lamp bitmapfile and
an OFF lamp bitmapfile) would do.

Subject: GUI controlpanel

From: Will Reeves

Date: 7 Jul, 2005 10:10:37

Message: 2 of 3

I've found a quick and free solution...

I made a couple of 15 pixel square images of and LED on and off -
mine were round with a background colour matching the gui window.

Then do the following:

Create a checkbox,
Set the string property to nothing.
Set the 'cdata' property to the image you want.
Set the 'enable' property to inactive (or use guide to do this)

eg.

red_led=imread('red_led.jpg');
set(handles.indicator1,'cdata',red_led);
set(handles.indicator1,'Enable','inactive');

I guess you could buy an activex control also?

Thomas Bruun Clausen wrote:
>
>
> I have a complex industrial system modelled in simulink. I now need
> to create a GUI controlpanel that allows me to see the ON/OFF
> status
> of different components like valves etc. Where can I get hold of a
> simpel LED-like indicator to use in GUIDE? Just being able to
> change
> between two different graphic symbols (e.g. an ON lamp bitmapfile
> and
> an OFF lamp bitmapfile) would do.

Subject: GUI controlpanel

From: Dave Robinson

Date: 7 Jul, 2005 11:13:52

Message: 3 of 3

Thomas Bruun Clausen wrote:
>
>
> I have a complex industrial system modelled in simulink. I now need
> to create a GUI controlpanel that allows me to see the ON/OFF
> status
> of different components like valves etc. Where can I get hold of a
> simpel LED-like indicator to use in GUIDE? Just being able to
> change
> between two different graphic symbols (e.g. an ON lamp bitmapfile
> and
> an OFF lamp bitmapfile) would do.

What I have done on several of my GUI's is simply use a static text
box and use the set command to change the background colour property.
You could also change the string property to give you an on/off
legend.

% Set all LED's to Red_Colour
set(handles.Entropy_LED,'BackgroundColor',[1 0 0]);
set(handles.Focus_LED,'BackgroundColor',[1 0 0]);
set(handles.ColHist_LED,'BackgroundColor',[1 0 0]);
set(handles.EdgeHist_LED,'BackgroundColor',[1 0 0]);

% Set the LED to green
set(handles.Focus_LED,'BackgroundColor',[0 1 0]);

Hope that this helps

Dave Robinson

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