[Scilab-users] help for RS232 programming
Philipp Mühlmann
p.muehlmann at gmail.com
Tue Aug 16 13:10:10 CEST 2016
Dear all,
using the "Serial Communication Toolbox" I try to Access a Controller via a
RS232 Interface.
Now, since I am a very beginner in this field I could use some help.
What I do:
h = openserial(1," 9600,n,8,1");
If I look at "h", this is what I get:
h = file15873640
I understand this is a string of a so called Serial port file...so I assume
that a connection is established.
--> What does this mean?
--> How to Display the Content of this file?
Now, once I have connetion established I want to communicate with the
controllr.
Example: I want to send a command with following command structure:
<address>_<command>_<Parameter>_<value>§
*A_r_120_0
* = for Synchronisation
A = address
r = command for reading
120 = Parameter for actual sensor value
I try:
ret = writeserial(h, " *A_r_120_0 " );
result = readsearial(h);
I get:
ret = 0 // seems to be OK
result = ?????
--> What does this mean?
I use:
Scilab 5.5.1 on Win 7 64bit.
Thank you,
Philipp
--
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.
There we have the salad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160816/65d135af/attachment.htm>
More information about the users
mailing list