How to send characters to a pole display using Microsoft access

Posted on 2006-11-18
Medium Priority
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: support@logiccontrols.com 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


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
LVL 20

Accepted Solution

clarkscott earned 2000 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

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

578 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