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: 

VI hangs 4 activex components

hi there

 

This is a VI i set up for viewing 4 video simultaneously and doing other small manipulation.i tried running it but the systtem hangs up and goes to restart mode after playing the videos for sometime.i am just a normal labview user so the code is not optimized at all.Please find a solution for it and give me suggestions to optimise it too..

PS: i have  used a Movie player pro active X component.

 

 regards

sankar

0 Kudos
Message 1 of 3
(2,800 Views)

You have inserted the Active X objects into the front panel; however, you do not make an Automation Open Call to the Active X object.

Also, I do not see an Automation Close Call upon stopping the VI.  If you do not properly open and close the Active X components, LabVIEW will try and maintain handles to the objects.  This can sometimes result in the LabVIEW application "hanging."  Also, you should try using shift registers to pass the refnums through the while loop and into the respective states.

 

I have attached a small example to show you what I mean.

CLD | CTD
LabVIEW 2011 SP1 | TestStand 4.5
0 Kudos
Message 2 of 3
(2,712 Views)

CCornish wrote:

You have inserted the Active X objects into the front panel; however, you do not make an Automation Open Call to the Active X object.

Also, I do not see an Automation Close Call upon stopping the VI.  If you do not properly open and close the Active X components, LabVIEW will try and maintain handles to the objects.  This can sometimes result in the LabVIEW application "hanging."  Also, you should try using shift registers to pass the refnums through the while loop and into the respective states.

 

I have attached a small example to show you what I mean.


Wrong!  When you place an ActiveX control on the front panel there is no need to do an Automation Open nor Automation Close.  Automation Open and Close are needed for ActiveX objects that cannot be placed on the front panel but can be created dynamically.  Look through the NI examples: compare "ActiveX Event Callback for IE.vi" with "ActiveX Event Callback for Excel.vi" in the example finder to see the difference.

0 Kudos
Message 3 of 3
(2,707 Views)