Solved

Serial Communication with MScomm

Posted on 1997-07-10
1
527 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

831 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