Discussion:
Need some help with stopping a pulse
(too old to reply)
fadhil
2008-08-06 14:40:10 UTC
Permalink
Hi, so me and my friend had just made this project:<img src="Loading Image..."> How it works is like this:When the input DAQ's voltage is 3.7, it will trigger the output DAQ(vibrator), which will make the vibrator pulse.But the problem me and my friend is having is this:For the pulse to work, it needs to be in the while loop. But since its in the while loop, it will never stop, even after the voltage has dropped below 3.7v.Is there any way to stop/reset the pulsing?Thank you in advance.
Broken Arrow
2008-08-06 15:40:06 UTC
Permalink
Read the DAQ data inside the loop, and if &lt; 3.7, stop the loop, the same way you fired the case statement. Or set up a parallel loop to read DAQ data and use local variables or Notifiers to read the data in the other loop.Also, you don't need the sequence structure, the express VI's have error in/out for sequencing.Message Edited by Broken Arrow on 08-06-2008 10:25 AM
fadhil
2008-08-06 15:40:09 UTC
Permalink
How do you use the error in/out function to generate a pulse? (I'm kind of new to labview)
Broken Arrow
2008-08-06 15:40:11 UTC
Permalink
No, that was a different subject.. I was just saying you can wired the error clusters rather than using the sequence structure. This will also help straighten out your coed so we can see it better.
fadhil
2008-08-06 16:10:13 UTC
Permalink
So, to make it stop, I must get rid of the case structure and directly wire the "&gt;=" comparator to the while loop?
Broken Arrow
2008-08-06 16:40:06 UTC
Permalink
:smileywink:..........Not exactly.... if you'll post the actual VI, I'll write you a solution
fadhil
2008-08-06 16:40:09 UTC
Permalink
Ah darn it... the actual vi is at school and I'm at home currently. Can you describe roughly what I should add/do?
Broken Arrow
2008-08-06 17:10:05 UTC
Permalink
This is FAR from ideal... I did it in MS Paint :smileysurprised: because I don't have a DAQ device setup to make the express VI, and I'm too lazy to simulate one, but this is what I mean... If you want to stop the loop predicated on something that the DAQ sees, you have to read the DAQ inside the loop... or do a parallel process (better) but this'll probably work. It'll stop after (or before) the pulse when DAQ drops below 3.7.


f920d.jpg:
Loading Image...
fadhil
2008-08-06 17:10:06 UTC
Permalink
I'll try it tomorrow when I get to school. Thanks for the help :smileyvery-happy:
Loading...