?
Solved

Access 97 send ZPL to clear memory before printing

Posted on 2009-05-14
7
Medium Priority
?
1,007 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 

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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

777 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