08-08-2011 08:51 PM
I want to stop (pause) a movie when certain condition is false othewise it runs smoothly.
Thanks
Best Regards
Muhammad Abul Hasan
08-10-2011 10:37 AM
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
08-10-2011 02:24 PM
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
08-10-2011 03:03 PM
You use a case structure. See attached...
08-10-2011 09:08 PM
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
08-10-2011 09:54 PM
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.
08-11-2011 06:54 AM
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
08-11-2011 08:48 AM
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.
08-18-2011 03:49 PM
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
08-18-2011 05:08 PM
Here you go based on your logic.