-
Jun 5th, 2018, 03:42 PM
#1
Thread Starter
Lively Member
-
Jun 5th, 2018, 03:46 PM
#2
Re: VB6.0 Program does not connect to serial ports on card.
In Device Manager, what port numbers are being assigned to the serial ports you installed? A screen capture of your Device Manager windows showing the ports would be most helpful.
-
Jun 5th, 2018, 03:46 PM
#3
Re: VB6.0 Program does not connect to serial ports on card.
What port numbers are you trying to use?
I have not tried to do any serial stuff under windows 10 but have did lots of it in the past with the older versions of Windows. Have had systems with up to 8 ports defined. Never really had any major issues getting them to work though I do seem to remember struggling a little when the port number was something unusual. Typically ports should be 1-X if you are getting something like port 16 that may be an issue.
-
Jun 5th, 2018, 03:48 PM
#4
Re: VB6.0 Program does not connect to serial ports on card.
-
Jun 5th, 2018, 04:13 PM
#5
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
Device Manager declares the ports to be COM3 and COM5.
-
Jun 5th, 2018, 04:24 PM
#6
Re: VB6.0 Program does not connect to serial ports on card.
-
Jun 5th, 2018, 08:03 PM
#7
Re: VB6.0 Program does not connect to serial ports on card.
Can we see the piece of code you use to set and open the port and the error number and message thrown? Also indicate which line throws the error.
-
Jun 6th, 2018, 02:40 AM
#8
Re: VB6.0 Program does not connect to serial ports on card.
Last edited by dz32; Apr 26th, 2019 at 11:18 AM.
-
Jun 6th, 2018, 12:24 PM
#9
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
Originally Posted by DataMiser
Can we see the piece of code you use to set and open the port and the error number and message thrown? Also indicate which line throws the error.
+++++++++++++++++++++++++++++++++++++++++++++++++++
I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.
The program aligns with COM3 using MSComm3.enable = true.
However, no data is received when transmitting data from another computer.
The programs does not align with COM5 using MSComm5.enable = true.
The error message is "Invalid Port Number".
Thank you for your reply.
ProgrammerInVB6
-
Jun 6th, 2018, 12:25 PM
#10
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.
The program aligns with COM3 using MSComm3.enable = true.
However, no data is received when transmitting data from another computer.
The programs does not align with COM5 using MSComm5.enable = true.
The error message is "Invalid Port Number".
Thank you for your reply.
ProgrammerInVB6
-
Jun 6th, 2018, 12:28 PM
#11
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
I may decide to try this code.
This is approaching the esoterica for me.
Thank you.
-
Jun 7th, 2018, 09:21 AM
#12
Re: VB6.0 Program does not connect to serial ports on card.
Originally Posted by ProgrammerInVB6
I insert two telephone icons on my form. I rename the icons MSComm3 and MSComm5. This is because Device Manager declares the serial ports are COM3 and COM5.
The program aligns with COM3 using MSComm3.enable = true.
However, no data is received when transmitting data from another computer.
The programs does not align with COM5 using MSComm5.enable = true.
The error message is "Invalid Port Number".
Thank you for your reply.
ProgrammerInVB6
Changing the name of the control doesn't change what Com port is associated with it. You have to change the CommPort property of one to 3 and the other to 5.
If you added two controls, the given names would be MSComm1 and MSComm2 but both would be defaulted to open COM1, which is probably why you get an Invalid Port Number on the second one because you can't open the same Com port twice (you're trying to open COM1 twice).
Last edited by passel; Jun 7th, 2018 at 09:28 AM.
-
Jun 7th, 2018, 10:30 AM
#13
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
Originally Posted by passel
Changing the name of the control doesn't change what Com port is associated with it. You have to change the CommPort property of one to 3 and the other to 5.
If you added two controls, the given names would be MSComm1 and MSComm2 but both would be defaulted to open COM1, which is probably why you get an Invalid Port Number on the second one because you can't open the same Com port twice (you're trying to open COM1 twice).
+++++++++++++++++++++++++++++++++++++++++++++++
I sincerely thank you for your reply.
Yes, with egg on my face, I did not change the CommPort property
to 3 and 5. And, CommPort assignment is immediately under the
port name.
I have not yet attempted to receive data. I encountered another
problem:
I downloaded the most recent drivers for the card from the Website of
the manufacturer. The drivers apparently installed with no problem.
I cannot confirm that the drivers installed - at all. Apps and Features
does not show an entry for the drivers. Processes (Task Manager) does
not show an entry for the drivers. I am waiting for a reply from the
manufacturer.
Also, I apologize. The offending code is MSComm5.portopen = true.
I will close this Problem after I receive data via COM3 and COM5
with full explanation. I will resume programming the week beginning
June 10, 2018.
Again, I sincerely thank you.
ProgrammerInVB6
Last edited by ProgrammerInVB6; Jun 7th, 2018 at 10:32 AM.
Reason: Clarification
-
Jun 7th, 2018, 10:34 AM
#14
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
+++++++++++++++++++++++++++++++++++++++++++++++
I sincerely thank you for your reply.
Yes, with egg on my face, I did not change the CommPort property
to 3 and 5. And, CommPort assignment is immediately under the
port name.
I have not yet attempted to receive data. I encountered another
problem:
I downloaded the most recent drivers for the card from the Website of
the manufacturer. The drivers apparently installed with no problem.
I cannot confirm that the drivers installed - at all. Apps and Features
does not show an entry for the drivers. Processes (Task Manager) does
not show an entry for the drivers. I am waiting for a reply from the
manufacturer.
Also, I apologize. The offending code is MSComm5.portopen = true.
I will close this Problem after I receive data via COM3 and COM5
with full explanation. I will resume programming the week beginning
June 10, 2018.
Again, I sincerely thank you.
ProgrammerInVB6
-
Jun 7th, 2018, 01:58 PM
#15
Re: VB6.0 Program does not connect to serial ports on card.
Check the device's Properties dialog in Device Manager. There is a Driver tab in this dialog that lists details such as driver maker and version.
-
Jun 7th, 2018, 05:26 PM
#16
Thread Starter
Lively Member
Re: VB6.0 Program does not connect to serial ports on card.
Hi dilettante:
Thank you for the suggestion.
I will certainly review the Device Manager info.
The manufacturer replied to me and indicated if Device Manager declares the comports are
running satisfactorily, the manufacturer has nothing else to say.
I will resume programming during the week beginning June 10, 2018.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|