Solved

Access 97 send ZPL to clear memory before printing

Posted on 2009-05-14
7
996 Views
Last Modified: 2013-12-19
Hi All,  I need to send code to a zebra print on LPT1 to clear the memory before printing.  I have not been able to get the application to send the code to the printer.  I get an error 52 bad file name or number.  Any ideas how to correc this?
Dim ClearMemory As String
    
    ClearMemory = "^XA^MCY^XE"
    
    Open "LPT1:" For Output As #1
    Print #1, ClearMemory
    Close #1

Open in new window

0
Comment
Question by:Johnsonbaugh
  • 4
  • 3
7 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24390403
Lets take this step by step.

1. Are you sure the printer is installed and configured properly?
Are all the latest drivers and updates installed?

2. What make you think you need to "Clear the memory"?

3. Are you sure it is even possible to "Send code to the "Printer" to "Clear Memory"?

4. Can you explain what each line of you code is supposed to be doing.

Thanks

JeffCoachman
0
 

Author Comment

by:Johnsonbaugh
ID: 24394841
The zebra printer is connected to a PC I can print from an AS/400 session to the zebra and from the PC to the zebra.  what is happening is when printing from the AS/400 it does not clear out the data that was sent, so when i print from the PC it print what came from the AS/400 and prints the data from the PC over top of that.  Hope this helps on what is happening.

1.  Yes i got it installed correctly

2. Due to the printing of data from both AS/400 and PC over top each other.

3. I got the code from a manual for the Zebra and tried to send it.

4. Line one i am setting up a variable for the message to send
    Line three is the codes for the Zebra to clear the memory.  I did have the one character wrong the E on the end should be an X.  I mistyped it, sorry.
    Line five is opening the connection to the printer to send the message to
    Line six sends it to the printer
    Line seven closes the connection and file

I hope that this helps.  Thanks Jeff
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24399258
OK,

Just for informational purposes...
If you power down the printer and power it back up, does that clear the memory?

This link looks promising:
http://www.fixya.com/support/t1637990-clear_memory_zebra_gk420d

Here is a good reference Link:
http://filedb.experts-exchange.com/incoming/2009/04_w17/131400/as400-print-setup.pdf

JeffCoachman

0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:Johnsonbaugh
ID: 24399360
Yes, powering it off and on clears the memory.   The setting is MCY (MAP Clear) in the Zebra to clear that memory.  I need to send this to the Zebra before the label from the PC.  The model I am working with is a Zebra ZM400.

Thanks
Darryl  
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 24400910
See the links I posted earlier.

Also see this one, Particularly near the bottom when it is mentioned that the tilde sysmbol(~) may need to be used instead of the caret symbol(^)
http://www.tomshardware.com/forum/18084-3-zebra-code-clearing-buffer-question
0
 

Author Closing Comment

by:Johnsonbaugh
ID: 31581648
Changing to the tilde(~) worked instead of the caret(^).  Thank you very much.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24413632
Great!
;-)
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

766 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