10-07-2012 10:56 AM
Hi can anyone help me on this please......
Comments and suggestions are welcomed.
Regards,
NKR
Solved! Go to Solution.
10-07-2012 12:32 PM
NKR,
Your outside while loop is completely unecessary. It adds nothing to the program. You also don't need those compund arithmetic's on your Switch A and B booleans.
If you should only stop when A finishes, don't have the output from B drive the while conditional temrinal. Just wire A's elapsed state to the While condition. This way if A is shorter than B, the while loop stops before B finishes. If A is longer, B will finish and the loop will continue until A is done.
10-07-2012 02:31 PM
Hi,
Thanks for your feedback - I tried and the only thing is NOT working as expected is; when A is longer and B is shorter, I don't get any HIGH output to tell me SPRING OVER CHARGED has occured. I only get SPRING CHARGED after timer A completes. Do you know why this is happening?
Thanks,
NKR
10-07-2012 02:52 PM
I can't tell if you have auto reset enabled. If so, you don't want it enabled, as you will only see the indicator blink.
10-07-2012 02:53 PM
Sorry, I was looking at your numeric, not the boolean. Move the booleans into the while loop. There should be a boolean output that time has expired.
10-07-2012 04:29 PM
If you want help, attach your actual VI, not just a picture. Thanks.
I think all you need is a single while loop and a case structure representing the various states. The do a simple state machine. Try it!
10-08-2012 02:47 AM
Hi, the actual VI is attached.
If you want help, attach your actual VI, not just a picture. Thanks.
10-08-2012 03:18 AM
Try the attached.
I still don't understand why you need two timers. You could eliminate the timer B and simply compare the elapsed time of A with the time target of B and turn the LED ON if the elapsed time is greater. (not implemented)
10-08-2012 03:21 AM
altenbach wrote:I still don't understand why you need two timers. You could eliminate the timer B and simply compare the elapsed time of A with the time target of B and turn the LED ON if the elapsed time is greater.
I meant like this.
10-08-2012 03:55 PM
Hi, I agree it works as intended. Thank very much!