Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Serial Port - Matlab - Problem

Status
Not open for further replies.

ashwini1

Member level 1
Joined
Jul 17, 2009
Messages
32
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Bangalore
Activity points
1,483
serial problem matlab

Hi,

In my application i am reading data from serial port. I have created exe of the application using matlab compiler(mcc) . THe problem is that whenever i get null or whenever there is time out, program stops running and there will not be any error message displayed on the command prompt.

Note: i am reading serial data at every one second. I have used timer to poll the serial port at every one second.

One more observation is that the same code works fine when i run it in matlab. I mean even if null is received/'time out' occurs, program polls serial port in next iteration (next cycle of timerfcn).

Any ideas !!
Thanks !
Ashwini
 

daqamseh

Newbie level 4
Joined
Jun 22, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Netherlands
Activity points
1,339
Hi,
I am Ahmad. I am beginner in Matlab and i have seen that you are also working the same what i like to do. Actually, i have 8 sensors and i am sending data through the serial port. my data is unsigned characters. what i should do to convert these data into normal measurement from the sensors using matlab knowing that i have constructed the serial port in matlab...do i used the fread instructions or something else....the data sequence is the following 55 55 55 55 then 16 byte from each sensor then 55 55 55 55

Could you help in that ?
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top