Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

usage of serial port in matlab

Status
Not open for further replies.

mf1364

Full Member level 3
Joined
Dec 4, 2007
Messages
185
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,700
serial port in matlab

Hi every body
I run this codes in matlab :
s = serial('COM1');
fopen(s)
fwrite(1)
fclose(s)
but i received this error:(??? Error using ==> serial.fopen
Port: COM1 is not available. No ports are available.
Use INSTRFIND to determine if other instrument
objects are connected to the requested device).
according this error i used 'instrfind'and i understood that status of com1 is closed.
and now i want to open this port
do you know what should i have down?
 

serial port in matlab

There are two possible reasons:

First, COM1 is used by some other software or hardware (possibly as windows background services) while you're running MATLAB.

Second, COM1 is unavailable! Find out which COM port is active from Device Manager in windows.

Hope this helps
 

Re: serial port in matlab

I find out that com1 is active from
Device Dananger in windows.

I dont use any sotware except matlab
and you know, Is it reasonable? that I
allways have voltage between 3&5(pins)
of serial port as soon as I turn on my PC.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top