Results 1 to 2 of 2

Thread: Serial data strings

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Location
    Illinois, USA
    Posts
    85

    Serial data strings

    I'm trying to emulate an old piece of DOS software with a newer VB
    version that I can modify.(while learning VB serial communications)

    So I have been looking at the serial output of the old software with a RS232
    monitor as in this sample: Like: 02 0D 0A 31 32 33 34 35 36 0D 0A(SOT CR LF 123456 CR LF). The code
    I've created produces "31 0D 0A 32 33 34 0D 0A 35 36". I'm trying to
    understand how to get the SOT CR LF in the correct places.

    I'm having trouble finding a simple explanation of doing this from scratch.
    Is this related to a Checksum routine possibly?
    Code:
    Private Sub cmdTest_Click()
    Dim OutTask$
    Dim Textstr$
    OutTask$ = "123456"
    TXString = OutTask$
    frmMain.MSComm1.PortOpen = True
    If Index = 0 Then
    frmMain.MSComm1.Output = TXString
    End If
        If frmMain.MSComm1.PortOpen = True Then
        frmMain.MSComm1.PortOpen = False
    End If
    End Sub
    Any suggestions appreciated
    Last edited by Aaron02; Mar 26th, 2007 at 02:58 PM. Reason: correction

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width