ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delaying the response of a ttl input to a labview program

I am having trouble with what seems to be a simple programming task.  I want to place a time delay in the response of the program after it recieves a signal from an external ttl pulse.  I am reading  in analog voltages with a ni 6111 board and generating other voltages using a ni 6723.  The ttl pulse is triggering the ni 6723 to generate voltages during a specific time frame (while the ttl line is high).  I would like to have written in some way to delay this using a control on the front panel. 
0 Kudos
Message 1 of 9
(3,599 Views)
There is a DAQmx Trigger property called Start.Delay and one called Start.Delay Units. The units can be either Timebase ticks or seconds.
Message 2 of 9
(3,586 Views)

Also, be careful using the delay.

You only want to delay the output , you do not want a delay for all of your code,

or the program will run incorrectly 

Message Edited by Cory K on 09-18-2008 02:37 PM
Cory K
0 Kudos
Message 3 of 9
(3,575 Views)

Thankyou for the help.  Although I have explored this solution.  It didn't seem to work properly when I placed it in the program.  I have attached a screen shot of how I have incorporated the delay.  It gives me an error code in the start.vi that the start.delay is not applicable.

0 Kudos
Message 4 of 9
(3,570 Views)
Your image does not match your original description. You said you were using an external TTL signal to trigger the generation of 'other voltages'. You are showing a digital input task. Do you actually have an output task (analog or digital) where you are configuring an external trigger? Or is all of your trigger detection done in software and not DAQmx?
0 Kudos
Message 5 of 9
(3,543 Views)
Sorry for the bad description.  Presently I am using a digital input on the ni6723 and reading continuously in a loop.  If the ttl value is low the 'other voltages' aren't on, but when it goes high they come on.  Is there a better way to accomplish this.  I know that there are to counters inputs and outputs on this board.
0 Kudos
Message 6 of 9
(3,531 Views)
Is it a single digital line that you are monitoring or multiple? The 6723 does support digital triggering and that is what I thought you were using to generate an analog output. There are some shipping examples for externally triggered analog generation. The trigger delay would be placed on the analog out task after configuring it for external trigger. If you stick with the present scheme, then you would probably need to use one of the software delays (i.e. Time Delay). How well this will work is dependent on what kind of delay you want and how precise.
0 Kudos
Message 7 of 9
(3,528 Views)
How do you stick a Time Delay on a task/channel?  In other words does the time delay read the digital input, record it, and add some time delay to the value.  Is there a good example of how this is done?
0 Kudos
Message 8 of 9
(3,522 Views)

You don't stick a time delay function on a task/channel. You stick a DAQmx trigger delay property on an output task that is set for external triggering. A time delay function just goes between your code where you are detecting the correct logic level and where you have your DAQmx Write. I would recomend you use the error clusters to enforce data flow.

 

 

 

Functions such as the Time Delay are pretty basic LabVIEW. Have you had any training or tried the on-line tutorials?

Message Edited by Dennis Knutson on 09-18-2008 08:49 PM
0 Kudos
Message 9 of 9
(3,520 Views)