<div dir="ltr"><div>Dear all,</div><div><br></div><div><br></div><div>using the "Serial Communication Toolbox" I try to Access a Controller via a RS232 Interface.</div><div><br clear="all"></div><div><br></div><div><br></div><div>Now, since I am a very beginner in this field I could use some help.</div><div><br></div><div><br></div><div>What I do:</div><div><br></div><div><br></div><div>h = openserial(1," 9600,n,8,1");</div><div><br></div><div><br></div><div>If I look at "h", this is what I get:</div><div><br></div><div>h = file15873640</div><div><br></div><div>I understand this is a string of a so called Serial port file...so I assume that a connection is established.</div><div><br></div><div><div><br></div><div>--> What does this mean?</div><div>--> How to Display the Content of this file?</div><div><br></div><div><br></div><div>Now, once I have connetion established I want to communicate with the controllr.</div><div><br></div><div>Example: I want to send a command with following command structure:          </div><div><br></div><div><br></div><div>       <address>_<command>_<Parameter>_<value>§</div><div><br></div><div>*A_r_120_0</div><div><br></div><div>*      = for Synchronisation</div></div><div>A     = address</div><div>r      = command for reading</div><div>120  = Parameter for actual sensor value</div><div><br></div><div>I try:</div><div><br></div><div>ret = writeserial(h, " *A_r_120_0 " );</div><div><br></div><div>result = readsearial(h);</div><div><br></div><div><br></div><div>I get:</div><div><br></div><div>ret = 0   // seems to be OK</div><div><br></div><div>result = ?????</div><div><br></div><div><br></div><div>--> What does this mean?</div><div><br></div><div><br></div><div>I use:</div><div><br></div><div>Scilab 5.5.1 on Win 7  64bit.</div><div><br></div><div><br></div><div><br></div><div>Thank you,</div><div>Philipp</div><div><br></div><div><br></div><div><br></div><div><br>-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.</div><div><br></div><div>There we have the salad.</div></div></div>
</div>