Solved

Access 97 send ZPL to clear memory before printing

Posted on 2009-05-14
7
984 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

707 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

9 Experts available now in Live!

Get 1:1 Help Now