Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 19th, 2004, 01:08 AM
siddhs siddhs is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 siddhs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Reading data from Comm Port

Hi All,

I am a novice in VB development. I want to capture data from one of the Chemical analyzer machines which has it's printer within itself, but it does has a comm port. Now I want to capture data sent by it's comm port on my PC. I have the requisit cable but am not able to receive any data. Therefor I tried writing this script and sent some data using print command from dos prompt on com port. But to my dismay I am not getting connected. If I send data first and then try to connect it says port is open and doesn't let me go ahead. and if I send data and then without using PortOpen try to access the port it says the port is not open.

And if I open port before sending the data then it doesn't let me send the data on the port only. Can somebody help me how to resole this issue. The code is as follows:

MSComm.Settings = "9600, n, 8 , 1"
MSComm.CommPort = 1
PortStatus = MSComm.PortOpen
If Not PortStatus = True Then
MSComm.PortOpen = True
End If
Text1 = MSComm.PortOpen
MSComm.PortOpen = False

Thanks in Advance, Hoping to receive some answer. You can even send me reply directly on my mail ID sidadirat@hotmail.com

Siddhartha

Reply With Quote
  #2  
Old May 19th, 2004, 12:32 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
Try testing your communications with the device using hyperterminal. If you can talk to your machine properly with hyperterminal then work on your code. Maybe the requisite cable isn't
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Reading data from Comm Port


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway