none
"It is not initialized." when trying to PrintNormal

    Question

  • Visual Studio 2008, Visual Basic, POS for .net 1.12, Epson Receipt Printer TM-U200PD.

    The printer is a few years old, but when setting it up using the Epson utility, it is selected simply as a generic POSPrinter and is identified as a
    TM-U220D. It is a parallel printer.

    The message is displayed when using Epson's "Check Health Utility" as well as Microsoft's sample for POS for .net. The printer works fine with a functional POS system written in VB6 when using OPOS and Epson's printer language.

    I get the same message when executing the following code:
        Public Sub New()
    
            ' This call is required by the Windows Form Designer.
            InitializeComponent()
    
            ' Add any initialization after the InitializeComponent() call.
    
            myExplorer = New PosExplorer(Me)
            Dim mydevice As DeviceInfo = myExplorer.GetDevice("PosPrinter", "PosPrinter")
            If mydevice Is Nothing Then
                MessageBox.Show("POS Printer not found!")
            Else
                MessageBox.Show("printer was found")
                myPrinter = myExplorer.CreateInstance(mydevice)
                myPrinter.Open()
                MsgBox("Open")
                myPrinter.Claim(1000)
                MsgBox("Claim")
                myPrinter.AsyncMode = True
                MsgBox("asyncmode")
                myPrinter.DeviceEnabled = True
                MsgBox("DeviceEnabled")
                myPrinter.PrintNormal(PrinterStation.Receipt, "This is a test")
            End If
    
        End Sub

    Note that the message boxes have been inserted just for my sanity ... everything executes fine right up through the messagebox for "DeviceEnabled".

    When the program attempts to execute the "PrintNormal" line, I get the following:

    "An error occurred creating the form. See Exception.InnerException for details.  The error is: It is not initialized."

    I've Googled and searched for 2 days, and except for the other thread on the forum with a similar title, found only one other post from a couple of years ago ... and it turns out that op gave up.

    Anyone have any ideas?  I ordered a new printer (a Star) that I should get in a couple of days to try with that printer, on the chance that my problem is because of the age of the printer.

    Thank you.

    Thursday, February 18, 2010 10:20 PM

Answers

  • I finally figured out the problem (while laying in bed this morning). I was using an extension cable from the computer through a parallel cable. Obviously, the extension wasn't wired properly to communicate all commands in both directions to the printer. So using a parallel cable directly solved the problem.

    I've been using this extension for a couple of years using regular windows drivers on parellel printers including the Epsons. However, it is apparent that POS for .net communicates with the printers in more detail, and when it can't get a proper response from the printer sends the message "It is not initialized".

    Just in case anyone is interested ...

    Burnie

    • Marked as answer by burnie74 Monday, March 15, 2010 3:25 PM
    Monday, March 15, 2010 3:24 PM

