LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delay only one signal (boolean) for 20 seconds so it can trigger a reset.

How do I delay only one signal, boolean data type (could be numerical if needed), for a long period of time, 20 seconds, so it can trigger a reset in several applications.  If I use a time delay, will it delay my entire program if I place it within a seperate for/while loop contained in my program? Or will it just delay the loop it is placed in?

Or am I just completely off when it comes to solving this problem?

Suggestions are appriciated.

Thanks
0 Kudos
Message 1 of 10
(5,562 Views)
Well, It is all in the dataflow. If two loops run in parallel and have no data dependency, they will not block each other. They both will run at their own pace.
 
However, your question is not clear to me, maybe it is just the lingo.
  1. What do you mean by a "signal"? (e.g. a digital Input line? a manual action on a front panel button? A timed event? etc.)
  2. What are the "several applications"? (e.g. are they Independently running executables (not necessarily LabVIEW based)? SubVIs lauched all from within the same LabVIEW instance?, etc.)

How does your program communicate with the "applications? Where do you need the delay? Do you need to send a reset signal and then simply wait to make sure all resets complete or do you want a boolean to be TRUE for a certain time?

So many questions... 🙂

Message 2 of 10
(5,559 Views)
My appologies on the lack of information provided.

The signal I want to delay is an output from a basic trigger. The trigger's input is from a DAQ Assistant.

It is a simple program, the boolean information I want to delay is the 'true' output from the trigger. It will reset 2 Basic Triggers and 1 'Write to Measurements'.

All these things exist in one while loop.

I realize this doesnt answer all questions, but I hope it helps.

Any Suggestions?
0 Kudos
Message 3 of 10
(5,552 Views)

Hi,

 

I believe I am looking for a solution to the same problem. I have a control signal that is being updated roughly 3 times a second. However, I would like to add a delay of approximately one second overall so the control signal gets sent to my hardware one second after it should (if there were no delay).

 

A simple-minded way would be to hard code variables to save the previous 3 control inputs then read them out with the delay. I would rather have something that is a time based delay since that method would depend heavily on the timings in the other parts of my program.

 

Thanks,
Andy

0 Kudos
Message 4 of 10
(5,029 Views)

Hey Andy,

 

You can use functional global elapsed time as in the following example.

https://decibel.ni.com/content/docs/DOC-6523

National Instruments
Applications Engineer
0 Kudos
Message 5 of 10
(5,014 Views)

Hi,

 

I am not really sure how to use this to delay the actuation signal. Right now I have signal x(t) being sent to the hardware, however I want to have signal h(t) = x(t-tau) being sent, where tau is a roughly 1 second dely. I am not sure how to use this method of calculating elapsed time to implement a delay.

 

Thanks,

Andy

0 Kudos
Message 6 of 10
(5,001 Views)

Hi, I have a similar question. I’m using a vision system in LabVIEW to continuously monitor parts as they pass on a conveyor. My issue is when a part is matched to a pattern, a numeric one is outputted, converted to a Boolean expression, which is then activating a DC motor. The problem is the DC motor is only energized for a short time. I want to know, can the DC motor be energized for about 5 seconds after the original signal is activated, without affecting the rest of code?   

0 Kudos
Message 7 of 10
(4,929 Views)

I guess you could put the energizing code in a separate parralel loop, but is this really what you want it to do?  What happens if a part is matched and the motor is still energized?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 10
(4,917 Views)

Hey, I managed to find a way around it using a Case Structure and Shift Register. Basically when the match is detected a Boolean expression is sent to the initialization of the case structure. This sends the motor high and sets the register to 0. When the part leaves the area of interest, the case structure returns to false, where an increment counter is set to increase the shift register up till a certain number. All the while the coil is still energized and is turned off once the shift register is greater than the fixed value. 

Let me know what you guys think and thank you for helping. 

0 Kudos
Message 9 of 10
(4,896 Views)

Sounds interesting.  Could we take a peek at your code?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10
(4,885 Views)