How can I open RS232 user interface?

Create new topics, add your comment, remark, bugs...
Post Reply
surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

How can I open RS232 user interface?

Post by surfer » Thu Jan 31, 2008 7:45 am

Please tell me if there is someone who can give me a detailed guide to open RS232gui interface, I'm beginner in Matlab simulation.
I'm trying to find the "Interface Tx-Matlab" and the ",atlab prompt" but no results....
Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Thu Jan 31, 2008 8:47 am

To open the RS232gui user interface, either you type at the matlab prompt :
>> rs232gui

or you place the block
Image
in you model, and you double click on it to open the interface.

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Sat Feb 02, 2008 1:33 pm

Thank you "LubinKerhuel" for help!
I've trayed "rs232gui" under prompt command but it doesn't work!!!
Look what I've got as comment:

>> rs232gui
??? Undefined function or variable 'rs232gui'.

please try to help me to find this gui interface.
Best reguards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Sat Feb 02, 2008 2:04 pm

Wen you installed the toolbox, the installer unpacked the two files rs232gui.p and rs232gui.gui in the '/blocks' directory.
The blocks directory is also added in the matlab path. (File -> Set Path ...).

Check that theses two files are present in the blocks directory. Try to launch the rs232gui.p file (type rs232gui at the prompt). Since the blocks directory is added in the maltab path, it should be found whatever is your current active directory. If it does not work, try to launch it from the blocks directory.

I do not see any others reason. Does anybody get the same error ?

Lubin

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Sat Feb 02, 2008 2:53 pm

Hello Lubin, tell me please the toolbox is installed seperatly or auto installed under matlab install? I'm searching the 2 files as you have indicated but I haven't find it!
Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Sat Feb 02, 2008 3:04 pm

the toolbox is installed seperatly
download it here :
http://www.kerhuel.eu/RTWdsPIC/download.html

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Sat Feb 02, 2008 3:18 pm

Sorry this is fo dspic and not an installable software!
I've found:
install_dsPIC_R2006a.m

How can I get the installable toolbox?

Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Sat Feb 02, 2008 4:02 pm

surfer wrote:install_dsPIC_R2006a.m
This file is the Matlab script that will install the toolbox in the current folder. Launch it at the matlab prompt.

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Sun Feb 03, 2008 11:36 am

Hello,
thank you Lubinm.
I've succeeded to establish the serial communication link with my serial interface evaluation board based on a PIC16F877. There is response in communication PIC-PC and the buffer is filled with received data, but when I preview the plotted figure nothing is plotted.
There still some error messages like the followings:

??? Error using ==> unknown
Matrix dimensions must agree.

Error in ==> RS232_analyzBloc at 117


Error in ==> rs232gui>pushStart_Callback at 254


Error in ==> gui_mainfcn at 75
feval(varargin{:});

Error in ==> rs232gui at 43


??? Error while evaluating uicontrol Callback.

Please try to help me getting. I just want to get data from srial port and plot it in real time.
Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Sun Feb 03, 2008 12:25 pm

The rs232gui interface:
Image
should be used with the block
Image

The block builds a communication layer to allow plotting up to 16 different data channel coded using either 8, 16 or 32 bits data.
For details about the communication layer, there is a description on my french website.

In your case, I guess that you want to plot raw data (without using the communication layer) : uint8.
==> Push the "donneesBrutes" (ie, "Raw data") button of the interface.

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Sun Feb 03, 2008 2:20 pm

Thank you Lubin,
can you help me to make a labview interface the same as you have showed in your frensh website!
Just us I've told you, getting 16 bit data format and plot it in an appropriate graph.
The data are a real teperature value sensed from the PIC16F877 to the PC.

I'm so grateful to you.
Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Mon Feb 04, 2008 11:48 pm

Hi Surfer !

I hope to publish the Labview schematic that can decode the data sent by the dsPIC (encoded with the simulink block Tx_Matlab_Labview). I currently do not find time to do it.

Lubin

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Tue Feb 05, 2008 6:05 am

Thanks Lubin :)
Please can you help me to write a program in Matlab, that acquire data from serial port and plot it in real time.
I thought there is three instuctions to program this task, try to help me please.
Best regards.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Tue Feb 05, 2008 11:16 pm

Hi Surfer,

You will find many forums with useful help. The matlab help is also very useful.
However, from my experiment:
On matlab, and with some computer (depending on its own hardware)
Opening serial communication will crash matlab if data are being sent from the other side, while matlab open the serial line
Also, sometime, it is necessary to send one or two data (char) through the serial before being able to receive any from it.

surfer
Posts: 8
Joined: Thu Jan 31, 2008 7:36 am

Re: How can I open RS232 user interface?

Post by surfer » Wed Feb 06, 2008 6:27 am

Ok, as I think is not prefered to interface serial port with Matlab! So can I use visual basic?
Bets Regards

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: How can I open RS232 user interface?

Post by LubinKerhuel » Wed Feb 06, 2008 10:33 pm

It's at your convenience...

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests