|
| OPEN COMMS USING |
 |
Fri, 30 Jun 2006 23:51:24 +020 |
Hi to all,
I'm not a Superbase developer, but I need to solve a problem with a program
developed with Superbase.
My problem is with one serial print and always I get the following error
from SBRTS: "Serial Port don't available".
I'm sure that the error is in this line:
OPEN COMMS USING n_com%,9600,0,1,8
I think but I'm not sure that the problem is with "n_com%" var.
Can anyone send me correct code line to print on COM1?
Thanks a lot.
|
| Post Reply
|
| Re: OPEN COMMS USING |
 |
Sat, 01 Jul 2006 13:16:26 -040 |
I'm not certain, but perhaps the problem is really that the port is in use for
something else. Can you try printing to a different port?
You could trap this error and change the port in the code, something like:
' use n_com%% (two percent signs) to force integer value
SET ERROR OFF ALL
limit%% = 4 ' set to limit of COM ports, whatever it is
n_com%% = 0
WHILE NOT (done%% OR n_com%% > limit%%)
CLEAR ERRNO
n_com%% = n_com%% + 1
OPEN COMMS USING n_com%%,9600,0,1,8
IF NOT ERRNO THEN done%% = - 1
WEND
SET ERROR OFF ALL
IF done%% THEN REQUEST "COM" + STR$(n_com%%,"9") + "
opened successfully" ELSE REQUEST "Sorry!"
On Fri, 30 Jun 2006 17:51:24 -0400, thedarks <hemerson@ticino.com> wrote:
> Hi to all,
> I'm not a Superbase developer, but I need to solve a problem with a
program
> developed with Superbase.
>
> My problem is with one serial print and always I get the following error
> from SBRTS: "Serial Port don't available".
>
> I'm sure that the error is in this line:
> OPEN COMMS USING n_com%,9600,0,1,8
>
> I think but I'm not sure that the problem is with "n_com%" var.
> Can anyone send me correct code line to print on COM1?
>
> Thanks a lot.
>
>
>
|
| Post Reply
|
| Re: OPEN COMMS USING |
 |
Tue, 17 Oct 2006 21:13:44 -040 |
On Tue, 17 Oct 2006 17:27:06 -0400, Axel H <hahnheuser@optusnet.com.au>
wrote:
> Superbase 2 only supports Com1 or Com2. n_com% can only be 0 for Com1 or
1
> for Com2. Any other value would produce a "Invalid Error" and
not the error
> you are receiving. Peter is correct - your port is being used by another
> program.
>
|
| Post Reply
|
| Re: OPEN COMMS USING |
 |
Wed, 18 Oct 2006 07:27:06 +100 |
Superbase 2 only supports Com1 or Com2. n_com% can only be 0 for Com1 or 1
for Com2. Any other value would produce a "Invalid Error" and not the
error
you are receiving. Peter is correct - your port is being used by another
program.
--
Kind Regards
Axel H
"Peter Barus" <peter@visualpricing.com> wrote in message
news:op.tb0sxothpcvzm2@tetsumaru...
> I'm not certain, but perhaps the problem is really that the port is in use
> for something else. Can you try printing to a different port?
>
> You could trap this error and change the port in the code, something like:
>
> ' use n_com%% (two percent signs) to force integer value
> SET ERROR OFF ALL
> limit%% = 4 ' set to limit of COM ports, whatever it is
> n_com%% = 0
> WHILE NOT (done%% OR n_com%% > limit%%)
> CLEAR ERRNO
> n_com%% = n_com%% + 1
> OPEN COMMS USING n_com%%,9600,0,1,8
> IF NOT ERRNO THEN done%% = - 1
> WEND
> SET ERROR OFF ALL
> IF done%% THEN REQUEST "COM" + STR$(n_com%%,"9") +
" opened successfully"
> ELSE REQUEST "Sorry!"
>
>
> On Fri, 30 Jun 2006 17:51:24 -0400, thedarks <hemerson@ticino.com>
wrote:
>
>> Hi to all,
>> I'm not a Superbase developer, but I need to solve a problem with a
>> program
>> developed with Superbase.
>>
>> My problem is with one serial print and always I get the following
error
>> from SBRTS: "Serial Port don't available".
>>
>> I'm sure that the error is in this line:
>> OPEN COMMS USING n_com%,9600,0,1,8
>>
>> I think but I'm not sure that the problem is with "n_com%"
var.
>> Can anyone send me correct code line to print on COM1?
>>
>> Thanks a lot.
>>
>>
>>
>
|
| Post Reply
|
|
|
|
|
|
|
|
|
|