|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help with Zebra ZM400with ZEBRAZM400 and is not working. Could help me to find where is the problem? Description N Q250,1 q800 OFf A160,10,0,2,1,3,N,"" A160,60,0,2,1,3,N,"ARROZ ALMENDROS 2 K" A250,130,0,2,2,3,N,"› 1,355.00" P1 ^ee Barcode N Q160,24 q800 OFf A5,10,0,1,1,2,N,"ARROZ ALMENDROS 2 K" B5,60,0,E30,2,2,30,N,"7441024100018" A5,94,0,2,1,1,N,"7441024100018" A90,115,0,2,1,2,N,"› 1,355.00" P1 ^ee "Junior" <Jun***@discussions.microsoft.com> wrote in message Last I checked, this is a VB group...you know, for Visual Basic? What does news:2FF5EF2A-55FD-4CEE-A5DF-A13FB1C98AE9@microsoft.com... : : I use the code below with almost any Zebra printer, but i am trying to use it : with ZEBRAZM400 and is not working. Could help me to find where is the : problem? : your question have to do with VB? If the answer is "nothing", then you have the wrong group. mmm, your are right. let me explain
Iam working with vb 6 sp5, i use the same code for small zebra printer, but now i have to configure Zebra ZM400, i tried to se the same cone but i each time that i print i only see the character, no barcode, and nothing else. I don't understand why the code is not working with Zebra ZM400. Thankz Show quoteHide quote "Kevin Provance" wrote: > "Junior" <Jun***@discussions.microsoft.com> wrote in message > news:2FF5EF2A-55FD-4CEE-A5DF-A13FB1C98AE9@microsoft.com... > : > : I use the code below with almost any Zebra printer, but i am trying to use > it > : with ZEBRAZM400 and is not working. Could help me to find where is the > : problem? > : > > Last I checked, this is a VB group...you know, for Visual Basic? What does > your question have to do with VB? If the answer is "nothing", then you have > the wrong group. > > . >
Show quote
Hide quote
"Junior" <Jun***@discussions.microsoft.com> wrote in message But the thing is, as has already been explained to you, this is a VB6 news:EE252A79-5135-492A-B5AD-2D85BFDAC069@microsoft.com... > mmm, your are right. let me explain > Iam working with vb 6 sp5, i use the same code for small > zebra printer, but now i have to configure Zebra ZM400, > i tried to se the same cone but i each time that i print i only > see the character, no barcode, and nothing else. I don't > understand why the code is not working with Zebra ZM400. > N > Q250,1 > q800 > OFf > A160,10,0,2,1,3,N,"" . . . etc newsgroup and you have not posted any VB6 code at all. You have posted just a bunch of control codes that you are apparently sending to the Zebra. Your problem may or may not be down to a problem in your VB6 code, but since you have not posted any VB6 code then we have know way of knowing whether you are sending the data correctly or not. In fact, in view of what you have posted, the problem is quite likely to be simply that you are sending the wrong codes to the ZM400, causing it to fail to perform the task you are expecting it to perform. I've just had a look at the Zebra printer manual download site and there appear to be a number of different user manuals for the quite large number of printers they produce, indicating that there are indeed some differences between them, some of which may or may not include differences in the codes required to set them to your desired printer emulation or whatever. What you really need to do is download the user manual appropriate to your own specific ZM400 model and determine from that manual what codes you need to send to the ZM400 in order to produce the output you are after, and then check the data you are actually sending to see if it is the same. If you are very lucky them somebody here who actually uses a Zebra printer of the same model you have might be able to tell you if the codes you are apparently sending to it are correct, but otherwise you really need to ask in a Zebra forum or newsgroup. If you want to ensure that the "VB6" part of it is correct then you may post your actual VB6 code and people here will tell you whether it actually will correctly send the data or not, but only a Zebra user will be able to tell you for certain whether you are sending the correct data and whether there is anything specific to the Zebra model you are using that might cause problems with that data. Mike "Junior" <Jun***@discussions.microsoft.com> wrote in message Actually, when I said in my previous response that only a Zebra user will be news:EE252A79-5135-492A-B5AD-2D85BFDAC069@microsoft.com... >> I don't understand why the code is not working >> with Zebra ZM400. Thankz able to tell you for certain whether you are sending the correct data to the printer, I might actually have done you a favour there. What I meant of course is that an answer regarding whether or not the data is correct will *most likely* come from someone who uses Zebras themselves and that others would not be prepared to put in the required time to download the appropriate manual and check the required data for you, but of course some people who do not use Zebras but would like to "make a point and prove me wrong" (such as Tom Shelton for example) might very well be prepared to do the donkey work for you just to make a point, so you might actually get an answer from him ;-) Mike Below is my vb 6.0 sp5 code
Code Bar Printer.Print "Q160,24q800OFf" Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K" B5,60,0,E30,2,2,30,N,"7441024100018" A5,94,0,2,1,1,N,"7441024100018" A90,115,0,2,1,2,N,"› 13,55" Printer.Print "P1" Printer.Print "^ee" Printer.EndDoc Description Printer.Print "Q160,24q800OFf" Printer.Print "A160,10,0,2,1,3,N," "A160,60,0,2,1,3,N,"RICE GIANT 2 K" "A250,130,0,2,2,3,N,"› 13,55" Printer.Print "P1" Printer.Print "^ee" Printer.EndDoc Thank you Show quoteHide quote "Mike Williams" wrote: > "Junior" <Jun***@discussions.microsoft.com> wrote in message > news:EE252A79-5135-492A-B5AD-2D85BFDAC069@microsoft.com... > >> I don't understand why the code is not working > >> with Zebra ZM400. Thankz > > Actually, when I said in my previous response that only a Zebra user will be > able to tell you for certain whether > you are sending the correct data to the printer, I might actually have done > you a favour there. What I meant of course is that an answer regarding > whether or not the data is correct will *most likely* come from someone who > uses Zebras themselves and that others would not be prepared to put in the > required time to download the appropriate manual and check the required data > for you, but of course some people who do not use Zebras but would like to > "make a point and prove me wrong" (such as Tom Shelton for example) might > very well be prepared to do the donkey work for you just to make a point, so > you might actually get an answer from him ;-) > > Mike > > > > . > On 11/08/2010 00:00, Junior wrote:
> I use the code below with almost any Zebra printer, but i am trying to use it If it's really a VB question...> with ZEBRAZM400 and is not working. Could help me to find where is the > problem? http://hashvb.earlsoft.co.uk/User:Dee/It_doesn%27t_work%21 -- Dee Earley (dee.ear***@icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.) mmm, your are right. let me explain
Iam working with vb 6 sp5, i use the same code for small zebra printer, but now i have to configure Zebra ZM400, i tried to se the same cone but i each time that i print i only see the character, no barcode, and nothing else. I don't understand why the code is not working with Zebra ZM400. Thankz Show quoteHide quote "Dee Earley" wrote: > On 11/08/2010 00:00, Junior wrote: > > I use the code below with almost any Zebra printer, but i am trying to use it > > with ZEBRAZM400 and is not working. Could help me to find where is the > > problem? > > If it's really a VB question... > http://hashvb.earlsoft.co.uk/User:Dee/It_doesn%27t_work%21 > > -- > Dee Earley (dee.ear***@icode.co.uk) > i-Catcher Development Team > > iCode Systems > > (Replies direct to my email address will be ignored. > Please reply to the group.) > . > On 12/08/2010 17:07, Junior wrote:
> mmm, your are right. let me explain That still amounts to "it doesn't work.> Iam working with vb 6 sp5, i use the same code for small zebra printer, but > now i have to configure Zebra ZM400, > i tried to se the same cone but i each time that i print i only see the > character, no barcode, and nothing else. > > I don't understand why the code is not working with Zebra ZM400. > Thankz Please try elaborating (And as you didn't read it: http://hashvb.earlsoft.co.uk/User:Dee/It_doesn%27t_work%21) -- Dee Earley (dee.ear***@icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.) Below is my vb 6.0 sp5 code
Code Bar Printer.Print "Q160,24q800OFf" Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K" B5,60,0,E30,2,2,30,N,"7441024100018" A5,94,0,2,1,1,N,"7441024100018" A90,115,0,2,1,2,N,"› 13,55" Printer.Print "P1" Printer.Print "^ee" Printer.EndDoc Description Printer.Print "Q160,24q800OFf" Printer.Print "A160,10,0,2,1,3,N," "A160,60,0,2,1,3,N,"RICE GIANT 2 K" "A250,130,0,2,2,3,N,"› 13,55" Printer.Print "P1" Printer.Print "^ee" Printer.EndDoc Thank you Show quoteHide quote "Dee Earley" wrote: > On 12/08/2010 17:07, Junior wrote: > > mmm, your are right. let me explain > > Iam working with vb 6 sp5, i use the same code for small zebra printer, but > > now i have to configure Zebra ZM400, > > i tried to se the same cone but i each time that i print i only see the > > character, no barcode, and nothing else. > > > > I don't understand why the code is not working with Zebra ZM400. > > Thankz > > That still amounts to "it doesn't work. > > Please try elaborating > (And as you didn't read it: > http://hashvb.earlsoft.co.uk/User:Dee/It_doesn%27t_work%21) > > -- > Dee Earley (dee.ear***@icode.co.uk) > i-Catcher Development Team > > iCode Systems > > (Replies direct to my email address will be ignored. > Please reply to the group.) > . > Shot in the dark. Does your new printer use USB. Your Printer.Print may not
work with USB printer. > "Junior" <Jun***@discussions.microsoft.com> wrote in message As I've said, I have never used a Label Printer but from the above code it > news:D77A2D83-8788-4644-B111-2EAF3F76F8C8@microsoft.com... > Below is my vb 6.0 sp5 code > Printer.Print "Q160,24q800OFf" > Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K" > B5,60,0,E30,2,2,30,N,"7441024100018" > A5,94,0,2,1,1,N,"7441024100018" > A90,115,0,2,1,2,N,"› 13,55" looks as though you want to send printer control codes and other raw data directly to the Zebra. In fact from a quick look at the Zebra EPL commands in the manual that is downloadable from the Zebra web page it looks as though the first line of your code is attempting to set the Form Length and Form Width and some other options (cut position or whatever). If that is the case then you are not going to do it by Printing your raw data in the above fashion using the VB6 Printer Object. In order to send such stuff (unless Zebra have done something really strange with their drivers) you need to address the printer directly to send raw data to it, completely bypassing the Windows driver. This of course is possible, but it does make me wonder why you said in your initial post that your code worked fine with other Zebras until you got the new Zebra ZM400, because as far as I can judge that page setting code yup have shown us using Printer.Print would not work with any Zebra printer (at least not inasmuch as setting the page is concerned, although it might print the "Q160,24q800OFf" as a straight forward piece of text). So, before we go any further, perhaps it might be a good start if you were to thoroughly check the information you are sending us in respect of your question, before you send it, to make sure that you are telling it "exactly as it is", rather than either embellishing it or missing out something of importance. So, my first question to you is, "Did that EXACT code correctly set the page up properly on your old Zebra printers, or was it really some other code you used that worked"? The answer to this is important because we cannot help you unless you give us accurate information about your problem. One common way of sending raw data to a printer (which is what I am sure you need to do to accomplish your desired task) was to Open the Printer Port for Output (using the same VB methods that opens standard files for output) and then Print data strings to it in the same way that you would Print data strings to a standard file, and then Close the file when you had finished. Are you /sure/ that is not what you were doing with the old Zebra printers when you said your code worked. If that is the case then your code would have been nothing like the code example you have just posted. Also, that method (opening the printer port as a file and writing it to a file) would have worked fine with printers connected via the parallel port, but /not/ with printers connected via a USB port, so if your old Zebra printers were parallel connected and your new ZM400 is USB connected then that would explain why the code you used successfully in the past does not work any more. It still would not explain why you sent us Printer.Print code telling us that "it used to work" when in fact to the best of my knowledge that specific code would never have worked on any of your Zebras and you must in fact have used some other code (probably the File writing code I mentioned). Anyway, on the assumption that your problem is roughly as I have outlined above then you will be able to use the various functions in winspool.drv to send raw data directly to your Zebra printer from VB6, whether it is USB connected or not. Check out the example at the following link: http://support.microsoft.com/kb/154078 Mike Thank you Master it works!!
Show quoteHide quote "Mike Williams" wrote: > > "Junior" <Jun***@discussions.microsoft.com> wrote in message > > news:D77A2D83-8788-4644-B111-2EAF3F76F8C8@microsoft.com... > > Below is my vb 6.0 sp5 code > > Printer.Print "Q160,24q800OFf" > > Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K" > > B5,60,0,E30,2,2,30,N,"7441024100018" > > A5,94,0,2,1,1,N,"7441024100018" > > A90,115,0,2,1,2,N,"› 13,55" > > As I've said, I have never used a Label Printer but from the above code it > looks as though you want to send printer control codes and other raw data > directly to the Zebra. In fact from a quick look at the Zebra EPL commands > in the manual that is downloadable from the Zebra web page it looks as > though the first line of your code is attempting to set the Form Length and > Form Width and some other options (cut position or whatever). If that is the > case then you are not going to do it by Printing your raw data in the above > fashion using the VB6 Printer Object. In order to send such stuff (unless > Zebra have done something really strange with their drivers) you need to > address the printer directly to send raw data to it, completely bypassing > the Windows driver. This of course is possible, but it does make me wonder > why you said in your initial post that your code worked fine with other > Zebras until you got the new Zebra ZM400, because as far as I can judge that > page setting code yup have shown us using Printer.Print would not work with > any Zebra printer (at least not inasmuch as setting the page is concerned, > although it might print the "Q160,24q800OFf" as a straight forward piece of > text). So, before we go any further, perhaps it might be a good start if you > were to thoroughly check the information you are sending us in respect of > your question, before you send it, to make sure that you are telling it > "exactly as it is", rather than either embellishing it or missing out > something of importance. So, my first question to you is, "Did that EXACT > code correctly set the page up properly on your old Zebra printers, or was > it really some other code you used that worked"? The answer to this is > important because we cannot help you unless you give us accurate information > about your problem. > > One common way of sending raw data to a printer (which is what I am sure you > need to do to accomplish your desired task) was to Open the Printer Port for > Output (using the same VB methods that opens standard files for output) and > then Print data strings to it in the same way that you would Print data > strings to a standard file, and then Close the file when you had finished. > Are you /sure/ that is not what you were doing with the old Zebra printers > when you said your code worked. If that is the case then your code would > have been nothing like the code example you have just posted. Also, that > method (opening the printer port as a file and writing it to a file) would > have worked fine with printers connected via the parallel port, but /not/ > with printers connected via a USB port, so if your old Zebra printers were > parallel connected and your new ZM400 is USB connected then that would > explain why the code you used successfully in the past does not work any > more. It still would not explain why you sent us Printer.Print code telling > us that "it used to work" when in fact to the best of my knowledge that > specific code would never have worked on any of your Zebras and you must in > fact have used some other code (probably the File writing code I mentioned). > > Anyway, on the assumption that your problem is roughly as I have outlined > above then you will be able to use the various functions in winspool.drv to > send raw data directly to your Zebra printer from VB6, whether it is USB > connected or not. Check out the example at the following link: > > http://support.microsoft.com/kb/154078 > > Mike > > > > > . > "Junior" <Jun***@discussions.microsoft.com> wrote in message Well I'm sure it does work, but there's no need to call me Master! In fact I news:A002ABA0-8ADD-45BE-B149-5AFAC2BD9E16@microsoft.com... > Thank you Master it works!! would much prefer it if you called me nothing at all and just gave me an honest answer to the question I posed in relation to the Printer.Print code you posted which you told us used to work okay to deliver control sequences to your older Zebra printers :-) Come on, Junior, spill the beans. That Printer.Print code did not work, did it, and it was some other code you actually used, probably opening the port as a file for output? Mike Mike Williams wrote:
Show quoteHide quote > "Junior" <Jun***@discussions.microsoft.com> wrote in message Mike,> news:A002ABA0-8ADD-45BE-B149-5AFAC2BD9E16@microsoft.com... > >> Thank you Master it works!! > > Well I'm sure it does work, but there's no need to call me Master! In fact I > would much prefer it if you called me nothing at all and just gave me an > honest answer to the question I posed in relation to the Printer.Print code > you posted which you told us used to work okay to deliver control sequences > to your older Zebra printers :-) > > Come on, Junior, spill the beans. That Printer.Print code did not work, did > it, and it was some other code you actually used, probably opening the port > as a file for output? > Junior forgot to tell us that Zebra windows drivers can't understand the ZPL II programming statements. There is however a pass-through feature built into these drivers. In onde of my programs I had to use a Zebra and I concatenated all texts to one string instead of using separate Printer.Print for each. Const PassThroughOn = "${", PassThroughOff = "}$" Const StartPosLeftLabel = "^FO60,0" Const StartPosRightLabel = "^FO400,0" Const BarCodePara = "^BCR,200,Y,N,N" Const StartFieldData = "^FD" Const FieldSep = "^FS" Const EndFormat = "^XZ" Printer.Print PassThroughOn & StartFormat & StartPosLeftLabel _ & BarCodePara & StartFieldData & BarCodeData & FieldSep _ & StartPosRightLabel & BarCodePara & StartFieldData _ & BarCodeData & FieldSep & Quantity & Val(txtBatchNo.Text) _ & EndFormat & PassThroughOff Printer.EndDoc Sorry to be late, I was some days off, I just read this thread and thought I should tell you all, because Junior obviously won't. BTW, the same text stored in a file and copied to the printer will work too. You don't need a program, you can start the label print job manually. Helmut.
Show quote
Hide quote
"Helmut Meukel" <NoSpaml@NoProvider.de> wrote in message Thank you Helmut. As I said to the OP, I've never used a Zebra (or any other news:ejWLCp$PLHA.5076@TK2MSFTNGP05.phx.gbl... > Mike Williams wrote: >>> "Junior" <Jun***@discussions.microsoft.com> wrote in message >>> news:A002ABA0-8ADD-45BE-B149-5AFAC2BD9E16@microsoft.com... >>> Thank you Master it works!! >> Well I'm sure it does work, but there's no need to call me Master! >> In fact I would much prefer it if you called me nothing at all and >> just gave me an honest answer to the question I posed . . . > > Mike, Junior forgot to tell us that Zebra windows drivers > can't understand the ZPL II programming statements. There > is however a pass-through feature built into these drivers. In one of my > programs I had to use a Zebra and I > concatenated all texts to one string instead of using > separate Printer.Print for each. > Const PassThroughOn = "${", PassThroughOff = "}$" > Const StartPosLeftLabel = "^FO60,0" [some lines snipped] > Const EndFormat = "^XZ" > Printer.Print PassThroughOn & StartFormat & StartPosLeftLabel _ > [more lines snipped] > Printer.EndDoc > Sorry to be late, I was some days off, I just read this thread and > thought I should tell you all, because Junior obviously won't. label printer) and I didn't know the Zebra Windows drivers had a pass through facility, which is why I told him to send his data directly to the print spooler, which would work on any printer and which clearly worked for him. I would have expected him to answer my question though, considering I had gone to the trouble of answering his. It sometimes bothers me a little that certain people, such as the OP Junior, will ask questions and gladly accept the answers and yet will simply not bother responding to any questions they are asked themselves. It sometimes makes me think whether it is all worth while. Mike
ActiveX EXE Not Execute
How to clone an object ini in app.pth works for xp, best practice for Vista/W7? compile error Only udts defined in public object modules can be coerced ... Make a Backup VB6-rotate form 90 degrees? Class Access Error 32765 Reading keyboard's key names (Internalization) Cleanup remnants |
|||||||||||||||||||||||