LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing on a DYMO LabelWriter 400- usb?

We have a labview program currently printing labels on an old serial port label writer. We have now bought a dymo LabelWriter 400 Turbo (!) which is connected via USB, and need help on how to start the process of using this printer from labview.
 
I can think of two approaches, either install the labelwriter as a normal windows printer, and use labview to print to it, or use labview to communicate with the USB-device directly somehow.
 
Which approach is the best? Is there any better and simpler way?
 
Dymo has a SDK with sample code for delphi, VB, C++, Access, etc. but I'm not sure any of these examples are useful for labview.
 
Ola
Message 1 of 28
(13,240 Views)
Using USB RAW with VISA is a major pain even if you have full details from the vendor on the protocol. Using the windows printer driver should be a piece of cake. I haven't used the Dymo but I use a Brady label printer. I have a VI that is set to print upon completion and that's about all I had to do. I'm curious about the API that Dymo provides though. If it consists of a bunch of printer control does, you can often get more control over the printing that way. I have another label printer for some bar codes and I create a .txt file with the control codes. When I'm done, I just do a copy of the file to lpt1 with the System Exec function.
Message 2 of 28
(13,227 Views)
Dennis thanks for the help! Dymo has SDK-kit for easy dowload at:   http://global.dymo.com/svSE/Software/LabelWriter_400_Turbo.html    (under developer aid).
 
They have a number of different api's, "low" and "high" level.
I've looked at some of the examples for access, and there seems to be a number of function calls before the job is done. I've somehow lost in this type of programming, I would prefer calls like DymoTextRow(1,"hello world"); DymoLabel(2, "0452323223"); DymoPrint; etc. But I guess its more my lack of experience in programming in these high level systems that causes the problem.
 
But the question is how to handle the printer in labview... What do you think of the idea to use it as normal printer, it exists in Settings/Printers and fax? Can I prepare the data, barcode etc in an arean in labview, and the just say "print this indicator"?
 
The solution you had Dennis with copying a file to lpt1, can it be done with a USB-printer just as easy?
 
Ola
0 Kudos
Message 3 of 28
(13,212 Views)
Another possibility for printing on a label writer from lab view could be to use activeX to ask another application to print. Anybody having experience on this?
 
Ola
0 Kudos
Message 4 of 28
(13,211 Views)

Since it appears that they provide an ActiveX (Com) interface to the printer, you could use the ActiveX functions in LabVIEW. This would involve calling it's various methods and properties and is certainly possible but a bit tedious. If you wanted to call another application to print, it might be done by importing the VB example into Word as a VBA macro. You would still have to have an ActiveX interface to Word to create the data and invoke the macro. I have no experience with this and I'm just speculating. The method I mentioned using with a text file may not be possible. The zebra printer I used had support for a low level language that the printer would recognize and interpret. There were a bunch of commands preceded by a '^' character and I could define font type, size, text, etc. I don't see anything in the Dymo api that is similar.

I would suggest that you first create a LabVIEW front panel with some text that you need to print and just do a File>Print Window. See how it looks. You'll want to set the color of the front panel window to white and will probably have to play around some with the position of front panel controls to get everything to fit onto the label. If you want to print a bar code, see if the printer includes any windows bar code fonts and select one of them for your LabVIEW string control/indicator. You may find that everything looks perfect. When I used the text file method, I had a third-party font package installed. When I printed a label with the windows driver, the printer driver translated the third-party fonts as images and the resolution was fuzzy. With the text file, I could specify one of the printer's internal bar code fonts and the resolution was great.

Message 5 of 28
(13,207 Views)
Now things are starting to work!
I managed to make an activeX based vi that changes the text and barcode of a label and print it. This seems like a good way for the final application, to design the label in dymos own program and save it, and in labview I use the SetField(field, <new text> ) function to change some of the text fields.
I looked at the help for "printing programmatically" and at the bottom "alternative: use activeX", and found the Excel example very useful.
 
In this test I need to start the dymo program first, and open my favorite label, but this should be easy to correct!
 
 

Message Edited by Ola_A on 09-27-2006 10:21 AM

0 Kudos
Message 6 of 28
(13,203 Views)

Ola,

I recently ran into the same problem as you and was wondering if you've had any luck using the SDK Dymo provides? Would you be willing to share any vi's so i can get a feel of how you did this?

I'm new to labview so I'm still trying to figure it out. Any help would be greatly appreciated!

 

0 Kudos
Message 7 of 28
(13,034 Views)
Rickardo, here is an vi we used when trying out DYMO label writer printing. It is maybe more complicated than needed, but use all steps needed, namely:
1. Find dymo-printer to print to.
2. Open premade label-description file.
3. Change data in the label like Field "barcode" ="1234456567"
4. Print a number of copies.
 
(The "Open automation" vi's I see in the program below I don't think is needed)
 
Ola
Message 8 of 28
(13,021 Views)
Ola,
 
Thanks for the response, I really appreciate it. Would you mind sending as Labview 7.1. We haven't upgraded to 8.2 just yet.
 
Thanks again, I think this will solve my problem.
 
-Ricardo
0 Kudos
Message 9 of 28
(13,004 Views)
My labview couldn't save earlier than 8.0, so I give you screendumps of the program instead.
You need to install the printer normally, and check that Dymos label design program can print. This should be all needed to install the activex-addons we use in the program. The developer SDK does not need to be installed, I think, but there you can find info about the functions to use. Look for Dymo.IDymoAddins1, ...2 etc. and compare with our example.
 
Good luck!
 
0 Kudos
Message 10 of 28
(12,983 Views)