Hi,
I'm using the SerialPort functions integrated in PB 4.50
There is no problem in open the port, write and read data, and so on...
but the function SerialPortError always returns a value of 28 (1C hex),that seems means this:
#PB_SerialPort_Break
#PB_SerialPort_Frame
#PB_SerialPort_RxParity
If the port works fine, why this function returns an error?
Does anyone have the same problem?
Thanks
SerialPortError
SerialPortError
The PB community is great... nice to meet you!
Re: SerialPortError
Hi SPP,
do you have serial port errors
Because the results of SerialPortError() are only valid if an error occured before.
(That's the text in the helpfile: Returns the error if ... fails)
So you should use it in that way:Bernd
do you have serial port errors

Because the results of SerialPortError() are only valid if an error occured before.
(That's the text in the helpfile: Returns the error if ... fails)
So you should use it in that way:
Code: Select all
if AvailableSerialPortInput() > 0
if ReadSerialPortData() = 0
debug SerialPortError()
endif
endif
Re: SerialPortError
Hi Bernd, thanks for your reply,
You're right, the help file says:
"Return the error on the #SerialPort when ReadSerialPortData(), WriteSerialPortData() or WriteSerialPortString() fail"
i didn't see it, but... in order to detect a problem, I expected that after performing any port operation, if there`s no problem, this function returns 0.
Thanks again,
Best regards
You're right, the help file says:
"Return the error on the #SerialPort when ReadSerialPortData(), WriteSerialPortData() or WriteSerialPortString() fail"
i didn't see it, but... in order to detect a problem, I expected that after performing any port operation, if there`s no problem, this function returns 0.
Thanks again,
Best regards
The PB community is great... nice to meet you!