PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV (précédentes versions) → Serial Port problems
Serial Port problems
Débuté par Richard SMITH ( RCAu, 17 oct. 2010 23:40 - Aucune réponse
Membre enregistré
3 messages
Posté le 17 octobre 2010 - 23:40
Hi,

I am using windev mobile 14 and trying to set COM2 to read/write. Its not working and seems to get the baud rate wrong. I am trying for 9600, 8 bit, none, 1 stop.

The code setting the port is:

// Opening Serial port
Port = sOpen(2, 4096, 4096,1000)
IF ErrorOccurred THEN
Error()
ELSE
// Configuring I/O
sParameter(2, 9600, 0, 8, 0, True, False, False)
END

and here it is to read the port (set to a button)

Msg is string

Msg = sRead(2, 5)
STC_Static1 = ">"+Msg+"<"

Anyone see why its not setting the port correct?

Regards

Richard