How to send characters to a pole display using Microsoft access

Posted on 2006-11-18
Last Modified: 2011-09-20
I have developed a POS system using Microsoft Access.  As the items being sold or refunded are scanned by a bar code scanner into the program, I would also like this information displayed on the LD9000 Series Logic Controls Pole Display.  The pole display is connected to comm3.  At this point in time I am not sure what code is required by my program to send the discription and cost of the item to the pole display.    Can someone help me.

Question by:rowenab
  • 5
  • 2
LVL 27

Expert Comment

ID: 17974022
The Logic Controls web site has some guidance:

Q. How do I send out characters to my pole display using Visual Basic?

A. Here is a sample code for sending characters via the COM1 port at 9600 baud. Please note that your settings may differ depending on your system configuration.
MSComm1.Comport=1                            ‘ sets port variable to COM1
MSComm1.PortOpen=True                      ‘ opens the port for communication
MSComm1.Settings=”9600,N,8,1”            ‘ sets the protocol to match the pole display
MSComm1.Output=Chr$(31)+Chr$(17)      ' Reset & set normal display model
MSComm1.Output=Chr$(67)                   ‘ sends a sample character to the pole display
MSComm1.PortOpen=False                     ‘ closes the port
If you want more you could contact their tech support team:

 <If you need further information, please e-mail your question to Logic
 Controls' Technical Support team at: or call us
 at 516.248.0400. Phone support is available Monday thru Friday from 8:30am to 5:30pm
  EST.  One of our trained technical staff will assist you with your questions.>
LVL 20

Expert Comment

ID: 17974108
Place an MSComm control on a form.
In a module: paste this

Global Const constPD_VerticalScrollMode As Integer = 18
Global Const constPD_NormalDisplayMode As Integer = 17
Global Const constPD_BrightnessControl As Integer = 4
Global Const constPD_BackSpace As Integer = 8
Global Const constPD_HorizontalTab As Integer = 9
Global Const constPD_LineFeed As Integer = 10
Global Const constPD_CarriageReturn As Integer = 13
Global Const constPD_DigitSelect As Integer = 16
Global Const constPD_CursorON As Integer = 19
Global Const constPD_CursorOFF As Integer = 20
Global Const constPD_Reset As Integer = 31
Global Const constPD_MessageScroll_Start As String = "&H05"
Global Const PD_MessageScroll_Stop As String = "&H0D"
To send text:  create a button and paste this code:  ('commPD' is the name I gave the MSComm control)

'----- force comm port open -------
    If CommForm.commPD.PortOpen = False Then
        CommForm.commPD.PortOpen = True
    End If

'-----  this resets the port ----
    CommForm.commPD.Output = Chr(constPD_Reset)
'---- turns cursor off
    CommForm.commPD.Output = Chr(constPD_CursorOFF)

'---- normal mode ----
    CommForm.commPD.Output = Chr(constPD_NormalDisplayMode)

dim s as string
s = "testing"

'----- sends text to pole display -----
CommForm.commPD.Output = s

'----- sends line feed ---
    CommForm.commPD.Output = Chr(constPD_LineFeed)

'---- send carriage return ----
    CommForm.commPD.Output = Chr(constPD_CarriageReturn)
s = "second line"

'----- sends text to pole display -----
CommForm.commPD.Output = s

the port is still open.  You can close if you wish - but you must open again (see first command in this example)

Scott C

LVL 20

Expert Comment

ID: 17974116
Something else......

'CommForm' in the previous example refers to a FORM OBJECT I created.
The MSComm control doesn't reside on my POS screen (since I use it in various places\forms)

In the module that contains all the constants (previous example) I have this code:

Global CommForm As Form

I created a form that contains only this control and is hidden.
When the program starts up and this form is opened, I code like this

Set CommForm = Forms!frmComm_Objects

Now that the 'control form' is global, I can refer to it in code.

Actually the commands I've described in the previous example all reside in their own procedures.  I call them as I need them, such as:

    Dim j As Integer
    Dim s As String
    Dim s1 As String
    Dim tb As Integer
    '----- force comm port open -------
    If CommForm.commPD.PortOpen = False Then
        CommForm.commPD.PortOpen = True
    End If
    Call PD_Reset
    Call PD_CursorOFF
    'Call PD_VerticalScroll
    Call PD_NormalMode
    s = LOCAL_LedDetail_Data("Description")
    s = UCase(s)
    CommForm.commPD.Output = s
    If Len(s) < 20 Then
        Call PD_LineFeed
        Call PD_Return
    End If
    s = "$" & Format(LOCAL_LedDetail_Data("LedSoldPrice"), "#,###.00")
    If glbMinusValue = True Then
        s = s & "-"
    End If
    If LOCAL_LedDetail_Data("LedQTY") > 1 Then
        s1 = "x " & LOCAL_LedDetail_Data("LedQTY")
    End If
    tb = 19 - Len(s1)
    tb = tb - Len(s)
    s = s1 & Space(tb) & s
    CommForm.commPD.Output = s

Of course, some of this code won't be recognized by you since it's specific to my prog..... but this may get you started.

Scott C


Author Comment

ID: 17985150
for Mike Toole:  I already visited the Logic Controls web site, and thats all the information I got, when I contacted them, they told me they cannot help any further. Thanks for your help.

Clark Scott:
You have certainly pointed me in the right direction.  I don't know anything about modules and calling procedures.  I would have to familarize myself with this type of coding before I can continue with sending characters to the pole display.  If there are any other tips you can give me to help speed up the process, I would greatly appreciate it.  Thank you for all your help
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

LVL 20

Accepted Solution

clarkscott earned 500 total points
ID: 17985679
Depending on what you want to send to the pole... you may have to 'arrange' your 'pole requests'.

For instance, some times you may want to use the second line of the pole.  In order to do this you need to send a LINE FEED and a CARRIAGE RETURN.

Click on MODULES and select NEW.

In the first screen (Declarations) paste the list of CONSTANTS in my last comment.

At the bottom of the list......

type -

Sub PD_Reset()        (then hit <enter>).  The screen will look like this.

Sub PD_Reset()

End Sub


In between the Sub - End Sub  type

Sub PD_Reset()
-----  this resets the port ----
    CommForm.commPD.Output = Chr(constPD_Reset)

End Sub

To create another sub, simply drop down BELOW the End Sub and do another one.  You can have as many Subs\Functions as you like.

When you click the SAVE button, Access will ask you to NAME THE MODULE.  You can give this any name.  You will NEVER use the Module Name in code.  You WILL, however, use the SUB\Function name.

You can build as many subs\functions in as many separate MODULES as you like.  There is no heirarchy in these... they are all 'equal'.  The advantage of using several MODULES (instead of placing all your sub\functions in a single module) is simply for organizational purposes.

Do this for each of the commands I showed you.  When you need to send this command to the pole, simpy call the sub

call PD_Reset

ps (PD = Pole Display)

Obviously, I cannot give you an entire Sub\Function class in this space.... but I hope this gets you in the right direction.

Scott C
LVL 27

Expert Comment

ID: 17994621
Well, it was just a longshot - sometimes the obvious is missed.
LVL 20

Expert Comment

ID: 17999891
Hey, it's a comm device and they sent all the required information.  There is no simply "send text to pole" command.  Just like any other PLC type instrument, you have to deal with it in it's terms.

Sorry..... that's just the way it is.

Scott C
LVL 20

Expert Comment

ID: 17999896

You guys should have been around before Windows....
A lot was this way

Scott C

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now