08-12-2016 01:32 AM
So I received 2 analog input through NiMyrio and i did a true/false case for if both signals together bigger than the trigger point as i set it will go into the true case .
The problem because both signals are matched with the comparison for very quick time it means the true case will happen according to that time which is too fast . After that time it will change to false case cuz the signals not matched the comparison anymore.
So the case doesnt give me enough time to perform the function inside the case. (example i want to number 5 decrements to number 1 in 5 sec but it couldnt be done cause the case will turn to false case as the true case happening very fast)
There is nothing to do with the signals , their charesteristics behave that way so
I wonder is there anyway i can hold the case for enough time to perform the function inside as the true case happening too fast according to the signal.
I have tried ''Time delay'' and ''Wait until next multiple" .They can hold but simultaneously freeze the program as well which is meaningless cuz it also freeze the function inside that i want to perform.
TO summary i want to hold (not freeze) the true case and do the function inside at that holding time as described in the pics
Thank for your help
Solved! Go to Solution.
08-12-2016 01:40 AM
Labview is dataflow based.
-There's no point in telling True case executes fast or slow. It depends on code inside that case how much time it takes to execute.
-If the code inside your TRUE case is executing and you want to delay it, using time delay is the option.
-It's freezing because something else.
-How much did you give delay?
-If possible post vi/snippet not image. If you don't know how to create snippets : http://www.ni.com/tutorial/9330/en/
08-12-2016 01:52 AM
Thanks for your quick reply
So i have question : During the delay time , the code inside the case will work ? Or during the delay time , the case will be holding and the code inside not working ?
08-12-2016 02:02 AM
Here's what happens:
-Once the case entered, the delay time let's say you keep for 100ms
-If the remaining part of code executes in scenario1:50ms and scenario2: 150ms
-In scenario 1:Because of delay time, the case will hold for 100ms-50ms=50ms
-In scenario 2, the code will move after completing it's code.
-So what the delay time ensures is the case will hold minimum of 100ms.
-Delay time is just pointer to clock and during this time also code executes.
08-12-2016 02:06 AM
'' Delay time is just pointer to clock and during this time also code executes.''
This is what i want to hear , thank you so much for help u jz help me advance further step for my project .
08-12-2016 02:21 AM
08-12-2016 02:55 AM
thanks for your concern . As i need to trigger both values so i did AND for them . Gladly it worked somehow for my application. anw thank you again