LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How pausing execution of media player when this Vi closes

Hi,
 
I would like to use a subvi that executes 20 seconds of playing movie with media player and then pauses. For this I succeed writing it.
Next, I would like the vi closes and when the main vi recall the subvi, I want that the movie plays in the state it finished before.
 
Is it possible to do this?
 
Thanks in advance.  
0 Kudos
Message 1 of 4
(2,548 Views)
Hi nousome,
this could be done by setting in the "VI Properties"- dialog the options "Show Front Panel when called" & "Close afterwards..." in the section "window appearance". Then let the video play for 20 seconds, when the VI finishes it closes by itself. After this, all local variables (controls & indicators) which are not connected to the connector pane keep their state until you unload them from memory (close LabView). So you can store the current video position inside the VI and start the video at this point with the next VI- call.
Another good solution to save values inside a sub-VI between VI- calls is an uninitialized shift register. If you have difficulties implementing this lok at the example "Single Execution Uninitialized Shift Registers.vi". I found this in my LV 7.1 but older versions should have this example too.
Hope this helps,
Dave
Greets, Dave
0 Kudos
Message 2 of 4
(2,537 Views)
Hi,

Thanks for your help, i tried your first solution but it didn't work. In my code I open media player, set buster file name, and write autostart and pause when 20 seconds elapsed.
Maybe the fact that I set open media player make the movie play at start each time I call it? 
0 Kudos
Message 3 of 4
(2,517 Views)

Hi dave,

 

I think I have not understood what you say about the first solution you proposed me. It doesn't function.

Can you look at the example for illustration I send you please?

Thanks in advance. 

0 Kudos
Message 4 of 4
(2,484 Views)