help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Serial data acquisition with GNU octave 4.0.1


From: Littleboy
Subject: Serial data acquisition with GNU octave 4.0.1
Date: Mon, 11 Apr 2016 03:04:52 -0700 (PDT)

Hi everyone,

I am working on a project wich is already done with matlab but i need to use
a open source software to share it with people. 

I already found a lot of answers but not this one, I hope I don't duplicate
the topic on the forum.
I am going to detail my work for people who have the same problem.

Excuse my mistakes, I am not native English speaker

So, first of all, I use instrument-control package. This package was install
with octave 4.0.1 but i don't know why it didn't work, I just had to
reinstall it with : /pkg install -forge instrument-control/

Here is my script in matlab :

*if isempty(instrfind) == 1 
    PortSerie = serial('COM4');
    fopen(PortSerie);
    set(PortSerie,'terminator','CR');
end

fprintf(PortSerie,'#020');
ValF1 = fscanf(PortSerie);*

What is done with octave :

*package load instrument-control
if (exist("serial") != 3)
  disp("No Serial Support");
else
  disp("Serial supported");
  PortSerie = serial("\\\\.\\COM4");
  fopen(PortSerie);
  /set(PortSerie,'terminator','CR'); =>first problem/
endif

/fprintf(PortSerie,'#020');
ValF1 = fscanf(PortSerie); => second problem/*

I don't know how to set a terminator with octave. I can see  here
<http://octave.sourceforge.net/instrument-control/function/@octave_serial/set.html>
  
that this property is not in octave.

For the fprintf and the fscanf i don't understand how to communicate with my
hardware. I use ADAM module for my acquisition. And that work with matlab.
The octave help doesn't help.

If someone can help.

Thanks.





--
View this message in context: 
http://octave.1599824.n4.nabble.com/Serial-data-acquisition-with-GNU-octave-4-0-1-tp4676221.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]