Solved

Access 97 send ZPL to clear memory before printing

Posted on 2009-05-14
7
990 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now