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?
Any suggestions appreciatedCode: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




Reply With Quote