Author |
Topic: COM Port Problem (Read 698 times) |
|
Cheemag
New Member
member is offline
Posts: 16
|
|
COM Port Problem
« Thread started on: Feb 10th, 2015, 1:02pm » |
|
Hello,
No matter what I try I can no longer get LB to open a COM port.
----
' Test open COM4 in XP
open"COM4:4800,N,8,1,DS0,CS0,RS" for random as#1
Com=16384
close #1
end
----
This always fails with 'Unable to open COM4 .... at line ...' regardless of whether I run the .EXE in Windows 7 or XP.
What is odd is that I've been using the LB version to load the memories of a receiver on COM1 in Windows 7 for years, but it failed yesterday with this error.
Several other programmes can access the receiver on that port without stumbling, both in 7 and XP. Only LB-compiled programmes fail. Programmes compiled in Power Basic work perfectly in XP.
Hope someone can help.
Regards,
Jim
|
|
Logged
|
Regards,
Cheemag
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: COM Port Problem
« Reply #1 on: Feb 10th, 2015, 1:45pm » |
|
on Feb 10th, 2015, 1:02pm, Cheemag wrote:Only LB-compiled programmes fail. Programmes compiled in Power Basic work perfectly in XP. |
|
I'm somewhat confused. You refer to an LB-compiled program, and the code you listed is LB-specific (the "DS0,CS0,RS" qualifiers don't exist in LBB) so why are you posting your question to the LBB forum?
Richard.
|
|
Logged
|
|
|
|
Cheemag
New Member
member is offline
Posts: 16
|
|
Re: COM Port Problem
« Reply #2 on: Feb 13th, 2015, 10:52am » |
|
on Feb 10th, 2015, 1:45pm, Richard Russell wrote:I'm somewhat confused. You refer to an LB-compiled program, and the code you listed is LB-specific (the "DS0,CS0,RS" qualifiers don't exist in LBB) so why are you posting your question to the LBB forum?
Richard. |
|
! I had beliefved that LBB is based on Liberty Basic?
The programme was written in Liberty Basic long before I'd ever heard of LBB. I took the LB code and compiled it with LBB after an LB programme that had worked for years suddenly stopped working without any changes having been made to it.
Are you saying I should try to open the port without the DS, CS, RS parameters and compile it with LBB?
Regards,
Cheemag
|
|
Logged
|
Regards,
Cheemag
|
|
|
Rod
Full Member
member is offline
Gender:
Posts: 110
|
|
Re: COM Port Problem
« Reply #3 on: Feb 13th, 2015, 1:23pm » |
|
Go here http://lbbooster.com/lbb.html#benefits and read the Compatability section item 9)
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: COM Port Problem
« Reply #4 on: Feb 13th, 2015, 1:28pm » |
|
on Feb 13th, 2015, 10:52am, Cheemag wrote:Are you saying I should try to open the port without the DS, CS, RS parameters and compile it with LBB? |
|
That's entirely up to you, of course. Those additional LB serial port parameters are one of the few areas of incompatibility between LB 4.04 and LBB, so if you do want to compile your program with LBB you will need to remove them.
But I would have expected that if LB won't open the port then LBB won't open it either. The likely causes (e.g. the port is already in use by another application) will affect both equally.
Richard.
|
|
Logged
|
|
|
|
Cheemag
New Member
member is offline
Posts: 16
|
|
Re: COM Port Problem
« Reply #5 on: Feb 13th, 2015, 3:19pm » |
|
on Feb 13th, 2015, 1:28pm, Richard Russell wrote:That's entirely up to you, of course. Those additional LB serial port parameters are one of the few areas of incompatibility between LB 4.04 and LBB, so if you do want to compile your program with LBB you will need to remove them.
But I would have expected that if LB won't open the port then LBB won't open it either. The likely causes (e.g. the port is already in use by another application) will affect both equally.
Richard. |
|
The port isn't already in use. After all, the other programmes accessing that machine run perfectly and all close their ports.
I have just recompiled it with LB and replaced all the LB support files in the working directory and it now works again. I can only guess at a corrupted support file or the .EXE itself.
Thank you for your help. I'll now study the differences between LB and LBB and try to get it to work in LBB.
Regards
Cheemag
|
|
Logged
|
Regards,
Cheemag
|
|
|
Cheemag
New Member
member is offline
Posts: 16
|
|
Re: COM Port Problem
« Reply #6 on: Feb 13th, 2015, 3:20pm » |
|
on Feb 13th, 2015, 1:23pm, Rod wrote:
Thank you for that. I'll study it further to appreciate the differences between LB and LBB.
Regards
Cheemag
|
|
Logged
|
Regards,
Cheemag
|
|
|
|