Help with serial Communication!!!

M

MusMou

Hi,

I´m writing an app. In access 2000 the app. Will comunicate via COM1 with a
device witch reads barcodes.
While reading the barcodes they will be added to an access database, I´m
very familiar with Access.

If you can please give me easy example of how to:

1. convert from decimal to hexadecimal and vissversa and where can I
find detailed info about it.

2. Output a command to the device ex. how can I send the following
characters: Ctrl+B FF CR 1 Ctrl+C 1 (without spaces)
and get the answer from the device into a string variable because the values
and numbers are in hexadecimal-form and transmitted as strings.

I´m using XMCommVBA.XMComm, I can open and close the Com1 and set the
settings as shown in the following example:

Private Sub ComOpen_Click()

On Error GoTo Err

Me.MSComm.CommPort = 1
Me.MSComm.Settings = 9600 & "," & "N" & "," & 8 & "," & 1
Me.MSComm.InputLen = 0
Me.MSComm.RTSEnable = True
Me.MSComm.PortOpen = True
Exit Sub

Err:
MsgBox Err.Number & " " & Err.Description
Me.MSComm.PortOpen = False
Exit Sub
End Sub

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top