From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wait on activex component

Hello together,

is there any easy way to

- to wait until an activex component (a printing of a label) is ready?
- give a running activex component enough CPU performance?

I have an application which is a kind of teststand. When a good part is produced, a label has to be printed.
When running some test with the VI to print 10 labels at once, I found that the VI is printing the labels slowely.
When I stop the program, the rest of the labels are printed very fast. So I guess that I need s.th. which holds on until the
activex issue is done. Then, normal LV program can continue.

Thanks, Thomas.
0 Kudos
Message 1 of 15
(4,143 Views)
Hello maximint,
       I recommend that you put a wait in your LabVIEW VI so the thread goes to sleep.  You will have to look into the particular application that you are controlling using ActiveX and see if it sends a notification when the labels are done printing.  It is generally a good idea to include some wait time in your main while loop.  Try experimenting with different wait times and let us know how it works for your application.

Cheers,

NathanT
Message 2 of 15
(4,132 Views)
Thanks for the tip with the WAIT function. I'll try it on next monday and give a feedback.


I tried also to get a feedback from Codesoft after printing, but I got non. May be there's an error in my VIs

Attachment ActiveX Event Callback for Codesoft.vi (28 kb)


Attachment end printing event call back.vi (23 kb)


From my point of view, it should work?!

Thanks.
0 Kudos
Message 3 of 15
(4,122 Views)
Hello maximint,
       I look forward to hearing how it goes.

Cheers,

Nathan
Message 4 of 15
(4,111 Views)
Hi Nathan,

I tested the issue with the WAIT after the print command.
The first print after INIT comes up immediately. Great!
The next prints take aboiut 3,5 sec. That's still too long for production.

What can be done?

Thanks, Thomas.
0 Kudos
Message 5 of 15
(4,109 Views)
Hello Maximint,
     I am glad to hear that the first print comes up immediately, in which VI is the first print called?.  Can you please explain what you mean when you say the next print takes 3.5 seconds?  When do you start timing the print operation?  Does only one label print each time the print button is pushed and the event structure registers the event and calls "TEKLYNX Document Print.vi"?  What is your processor usage during the 3.5 second delay in printing?  What amount of wait time did you end up using?  If possible, please post the subVIs for "test main label print.vi"

Cheers,

NathanT
Message 6 of 15
(4,093 Views)
Hello Nathan,

this first print is called in the VI "TEKLYNX Document Print.vi".
I mean when I press the first time after start up the main VI the button "print",
the label is printed immediately. Then I wait 15sec. or longer and press again the "print" button.
Now it takes about 3,5sec until the label comes out the printer.

Q.: Does only one label print each time the print button is pushed and the event structure registers the event and calls "TEKLYNX Document Print.vi"?
A.: Yes, only one label is print each time the "print" button is pressed. The print is started after the call of "TEKLYNX Document Print.vi"

Now I saw, when I debug the VIs, that the time eclapses in the Document Methode, see attachment.

The processore usage during the 3,5 waiting time is: "system Idle Process" 97%. Then, short before printing, the process lppa.exe goes up to 20%.
The waiting time in production between two prints of label will be about 30sec. The time between calling the vi
"TEKLYNX Document Print.vi" and
print of the label should not be larger than 1sec.

Thanks for your held. Attached again the main VI and all subs. (Hope this works ...)

0 Kudos
Message 7 of 15
(4,081 Views)
Hello maximint,
       Unfortunately, I cannot open any of the VIs in your llb.  Could you confirm that the front panels open for you and then just put all of the subVIs into a zip (compressed) folder? 

It seems like your processor is barely working at all when the System Idle Process is at 97%  I looked up lppa.exe and it belongs to
Teklynx, and is most likely responsible for printing the label. 

I look forward to being able to see your subVIs block diagrams and front panels.  Why does "TEKLYNX Document Print.vi" have a wait value? 

There is obviously something different between the first execution and every other execution of
"TEKLYNX Document Print.vi", we just need to see what changes.

Cheers,

NathanT
Message 8 of 15
(4,066 Views)
We need you to supply your Subvi's with a block diagram so that we can open the whole program.



Joe.
"NOTHING IS EVER EASY"
Message 9 of 15
(4,061 Views)
Hi Joe,

attached the main VI (test main label print.vi) and the subs and a simpe codesoft label to print.
I use LV7.1, Codesoft 7, printer driver Zebra 105SE 300dpi.


Hi Nathan,

the wait time is just a test from my side. I guessed, that I can give the activex application more CPU when I use a wait after the print command.
But there is no difference between with and without wait time.

Thanks, Thomas.
0 Kudos
Message 10 of 15
(4,048 Views)