[Scilab-users] ?==?utf-8?q? help for RS232 programming
Philipp Mühlmann
p.muehlmann at gmail.com
Tue Aug 16 16:27:00 CEST 2016
OK,
it seems I need stopbit = 2; // at leas a working C-code has this setting
so:
h = openserial(1," 9600,n,8,2");
but with this, I get as a result the command back as a string when I use
"readserial()"
Example:
h = openserial(1," 9600,n,8,2");
ret = writeserial(h, " *A_r_106_0 " );
result = readserial(h);
closeserial(h);
result is: A_r_106_0 as a string, but I expect it to be the Firmware
Version
so to your questions:
- Are you sure you have set the serial port correctly (delimiter, baud
rate, parity, ...) ?
-> Yes
- Are you sure your controller is supposed to answer something to this
command ?
-> Yes
- Is the syntax for passing the arguments correct (separator in particular
that can be nothing, blank or even comma) ?
-> not 100% sure about that.
-> here a link to the description of the Controller...chapter 3.12
http://www.west-l.ru/uploads/tdpdf/ca2010-cable_eng_bro.pdf
- Do you have a command without arguments that returns a known value (like
*IDN? or *SN? that should return a string with the id of the controller) ?
-> Yes, e.g.: firmeware
- Did you try to connect to your controller using hyperterminal or putty to
see whether the problem comes from Scilab?
-> I used the C-coded Software for testing and it can connect to
the controler reading and writing values from/on it.
--
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/7b5b0e31/attachment.htm>
More information about the users
mailing list