Serial Port

Just starting out? Need help? Post your questions and find answers here.
drahneir
Enthusiast
Enthusiast
Posts: 105
Joined: Tue Jul 18, 2006 4:18 pm
Location: JO42RM

Serial Port

Post by drahneir »

Today I made a strange experience. When I saw, that my PB 5.0 (Win x86) was not the newest version, I downloaded and installed PB 5.11. When I started my main application, program execution was stopped somewhere. Well, I could trace the fault and found, that
'ReadSerialPortData(2, @str1, 128)'
was responsible for the stop. Since I had another serial port, which worked as expected, I could compare the commands for both. Yes, there was a difference. The command for the fault free port was
'ReadSerialPortData(0, @str1, AvailableSerialPortInput(0))' .
I have tried to read more bytes from the port than were available. But, under ver 5.0, the program was running flawlessly up to this morning. Ok, I changed the command to what PB 5.11 is expecting, and now it is up and running.
BTW, who is responsible for the ugly and hard to read color combination for the file tabs of the IDE in 5.1x?
infratec
Always Here
Always Here
Posts: 7581
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Serial Port

Post by infratec »

Hi drahneir,

if you want: I'm guilty.

I pointed out that the ReadSerialPortData() does not work like described.
It should read blocking according to the help.

But it was non blocking.
This bug is fixed since 5.10.

Bernd
drahneir
Enthusiast
Enthusiast
Posts: 105
Joined: Tue Jul 18, 2006 4:18 pm
Location: JO42RM

Re: Serial Port

Post by drahneir »

Alles klar, Bernd.
Post Reply