[Gambas-user] Re: Using serial component for plc comunications

Daniel daniel.campos at ...338...
Tue Jun 1 18:40:04 CEST 2004


OK, there was an stupid bug in the SerialPort example I wrote:

...
WRITE #Sport,TxtSend.Text & Chr(13) & Chr(10)
...

Should be:

...
WRITE #Sport,TxtSend.Text & Chr(13) & Chr(10),Len(TxtSend.Text)+2
...

To tell the write function the real lenght of the data to send, so it
seems there's no bug in the serial port class but in the example.

Benoit, could you add this new version to examples?

Regards,

Daniel Campos


El lun, 31-05-2004 a las 23:59, Marcelo Duschkin escribió:
> El Lun 31 May 2004 18:09, Daniel escribió:
> |> I'll try to look what's happening, can you send me some samples?
> 
> Thank you for your fast response.
> I need to connect a pc with a data logger, but for test purpouses, I do it 
> with two pc's, both running the "SerialPort" example in Gambas.
> When I type "asdf" in the TxtSend text box and hit "CR", in the TextArea1 of 
> the second PC appears "çasdf" where "ç" is a little square.
> The hex code of this character is 06 [ACK]
> This char is always in front of wathever string I send.
> I've tried in the 2nd pc Hyperterminal in W98 (sorry for that ;) and that 
> confirmed the char is added during transmission.
> 
> -- Para el cierre: ---
> El Pingüinoráculo solía citar:
> ¿Piratería yooooo??? Lo que hago es transferencia de tecnología.
> - - -
> Marcelo Duschkin - Buenos Aires - Argentina
> mardus at ...298...
> www.websdelsur.com.ar
> www.lahueya.com.ar
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g. 
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id66&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SerialPort.tar.gz
Type: application/x-compressed-tar
Size: 1636 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040601/1be40e52/attachment.bin>


More information about the User mailing list