Solved

Serial Communication with MScomm

Posted on 1997-07-10
1
534 Views
Last Modified: 2010-01-13
I am trying to communicate with a serial device called a DataLink(DL). This DataLink is a protocol converter and a communication controller. The purpose of my program is to configure the DataLink (ie. Set the DL's COM and IRQ ect). My problem is this: When I transmit a message in ASCII or HEX (ie: DLE STX ETX .... OR IN HEX 10 02 03.. ect) the DataLink will reply with an "ACK" or "NACK" meaning a correct or incorrect transfer configuration. I am capable of transfer to the DL but cannot seem to be able to capture its response into VB. I have set the RThreshold to 1. I would like to be able to trap the message in a text box with the use of: MScomm1.Input    
        Text1.text = Mscomm1.Input
But this isn't working. Can you help me ? I would appreciate it enormly !
Thanks
Jean-Francois:   francois@intergate.bc.ca
0
Comment
Question by:pussycat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
DavidMartin earned 100 total points
ID: 1428202
Every time data is passed through the Comm Control a comm event is triggered you need to capture your data in there...

Sub MSComm_OnComm()

    'Each time this event is triggered
    'Add the contents of the Reader buffer to the internal buffer
    msBuffer = msBuffer & MSComm.Input

End Sub

You can then build up the message character by character until you are happy that you have a complete message, if I remember correctly this event gets triggered when you send data out so you'll have to code for that as well.

0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel - Save a copy of work book 13 96
Visual Studio 2005 text editor 10 57
TT Auto Dashboard 13 104
how to loop through and process two columns in excel 8 72
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question