LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop a music when a certain condition is false

I want to stop (pause) a movie when  certain condition is false othewise it runs smoothly.

 

Thanks

Best Regards

Muhammad Abul Hasan

0 Kudos
Message 1 of 12
(2,539 Views)

Hi Abul Hasan,

 

Can you describe what you are trying to do with your VI? Are you controlling the movie with events in LabVIEW? Please post a screenshot or your code if you have begun writing it.

 

Regards,

 

Matt J

Matt J - NI Tools Network
0 Kudos
Message 2 of 12
(2,503 Views)

Dear Matt

Thanks for your reply.

Here I attached a VI file. In that file, a movie is running smoothly. I want to pause a movie when a variable 'a' has value less than 2. In this file I do not add a variable because I dont know how to pause a movie on the basis of variable 'a' value.

Thanks

Best Regards

Muhammad Abul Hasan 

0 Kudos
Message 3 of 12
(2,489 Views)

You use a case structure.  See attached...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 12
(2,484 Views)

Thanks for your reply. Actually I have LABVIEW 9 therefore it isnot possible to open attached file. I made it using a case structure.

If I have three variables 'a', 'b' and 'c' and I want to do the following tasks than what should I do.

1- if a>b movie runs smoothly

2- if a>c movie pause

3- if c>b movie forward or some other tasks

 

Thanks

Best Regards

Muhammad Abul Hasan

0 Kudos
Message 5 of 12
(2,473 Views)

Here is that file saved for LV 2009.

 

For your multiple conditions, is there some order of priority to the conditions?  Like and If Then ElseIf  then ElseIf?  Because it seems like more than one of those conditions could be true at the same time.  In which case you just need to use embedded Case structures.

0 Kudos
Message 6 of 12
(2,467 Views)

Actually there is no specific order. In my case I have three variables andonly three conditions. In last example there are two conditins so we used case structure. For three conditions how I make a bock diagram?

Thanks

Best Regards

Muhammad Abul Hasan

0 Kudos
Message 7 of 12
(2,445 Views)

There has to be an order.

 

Suppose A>B.  And also A>C.  Do you want the movie to run or do you want the movie to pause?  Because it sure can't do both.  At the same time you could also have C>B, which means you also want the movie to fast forward?  You certainly can't do all 3 things even though it is possible for all 3 conditions to be true at the same time.

 

So there has to be an order where if one thing is true, then you stop evaluating and go with that.

 

You can embed case structures so that you can evaluate other conditions inside the false case of the outer most case structure.

0 Kudos
Message 8 of 12
(2,434 Views)

This is the order

 

For three variables A, B and T there are three constants cA, cB and cT.

 

If A<cA movie pause

else if (B>cB OR T>cT) movie size decreases

else if (A>cA AND B<cB AND T<cT) movie runs normal.

 

Please find enlosed a VI file. Here in this file everything is working fine except decreasing of size.

Please help me to find out what is wrong?

 

Thanks

Best Regards

Muhammad Abul Hasan

 

0 Kudos
Message 9 of 12
(2,409 Views)

Here you go based on your logic.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 10 of 12
(2,400 Views)