LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I print a label that was created in LabelView

We use LabelView 7.0 (gold edition) from TEKLYNX (www.teklynx.com) to create and print product ID labels. What I want to do, is print a product ID label after the product has pass the qualifying test then only then. Like I said the label is all ready created all I need t do is print qty 1 or more.
 
Here is a program done in basic:
 
‘Create "Document" (Label) object

Dim Lbl As Object

Set = CreateObject ("Lblvw.Document")

 

‘Load label in ReadOnly mode

Lbl.Open("C:\Lvwin70\Shift Act.lbl", True)

 

‘Get printer information

Dim Prt As Object

Dim PrtName As String, PrtPort As String

Set Prt = Lbl.LabelPrinter

PrtName = Prt.Name

PrtPort = Prt.Port

 

‘Get field information

Dim Flds As Object  ‘Collection

Dim Fld As Object

Dim Count As Integer

Dim FldName As String

Set Flds = Lbl.LabelFields

Count = Flds.Count

For I = 1 To Count

Set Fld = Flds(I) 

FldName = Fld.Name

Fld.Value = "abcdef" 

Set Fld = Nothing 

Next

 

‘Print 2 Labels…

Lbl.PrintLabel 2

 

‘Clean Up

Set Prt = Nothing

Set Lbl = Nothing

0 Kudos
Message 1 of 18
(9,677 Views)
I don't think LABELVIEW from teklynx has anything to do with LabVIEW from National Instruments. Could it be you stumbeled into the wrong forum? 😮
0 Kudos
Message 2 of 18
(9,670 Views)
No.  I use LabView to test our product. At current we test a product and if it pass the test the operator uses LabelView to print a product ID label. The problem we run into is that they forget to change the product label when there is new product running thru the line. What I need to do is have LabView select and print the correct label for the product running thru the line.
0 Kudos
Message 3 of 18
(9,669 Views)
Ahh... sorry. I did not notice anything even remotely related to LabVIEW in the original post 😉
0 Kudos
Message 4 of 18
(9,662 Views)

As Altenbach pointed out, Labelview has nothing to do with LabVIEW. However I did a little search on google and found this link. May be you will find it useful.

http://www.teklynx.com/products//labels/labelview_faq.html

Ankita

NI

0 Kudos
Message 5 of 18
(9,639 Views)

My sincere apologies....I overlooked Toro's last post on this thread and misinterpreted Altenbach's comment. It's Friday...what can I say.

Back to Toro's question now : Please elaborate on how you are using LabVIEW to test your product. Since you mentioned that sometimes when a new product is going through the line, the user forgets to change the product label; do you want LabVIEW to identify which product is running through the line and then assign appropriate label to it? If so, what differentiates a new product from the old one. Is it their geometrical shape (our IMAQ and vision software can help with that) ? Or are you wondering how to communicate between LabelVIEW and LabVIEW. Please elaborate more on the problem you are facing and I will do my best to help.

Regards,

Ankita

NI

0 Kudos
Message 6 of 18
(9,621 Views)

If you have a program in Basic that does what you want, you need to convert it to ActiveX calls.  This can only be done by someone that has the LabelView program installed, otherwise the activex methods and properties cannot be selected.

You will need to start with an Automation Refum on the front panel.  Right click on it and Select the ActiveX class of the Label_Application.

Now go to the diagram and add an Open Automation, then an Method node to Open the label template.  You can then add Property nodes to get the document.LabelFields.Count.

Now the hard part.  LabelFields is a collection.  Place a Method node set to Item inside the for loop.  This returns a variant that goes into the Variant to Data with a constant set to LabelField.  From there just drop a Property node and set the Value of each field.

Add the required clean up by closing the label document, quit the label application and close every reference that was created.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 7 of 18
(9,613 Views)
My Thanks to Michael Munroe.
The information you supply helped a lot.
I was able to create a LabView vi that prints any  label create in Label VIew. I have all ready change all our programs to automaticly print a product label once the unit has pass the test. 
0 Kudos
Message 8 of 18
(9,594 Views)
Just this week I started printing labels for Labelview from Labview.  I was told by our IT guy, who is the only one that has used Labelview, that to get an external program to print a label, we would have to write data to a database.  Labelview then watches that database for changes and prints a label when a record is added.  This is very cumbersome, since someone has to open up Labelview, open up the label, then tell Labelview to start watching the database.  I have done Labview/ActiveX applications with other labelmakers(Brother), and it was very clean since it did not require any operator intervention.  Are you saying that Labelview is capable of support ActiveX?
0 Kudos
Message 9 of 18
(9,579 Views)

The current version of LabelView does not sopport ActiveX. LabelView Gold version does sopport OLE Automation a feature that does allow the program to be control form another application.

I use LabView ActiveX and Invoke Node to open the label using its name, select the printer, select the quantaty to print, close the application. See the instruction from Michael Munroe it help a lot.

I have use LabelView for some years now. You can load the data base with all the part numbers of products and the information you want to print on the label (of course you need to set-up the label with the text or barcodes linked to the database) then using LabelView Print enter the part number you want to print then LabelView pull the data that needs to be printed on the label.

I think we can do the same using LabView to select the part number to print the label. I have not try it yeat. The soonest I finish the current project I will start on this new project.

0 Kudos
Message 10 of 18
(9,575 Views)