All replies

  • Im no expert, but when you declare your printer the code should be as follows:

    Dim PosPrinter As Microsoft.PointOfService.PosPrinter
    Dim posExplorer As New PosExplorer
    Dim deviceInfo As DeviceInfo
    
    deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, "PosPrinter")
    PosPrinter = posExplorer.CreateInstance(deviceInfo)

    Thursday, February 18, 2010 10:28 PM
  • Thanks for the response, OuTa-SyNc.

    Actually, the printer is declared at the form level, along with posexplorer (I just didn't show all the code).

    I changed my "getdevice" to match yours, but with the same result ... thanks very much for the response, though.

    I'm wondering if the printer, because it's a bit obsolete, doesn't properly respond to the system as ready ... therefore the "It's not initialized." message.

    Still looking ...
    Friday, February 19, 2010 2:22 AM
  • Hi,

    It's a bit of a long shot but try it with AsyncMode = false, given the age of the printer maybe the service object doesn't support aynchronous printing.

    Also, make sure there's no Windows Printer driver on the same port (although that sounds unlikely in your case).
    Monday, February 22, 2010 8:53 AM
    Answerer
  • Hi Yort,

    Thanks for the reply ... I tried setting it to false, but to no avail. Good idea though!

    I now have a Star TSP100U (USB version), got it yesterday. I'm now struggling with POS for .net with it also, but this time I can only get it to be recognized by the POS explorer ... can't Open it or anything else. It works okay using regular OPOS, so it's something I'm missing in the setup, I guess. (First time I've used Star, always used Epson prior to this.)

    By the way, I would have answered quicker, but even though I checked the box to email me when anyone responds to the post, I got none.

    Thanks again,

    Burnie

    Tuesday, February 23, 2010 6:32 PM
  • No problem, sorry it didn't help.

    I'm not very familiar with the Star stuff, but I know Epson have that SetupPOS utility to you have to use to configure the device before you can use it. Do Star have something similar ?

    Tuesday, February 23, 2010 8:30 PM
    Answerer
  • Star has a registration program called "WEPOS Register" along with some other utilities ... but I know I'm missing something.

    I replaced the "POSPrinter" logical name in the program I listed above with "TSP143U" (the name the register program used). But when I run my test program, I can "find the printer" and create an instance, but I get an "invalid operation" error when trying to open the printer:

    "An error occurred creating the form. See Exception.InnerException for details.  The error is: SMJ WEPOS ServiceObject"

    Which seems to indicate that it knows the service object is there, but it's not correctly configured (or something).
    • Marked as answer by burnie74 Thursday, February 25, 2010 3:19 AM
    • Unmarked as answer by burnie74 Thursday, February 25, 2010 3:19 AM
    Wednesday, February 24, 2010 3:18 AM
  • Still no luck with the Epson printer yet, but got the Star printer going. It seems that as usual, I did something stupid. The USB port number in the port settings didn't match the WEPOS registration port number. Corrected that, and everything is fine.

    I just want to say that I had requested help from Star Micronics technical support and it was super! They responded to first time within an hour (via email). After I sent them back some more info, they again responded in about an hour or so.

    The first message suggested that it might be a USB port mismatch, and indeed it was!

    Burnie

    • Marked as answer by burnie74 Thursday, February 25, 2010 3:19 AM
    • Unmarked as answer by burnie74 Thursday, February 25, 2010 3:20 AM
    Thursday, February 25, 2010 3:19 AM
  • I unmarked the previous as an answer, because the Epson printer problem still hasn't been solved. Sent a request to Epson tech support, but they don't appear to be as fast as Star.
    Thursday, February 25, 2010 3:23 AM
  • I finally received a reply from Epson. It seems that the TM U200 printer is not supported by Epson for POS for .net.

    Sort of what I suspected ... they said that the TM U220 replaced it (obviously), and although they didn't say it specifically, the implication is that the U220 IS supported, so I ordered one. Should have gone on E-Bay and tried to get a used one for testing, but sometimes I'm not too smart.

    Here's the email:

    Dear Burnie, POS.Net does not support the TM-U200 series printer. The TM-U220 replaced the TM-U200.

    Thank you for contacting Epson.

    Time to close this thread.
    • Marked as answer by burnie74 Tuesday, March 02, 2010 9:31 PM
    • Unmarked as answer by burnie74 Monday, March 08, 2010 7:12 PM
    Tuesday, March 02, 2010 9:30 PM
  • Purchased an Epson TM-U220D printer with a parallel port (same as with the TM-U200), and get the same result:

    After installing/uninstalling/reinstalling the Epson OPOS ADK after running the Epson OPOS setup, I run the CheckHealth utility, and still get the response of "It is not initialized" ... I just opened another technical request with Epson ... hope they respond quicker this time.

    I also have a Star TSP100 printer that works fine with POS for .net (except for one of the error situations) a thread for which can be found on this forum labeled "CoverOpen test acting wierd" ... yes, I know, I spelled "weird" incorrectly.

    Burnie
    • Marked as answer by burnie74 Monday, March 15, 2010 3:24 PM
    • Unmarked as answer by burnie74 Monday, March 15, 2010 3:25 PM
    Monday, March 08, 2010 7:21 PM
  • I finally figured out the problem (while laying in bed this morning). I was using an extension cable from the computer through a parallel cable. Obviously, the extension wasn't wired properly to communicate all commands in both directions to the printer. So using a parallel cable directly solved the problem.

    I've been using this extension for a couple of years using regular windows drivers on parellel printers including the Epsons. However, it is apparent that POS for .net communicates with the printers in more detail, and when it can't get a proper response from the printer sends the message "It is not initialized".

    Just in case anyone is interested ...

    Burnie

    • Marked as answer by burnie74 Monday, March 15, 2010 3:25 PM
    Monday, March 15, 2010 3:24 PM