LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I detect the rising edge of a Boolean signal?

I have an alarm signal generated by a comparison function within a vi, which in turn drives the computer speaker to get operator attention. I need the operator to acknowledge (silence) the alarm even though the alarm condition is still present. Another way to look at it is to use a RS flip-flop, but have the Set line effective only on the rising transition. This function seems like a simple one, but I�m stalled on it. I�ve tried a variety of schemes to no avail. Please note that this does not involve sensing a digital hardware input. (There�s lots of information on that issue.) I�m using LV 7.1 with Win 2000. Thanks�
0 Kudos
Message 1 of 10
(12,939 Views)
Just a few boolean nodes and a shift register should do the trick. There are many ways to do this, see for example the attached solution (LV 7.1). I also added a button to undo the cancel operation (reset).

Of course you could make it arbitrarily more complex, e.g. do you want the alarm to remain on even though the alarm condition ceased by itself before the canceling occurred?
Message 2 of 10
(12,939 Views)
I do indeed need the other options, and I've modified the vi. In case you're interested, attached is the modified vi. To clean up the vi, I deleted the while loop and used local variabls. I have noticed however, that I cannot get this vi to work as a subvi. I'd like to know why. Thank you for your response.
0 Kudos
Message 3 of 10
(12,939 Views)
dj143 wrote:

> I do indeed need the other options, and I've modified the vi. In case
> you're interested, attached is the modified vi. To clean up the vi, I
> deleted the while loop and used local variabls. I have noticed
> however, that I cannot get this vi to work as a subvi. I'd like to
> know why. Thank you for your response.

It's interesting that you "cleaned up" the VI by adding
local variables since this is considered bad programming
style. Altenbach's post was right on the money. If you need
to use his code as a sub-VI then you need to make different
modifications. I've attached a LV7.0 version of code that
shows how to implement it as a sub-VI.

--
Michael Aivaliotis
http://mmwis.com
http://forums.lavauser
group.org
http://niweekblog.com


Michael Aivaliotis
VI Shots LLC
Message 4 of 10
(12,939 Views)
Actually I sent the wrong vi. The one I sent was an attempt to get it to work as a subvi. I later realized why it was not working. (It's a long story.) Attached is your program modified to be self resetting. This eliminates the separate reset signal. I appreciate your addition of the First Call function. Learning new things every day...
0 Kudos
Message 5 of 10
(12,939 Views)

Hello! I'm new to the LavVIEW. Can you plz tell me how to  reset the counter to zero once it count to 500 samples?

 

Thanks in advance


0 Kudos
Message 6 of 10
(9,177 Views)

Start with below links to learn about LabVIEW programming then you will come to know.

If you have any specific questions post what you have tried.

NI Learning Center

NI Getting Started

LabVEW Basics

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction

LabVIEW Graphical Programming Course

Using the Context Help Window

LabVIEW Inbuilt Examples

Thanks
uday
0 Kudos
Message 7 of 10
(9,173 Views)

@Chishti wrote:

Hello! I'm new to the LavVIEW. Can you plz tell me how to  reset the counter to zero once it count to 500 samples?



In Windows, the easiest way is to use the Quotient & Remainder and just keep the remainder in the shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(9,161 Views)

Hello! Can you please tell me how to run the counter only for once? My counter keeps counting although I set the condition.

Here's the attached file please find it. 

0 Kudos
Message 9 of 10
(9,136 Views)

Hello! Can you please tell me how to run the counter only for once? My counter keeps counting although I set the condition.

Here's the attached file please find it. 

Download All
0 Kudos
Message 10 of 10
(9,136 Views)