Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Serial Communication Toolbox details
Login with GitLab

Serial Communication Toolbox

A toolbox for communication over a Serial Port in Scilab
(3492 downloads for this version - 95586 downloads for all versions)
Details
Version
0.3
A more recent valid version exists: 0.5
Author
Enrico Segre
Owner Organization
Indian Institute of Technology Bombay
Maintainer
Aditya Sengupta
Categories
License
Creation Date
May 13, 2011
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("serial")
Description
            Serial Communication Toolbox for Scilab
=======================================

This toolbox enables the use of Serial Communication in
[Scilab](http://www.scilab.org/) and
[Scicoslab](http://www.scicoslab.org/).
This is a port of the __Portable Serial Toolbox__ for Scilab originally written
by [Enrico Segre](http://www.weizmann.ac.il/home/fesegre/)
and is being
released with his kind permission. It is licensed, at his request, under the
GPLv3.

Enrico does not wish to provide support for this
toolbox anymore. Therefore, for any support related queries or otherwise,
please raise an issue here or [email me](mailto:apsengupta@iitb.ac.in).

This toolbox is known to have worked so far on Linux based systems and on
Windows (up till Windows 7).

The implementation via TCL wrappers is certainly suboptimal, but shouldn't be
such a penalty, given the low bandwidth and the intrinsic asynchronous mode of
serial communication. And mainly, it relieves the developer from supporting many
platforms at once.
            
Files (2)
[256.75 kB]
Source code archive
Sources for the Serial toolbox
[260.53 kB]
OS-independent binary for Scilab 5.2.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (10)     Leave a comment 
Comment from Samuel Gougeon -- May 30, 2011, 12:22:40 AM    
Hello,
Great news to see that this package is back into the "official" list.
I deem it as the _optimal_ way to address a RS-232 connexion, just because of the reasons
you mention. Thank you for giving it a second life! For me, it has never died :-)
Samuel
Comment from Diego Paez Ardila -- June 16, 2011, 06:00:39 PM    
hello. 

im trying to install the toolbox, but i really don't know how to do it, my Os is snow
leopard. 
thanks for your help.  
Answer from Aditya Sengupta -- June 17, 2011, 07:28:46 PM    
> hello. 
> 
> im trying to install the toolbox, but i really don't know how to do it, my Os is snow
> leopard. 
> thanks for your help.  


Generally speaking, installation is the same as any other toolbox. Change your directory
so that you're in the toolbox directory. Execute the "builder.sce" file. Doing
this will
generate a bunch of new files in your toolbox subdirectories (that you do not have to
worry about). After this, execute "loader.sce" to load the toolbox. Thereon,
proceed as
normal.

This toolbox is written using TCL/Tk; I'm not sure how well TCL/Tk is implemented on Macs
(I don't own one, so I can't check). In Windows and in Linux, I have tested this and it
should work well. 
Comment from Diego Paez Ardila -- June 16, 2011, 06:02:04 PM    
hello. 

im trying to install the toolbox, but i really don't know how to do it, my Os is snow
leopard. 
thanks for your help.  
Comment from Aditya Sengupta -- June 24, 2011, 12:54:39 PM    
Dear all, 

This toolbox is now available on ATOMS. 

Simply update your repository and install this toolbox by typing the two following
commands: 
    atomsSystemUpdate()
    atomsInstall serial

Regards
Comment from Yusman Yusof -- July 21, 2011, 07:57:32 AM    
Hello,

I've received the "Undefined variable: TCL_EvalStr" when using openserial.

------------------------- Error -------------------------
-->h=openserial(2,"9600,n,8,1")
 !--error 4 
Undefined variable: TCL_EvalStr

at line      17 of function openserial called by :  
h=openserial(2,"9600,n,8,1")
---------------------------------------------------------

Seems like TCL/TK wrapper not available. I'm using windows XP.

Thank You..
Comment from Pascal Buehler -- July 25, 2011, 03:49:21 PM    
I wanted to read datas from a Tektronox TDS220 Oszilloscope. With NI and Addins at Excel 
from the Tektronixsoftware in Excel it works. The openserial givs me a filenumber, but 
with read serial now answer is coming? How do i make the right connection to the 
oszilloscope?

M.f.G. Pascal Bühler  
Comment from Pascal Buehler -- September 30, 2011, 09:52:48 AM    
Hi, i have a problem?

I'm trying to communicate with a FLUKE Hydra Series 2. my first command is
"*IDN?" and i 
read the datas, for know it works. But when i call a second command linke
"MON_VAL?" 
readserial gives me the Error:

Undefinierte Operation für die gegebenen Operanden.

Überprüfen oder definieren der Funktion %c_a_s für Überlast.

at line       2 of function serialstatus called by :  
at line       4 of function readserial called by :  
l=readserial(k);
at line      36 of exec file called by :    
exec('D:\Anwender\Scilab\Fluke_Hydra.sce', -1)
Comment from Samuel Gougeon -- March 23, 2012, 06:09:30 PM    
Hello,
The constant MSDOS -- for instance used in openserial() -- no 
longer exists in Scilab 5.4. Please upgrade using getos() instead.
Regards
Samuel
Answer from Aditya Sengupta -- April 14, 2012, 10:12:32 PM    
> Hello,
> The constant MSDOS -- for instance used in openserial() -- no 
> longer exists in Scilab 5.4. Please upgrade using getos() instead.
> Regards
> Samuel

Hello Samuel, 

This has been fixed now. 

Thanks,
Aditya
Answer from Aditya Sengupta -- April 14, 2012, 10:13:19 PM    
This answer has been deleted.
Comment from Tushar Chaskar -- February 10, 2015, 08:15:22 AM    
Hello,

Can any one tell me that why every inbuild functions of this serial toolbox like 
openserial(),writeserial(),readserial(),statusserial(),closeserial() takes so much 
delay.

Let me explain this, I had run flowing program on console window of scilab.

tic()
h=openserial(3,"115200,n,8,1")
a = toc()
tic()
writeserial(h,ascii([78 69 88 144 255 134]))
a = toc()
tic()
[queue,status]=serialstatus(h)
a = toc()
tic()
val = readserial(h,6)
a = toc()
tic()
closeserial(h)
a = toc()

answer of 'a' after openserial   =   0.603 sec
answer of 'a' after writeserial  =   0.056 sec
answer of 'a' after serialstatus =   0.046 sec
answer of 'a' after readserial   =   0.046 sec
answer of 'a' after closeserial  =   0.187 sec

Is there any way to reduce above delays. I am not worried delays of openserial and 
closeserial. But i am surely concerned about other function delays

Thanks,
Tushar
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.