Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Connectivity
  New Posts New Posts RSS Feed - Communicating to a USB device
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedCommunicating to a USB device

 Post Reply Post Reply
Author
Message
ActivantPD View Drop Down
Newbie
Newbie


Joined: August 15 2007
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ActivantPD Quote  Post ReplyReply Direct Link To This Post Topic: Communicating to a USB device
    Posted: August 15 2007 at 2:52am
Does AccuTerm have any abilities to set and communicate with device connected to a USB port.  I have a need to communicate from our HP-UX PICK application with a Point of Sale Display Pole.

Thanks!
Back to Top
ActivantPD View Drop Down
Newbie
Newbie


Joined: August 15 2007
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ActivantPD Quote  Post ReplyReply Direct Link To This Post Posted: August 15 2007 at 6:14am
OK, I searched through the FORUM topics and found one that talks about what I may need.  It makes use of the bidirect.atsc script.  I am able to open and send data to COM7 where my Display Pole is connected.

Thanks!
Back to Top
Brian Parker View Drop Down
Newbie
Newbie


Joined: January 04 2006
Location: Canada
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brian Parker Quote  Post ReplyReply Direct Link To This Post Posted: April 21 2008 at 1:32am
I need to do sonthing similar - talk to a device attached to a USB port.

How do you know which COM port is assiciated with which USB port?
Back to Top
ActivantPD View Drop Down
Newbie
Newbie


Joined: August 15 2007
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ActivantPD Quote  Post ReplyReply Direct Link To This Post Posted: April 21 2008 at 2:03am
Brian,

The device we are communicating with is an EPSON Display Pole unit used on a Point of Sale register.

We used the EPSON OPOS Software that comes with the unit to map the USB device to a COM port.

Back to Top
Brian Parker View Drop Down
Newbie
Newbie


Joined: January 04 2006
Location: Canada
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brian Parker Quote  Post ReplyReply Direct Link To This Post Posted: April 30 2008 at 1:10am
I have inherited a Pole Display as well. I am able to send to it via an Accuterm but I am having an issue with timing - for lack of a better word.

If there is keyboard input before the script finishes sending to the Pole display it will not display properly. Sometimes what is supposed to be sent to the pole display is displayed on the screen. I have experimented with InputMode and Input. I have tried having the script send an x to the main session when it has started and another x when it has finished and then having a loop in the main program to wait for the x after initializing the script before sending the data that is to be sent to the pole display and then wait for another x before continuing. The number of characters sent to the pole display is always 49 - 2 rows of 20 characters and 9 control characters.

I have included the script below. How did you overcome this issue? Am I doing something incorrect?

Sub PoleDisplay()
Dim Txt2 As String
Dim Can2 As String
   Dim N2 As Integer
   Dim s12 As Session
   Dim s22 As Session
   Set s12 = Sessions(0)
   Set s22 = Sessions(2)
   s12.InputMode = 2
   s22.InputMode = 2
   Can2 = Chr$(25) 'quit when this character is received
   s12.Output "x" & Chr$(13)
Do
     Txt2 = s12.Input(0, 49, 0)
     N2 = InStr(Txt2, Can2)
     If N2 Or Txt2 = "" Then
       If N2 Then s22.Output Left$(Txt2, N2-1)
            'MsgBox(Txt2 & " " & N2)
       Exit Do
     End If
     s22.Output Txt2
Loop
   s12.Output "x" & Chr$(13)
   s12.InputMode = 0
   s22.InputMode = 0
End Sub
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: May 06 2008 at 5:25am
Hi All -

The bidirect.atsc script is mainly used when you need to get input from the device as well as send data to it. In the case of a pole display, it would seem that this is always going to be one way - from host to display. In this case, you can still use a second hidden AccuTerm session that sends data to the display, but your script will be much simpler:
Dim s As Session

Dim txt As String
txt = "stuff you want to display"
Set s = Sessions(2)
s.Output txt
You need to assign the 'txt' variable to the content you want to send to the display, using proper VBA syntax. Also, change Sessions(2) to whatever session is connected to the display.

An alternative might be to configure the pole display as a printer, using the generic/text only printer driver in Windows, and just treat it as a slave printer from AccuTerm. There are some examples of changing the current slave printer using a script on the forum, so that you can have multiple printers - pole display, receipt printer, etc.

Thanks,

Pete
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.