10-14-2008 06:22 PM
Hello,
I've been chugging along with this program for about 4 or 5 months and have been a regular on this forum since the start of the year getting advice. The program is almost at completion (hopefully) The last problem I have it that the responce is fast enough. Or at least that what I think it is.
Ok so this is the operation for the code.
How it is supposed to work
I am using a SCB 96 and PCI-6229. All the sub VIs are available here http://forums.ni.com/ni/board/message?board.id=170&thread.id=357708&view=by_date_ascending&page=2
When "BEEP" is pressed the console button is switched to TRUE. When "signal present" is TRUE, I setup a case statement that will make the "BEEP" button FALSE which also stops the 1500kHz beep.
Whats happen at the moment
However when "signal present" is TRUE the case statement for "Counts End" won't work properly. The case statement continues to read the counter giving an inaccurate reading. There is almost some sort of lag or delay between the time when "signal present" is TRUE and the time when "BEEP" is set to false and the counter is read for "Counts End"
Any suggestions?
Is there a away to trigger some sort of boolean or varible so that when "signal present" is TRUE one can make a loop or case statement run once, and only once regardless of how long "signal present" is TRUE for?
Cheers
10-14-2008 06:23 PM
10-14-2008 09:52 PM
Hello,
I've narrowed the problem down to the fact that the sound beacon sends a square pulse of varying length depending on the distance way from the speaker. The problem is that I want the code to trigger the second the pulse is high, not the duration that the pulse is high for.
Because it runs for the duration that the pulse is high for, it continuously reads the counter giving the wrong answer. Can someone help?
Cheers
K
10-15-2008 02:13 AM
10-15-2008 02:14 PM - edited 10-15-2008 02:16 PM
Hi Kamilan,
Labview has a first call button that will only run once. Although if you need this to work for a second beep you might create a boolean and setting it back when you have determined that the sound has stopped.
10-15-2008 04:07 PM
Hi Jason,
Thank you for the suggestions, but the adding a delay still gives the same result. I did try and use the First call fuction, but it locks the boolean to high.
I'll keep chugging away 🙂
Cheers
10-15-2008 08:48 PM
Hello,
I've solved the counter stopping problem. Now the problem is that the values jsut aren't accurate. Can someone see some flaws in my code
Cheers
K
10-15-2008 08:49 PM
This is an updated version of my code. The added DAQ was to see the time delay between receiving a HI from the sound beacon, and using that HI in the code. The delay ended up being 2ms.
10-16-2008 01:46 AM
Hi Kamilan,
Can you attach the code for lv 8.0?
10-16-2008 08:44 AM