Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access 97 send ZPL to clear memory before printing

Posted on 2009-05-14
7
Medium Priority
?
1,013 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

636 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