Discussion:
Timer for DAQx triggers.
(too old to reply)
Kamilan
2008-06-19 00:10:08 UTC
Permalink
Hello,

 

I am new to labview, and have just touched on the basics. Currently I am using the National Instruments SCB-68 I/O unit. I have already drawn some code to output a digital hi (5V) and accept an analogue input of 0.6V.

 

I have a wireless door chime that uses radio frequency. Instead of pushing the door chime button manually, I have wired it up to that the SCN-68 triggers the button using the 5V hi. When the chime receives the signal, instead of the "Ding Dong" I've wired it so that in outputs into the analogue input of the SCB-68 (which is 0.6V). This part works fine.

 

I have set it up to that I a Boolean button has to be pushed in order to trigger the door chime, and have a Boolean response (output) when the 0.6V is detected. Can someone help me make a timer that will start with a push button and stop when the 0.6V is detected?

 

Thank

 

Kamilan
FieldKam
2008-06-19 19:10:07 UTC
Permalink
Hello, You essentially want to use event-driven timer.&nbsp; You will need to make your initial boolean button push (the one that triggers) start your timer, and you will need to have the value change of the acquired voltage as an event that will cause the time to stop.Another user has posted an example called "Stop watch.vi" on <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=251991" target="_blank">this thread</a>. It is important to keep in mind that a software timer does not offer the accurate timing or determinism that a Real-Time system would.&nbsp; If you are looking for an accurate time, please keep in mind that your processor's other tasks may delay the event detection or starting/stopping of the count. Thanks for sharing your application!Have a great day!
Kamilan
2008-07-14 21:40:06 UTC
Permalink
Hello,
&nbsp;
I've been trying to understand the "stopwatch" program you have suggested. I have one problem. I have tried to modify this code and I can start the timer alright. It just will not stop when there is a voltage change. Can you help?
&nbsp;
Cheers.
&nbsp;
K
FieldKam
2008-07-15 20:10:07 UTC
Permalink
Hello, You need to make sure that the Event is associated with the indicator that is displaying your voltage, so that when the indicator's value changes, the timer starts.&nbsp; This was meant to be an example, not the actual VI that you should be using.&nbsp; What you need to do is right-click the structure when the START case is visible and select Edit Events Handled by this Case.&nbsp; Make sure that you select the value change of your voltage variable/indicator as your event.&nbsp; Please let me know whether this works for you!
Kamilan
2008-08-07 02:40:05 UTC
Permalink
Ok,
&nbsp;
I've been trying for weeks now to&nbsp;build an event based timer with the&nbsp;SCB-68 and labview. So far it will time, but its buggy and has to stop when done counting. Can someone please wrtie some code for me, so that the SCB-68 outputs a digital Hi using the DAQx, and starts the &nbsp;timer, and then stops with a Hi is received&nbsp;with the&nbsp;DAQx on another address.&nbsp;The timer must be able to count in milliseconds.
&nbsp;
Can some please help before I go mad!
&nbsp;
Cheers
&nbsp;
About to go Mad K
&nbsp;
&nbsp;

Loading...