rowenab
asked on
How to send characters to a pole display using Microsoft access
Hi.
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.
RowenaB
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.
RowenaB
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_Star t 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_NormalDisplayM ode)
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
In a module: paste this
Global Const constPD_VerticalScrollMode
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_Star
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_NormalDisplayM
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
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("Desc ription")
s = UCase(s)
CommForm.commPD.Output = s
If Len(s) < 20 Then
Call PD_LineFeed
Call PD_Return
End If
s = "$" & Format(LOCAL_LedDetail_Dat a("LedSold Price"), "#,###.00")
If glbMinusValue = True Then
s = s & "-"
End If
If LOCAL_LedDetail_Data("LedQ TY") > 1 Then
s1 = "x " & LOCAL_LedDetail_Data("LedQ TY")
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
'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("Desc
s = UCase(s)
CommForm.commPD.Output = s
If Len(s) < 20 Then
Call PD_LineFeed
Call PD_Return
End If
s = "$" & Format(LOCAL_LedDetail_Dat
If glbMinusValue = True Then
s = s & "-"
End If
If LOCAL_LedDetail_Data("LedQ
s1 = "x " & LOCAL_LedDetail_Data("LedQ
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
RowenaB
Well, it was just a longshot - sometimes the obvious is missed.
Cheers,
Mike
Well, it was just a longshot - sometimes the obvious is missed.
Cheers,
Mike
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
Sorry..... that's just the way it is.
Scott C
Further...
You guys should have been around before Windows....
A lot was this way
Scott C
You guys should have been around before Windows....
A lot was this way
Scott C
http://www.logiccontrols.com/web/prodCustDtech.htm#q2
<
...
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
MSComm1.Output=Chr$(31)+Ch
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.>