03-01-2010 11:01 AM
I created a virtual vi and added a Timer On Delay block. I added a contant 'True' on the 'input with 5000msec preset time. Added indicators on the output and elapsed time. When I start the vi, the timer
did not run. I was thinking that if you set the input 'True', the timer will starts after you run the vi. CAn you explain to me why the timer did not start? Please see attached file for block diagram
If I add a Control to the input and start VI, after toggle the Control button from false to True, then the timer runs
03-01-2010 11:26 AM
I was unable to open your Word Doc
I tried the function out and it worked as I expected.
The function only works on a rising edge input (going from Fasle to True)
You do have to run it in a loop.
A rising edge input will not show up at the output until the preset time (ms) has passed.
But a failing edge input is not delayed. Use the "Timer Off Delay" to delay a falling edge.
Are you just looking for a delay? Then there are other functions to use.
Are you looking to "hold back" or delay an action based on a boolean input then this is the function to use.
03-01-2010 11:39 AM
So you are saying that the timer will not start unless the input requires changing state from False to True? I am working in Control system for 15 years and never see this before. If I
set a constant True to input to the timer and when the code starts, it automatically start the timer until it reaches the preset time (I am talking about GE 9070, Allen Bradly, Woodward...).
Anyway, what I want to do is when the code starts, I want a delay xxx seconds before energize outputs without touching any button. How can I accomplish this?
03-01-2010 11:48 AM
If you read the Help for this function block (type Ctrl-h and hover over the Timer On Delay) you'll see it generqates an output aligned with the input with a delay. It looks for the input to change. I have a feeling you don't want this function block. If you just want a delay, you might try something from the Timing palette.
03-01-2010 12:33 PM
OK, then your timer will not start unless the input changed state.
Here what I did to accomplish what I want and it works:
After the code is started, I want the VI loop to run but want delay 5 seconds (without operator involve)
before I want to process any output (see attachment).
Let me know if you can open attachment
Thanks
john
03-01-2010 12:52 PM
Are you working on a robot as part of the FIRST program, or is this something else entirely? If this question is not related to the FIRST robotics program, please move this discussion to the appropriate LabVIEW forum. Also, there is no reason to post attachments inside a Word or RTF document. Either attach your VI directly, or paste a screenshot into mspaint (or any other graphics program), save as a PNG, and upload that. It will make it much easier for people to help you.
03-01-2010 12:58 PM
Thanks for letting me know. I am a mentor for FIRST and helping the student to do the autonomous programming. Just curious why you had concern
on what I posted? There is no where in the forum stated that what you can or can't post
Thanks
03-01-2010 01:07 PM
My apologies; my concern was that I haven't seen either of the blocks you're using (the RS Bistable, and the Timer on Delay), despite several years of LabVIEW use and two years of mentoring FIRST teams. I suspect there's a much easier way to do what you want, without needing to dig into the RT Toolkit. Is it possible that the Time Delay Express VI, found under Express -> Execution Control, is sufficient for you? That's easier to use.
03-01-2010 01:23 PM
Well, I really want to make thing easy for the student but I can't find
any other way to do without using the 2 blocks combination. In my control world,
if the timer set to True on input, it will automatically run once the controller started, but this is not the case in Labview (It required the input changing state from False to True).
I was looking in the Express -> Execution Control and found 2 timers (Time Delay and Elapsed Time) and don't think
it will do what I wan to do. If you can point out exact block that can do what I wantthen I would appreciated
03-01-2010 01:33 PM
LabVIEW is very different from programming a PLC, which might explain why I'm having trouble understanding what you want to do. Do you simply need a delay for a certain number of seconds before your code starts running? In that case, the "Delay & Feed" function, found under Watchdog in the WPI Robotics palette (I don't have the FIRST toolkit available right now to get the exact location), will do what you want. Alternatively, the "Wait" function in the timing palette will also work, although it won't feed the watchdog. However, if you want the outputs turned off anyway, then having the watchdog time out won't be a problem.