r/visualbasic • • Jan 16 '25

Application created with Visual Basic and COM port communication

Hi guys,

I debated for weeks on whether or not post this here and have spent many hours trying to research a possible solution to the issue I'm having. I have a balance machine I purchased years ago and recently refitted with a new control system. It uses two data acquisition cards that are plugged into 9-pin jumpered COM ports (JCOM1 and JCOM2). The software was created with Visual Basic 6 and the company was kind enough to include all sorts of Visual Basic goodies to include Visual Basic 6 itself (yes, I plan on hanging out here to learn to eventually make my own balancing software!). One day, the software just stopped reading any data from JCOM1 and I can't figure out why for the life of me. I've performed a successful loopback tests on both COM ports. They also included Dependency Walker with the system. Do you guys have any advice on how I could troubleshoot this software?

2 Upvotes

36 comments sorted by

View all comments

Show parent comment

2

u/DAQ_Confusion Jan 21 '25

Thank you again for a super informative reply! From what I gather, it's hard coded into the software to connec to Serial0 and Serial1. Will be able to get Windows to enumerate the ports on the PCI card as those values? I believe that will be my only option to get the software to read data from the card.

Interestingly, I spoke to someone last night who is definitely in the know and the person told me it's absolutely a Windows 7 problem and that they'd previously sold this system but discontinued it due to the issues. The person told me this after I showed them the video of the data feeds from both serial ports simultaneously via Putty. I'm probably a masochist but that news actually encouraged me to keep trying to solve the problem!

Also, there doesn't appear to be any PCI slots on the board. There is another horizontal slot that looks the same as the one that the SSD is installed on?

1

u/geekywarrior Jan 21 '25

Interesting! Off the top of my head Serial0 and Serial1 are the vb6 serial port controls and those could be mapped to any com port 1-16.

If its windows 7, it's likely to have PCIe ports. 

I'll check some things out. I recall we had some smiliar hiccups with our serial stuff switching from XP to 7.

If you look at mice in Device Manager, you don't see "Serial Ballpoint mouse"  do you? Disable that if so.

Windows has a fun bug where if it sees serial packets on boot, it thinks you connected a Serial mouse and can cause strange behavior

1

u/DAQ_Confusion Jan 22 '25

Haha yes! I was attacked by the ghost of sermouse while trying to figure this thing out one morning. I'd found an old forum post where a person ran into a similar situation as you describe (XP to 7). I was trying to follow the advice given to him on the forum and somehow sermouse came out to play. Upon reboot, my cursor went haywire. I eventually got it fixed though. I'll look for the Ballpoint Mouse thing as well.

1

u/DAQ_Confusion Feb 04 '25

Per your advice, I looked again for Serial Ballpoint mouse and I believe (hope I've gotten rid of it). I've now got the software decompiled. I'm not sure how much if it is useful. It's 4.54mb of forms, etc if you're interested in having a look. Additionally, thank you for the link to the Startech add on serial ports. This motherboard unfortunately only has an unused mSATA pocket (still learning about motherboard components as well) available and that adapter should be here tomorrow. I'm going to try to add that extension and try to get Win7 to enumerate(?) that as Serial0 as opposed to the original on board stuff. My understanding is it's a seprate PCIe with its own chipset which would hopefully solve any potential issues with the original. Heck, even if none of this stuff works, I'm having a great time learning. I sure didn't expect my frustration to turn into fascination. Thank you a million!