[Scilab-users] ?==?utf-8?q? help for RS232 programming
Philipp Mühlmann
p.muehlmann at gmail.com
Tue Aug 16 16:59:52 CEST 2016
trying putty with following Setting:
connect to COM1
baud 9600
data bits 8
stop bits 1 (or 2)
parity None
flow control XON / XOFF ( didn't Play with this Setting)
gave only "?"-Symbols when I wanted to write in the cmd-like window
now I am confused....
2016-08-16 16:27 GMT+02:00 Philipp Mühlmann <p.muehlmann at gmail.com>:
> 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.
>
--
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/0a92efb6/attachment.htm>
More information about the users
mailing list