|
-
Jan 24th, 2005, 03:38 PM
#1
Thread Starter
New Member
COM Communication Problems [Resolved]
Hello everyone,
I will start by saying that I have no background programming with VB 6.0. To make a long story short, I have been trying to upgrade a VB program (written by someone no longer employed here) from 16-bit to 32-bit. Finally, with the help of a very nice guy named Keith, I have the program running on an XP machine!!!!
Anyway, the program is designed to communicate with a balance (or scale) through the serial port. I have the baud rate, parity, stop & data bits set up properly within the windows device manager. But the program will not communicate with the balance. When the user wants to capture data from the balance they press a "weigh" button within the VB program and the balance responds with the current weight displayed on the balance.
I am able to communicate with the balance via a hyperterminal connection with the settings listed below.
Baud = 2400
Parity = Even
Stop Bits = 1
Data Bits = 7
Flow Control = None
Emulation = Auto Detect
Backscroll buffer lines = 500
Send line ends with line feed (checked)
Echo typed characters locally (checked)
Force incoming data to 7 bits ASCII (checked)
Wrap lines that exceed terminal width (checked)
All I know about the balance interface is that in order to receive information from the balance you must send the character 'S' and the balance will return a string that must be parsed.
I will post some code in a .txt file below. If you need any other code, please let me know! Any help would be appreciated.
Last edited by spyderturbo007; Jan 31st, 2005 at 02:01 PM.
Reason: Problem Resolved
-
Jan 24th, 2005, 04:27 PM
#2
Re: COM Communication Problems
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jan 25th, 2005, 07:55 AM
#3
Thread Starter
New Member
Re: COM Communication Problems
I read the article, I don't understand much of it, but research doesn't bother me). The only problem the link to the complete document is broken But thanks for the link!
-
Jan 25th, 2005, 09:19 AM
#4
Re: COM Communication Problems
Someone sent me that link a long time ago. I never used it, but it looks promising. I was able to read the page just fine. Which part is broken?
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jan 25th, 2005, 10:16 AM
#5
Thread Starter
New Member
Re: COM Communication Problems
At the top is says
Download the author's complete paper, "LabView Peeking and Poking Using Windows NT,"
The link for the complete paper is broken (It's a zipped word document).
Do you know why the conversion from 16-bit to 32-bit would cause the interface to stop working?
-
Jan 25th, 2005, 10:39 AM
#6
Re: COM Communication Problems
Presumably, you can go out and download the shareware TVic component. I was thinking this may help you communicate with serial ports.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jan 25th, 2005, 11:41 AM
#7
Thread Starter
New Member
Re: COM Communication Problems
I was able to solve "part" of the balance problem. I had to modify the parameters of the MSComm control (using the telephone icon within the object window). Apparently the VB settings are independant of the global windows settings. I can see that the balance is responding with the appropriate information (the display flashes when the information is sent) but the weight is not being displayed in the VB program. The program just waits???
I don't know if the program is having problems interpreting the information sent, or is just not displaying it in the correct place.
I am posting the entire program code below. Any help would be appreciated.
Thank You.
Last edited by spyderturbo007; Jan 28th, 2005 at 08:31 AM.
-
Jan 29th, 2005, 04:09 PM
#8
Re: COM Communication Problems
There is no code. Also, does the scale output text, or is it in some other format. It should be the same as it was before, so if you could post both sets of code, or at least the part of the old program that displayed info, we may be able to help you.
-
Jan 31st, 2005, 02:00 PM
#9
Thread Starter
New Member
Re: COM Communication Problems
I was able to get the program working!!! Thank you to everyone for their help. I would not have been able to get it working if it wasn't for everyone's help! I contaced the manufacture of the balance and they told me that one of my buffer settings were incorrect. I changed this within the VB MSComm properties window and Viola....I works!!
Thanks Again!
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
|