LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register

how to use a shift register when i have this problem.
 
problem can find in attached file
 
 
need help here
0 Kudos
Message 1 of 12
(3,515 Views)
You want edge detector? With that you use xor boolean function.
0 Kudos
Message 2 of 12
(3,507 Views)
can u show an example ?
 
 
0 Kudos
Message 3 of 12
(3,506 Views)
...this is an example of edge detector function...
0 Kudos
Message 4 of 12
(3,493 Views)

You havee a value that changes from 0 to 1. For convenience, you need to translate that into a boolean value (e.g. using ">0.5" for example) and use boolean operations for the subsequent algorithm.

The example by Odd-modem above will give you a pulse whenever the value changes (On -> Off, Off -> On) and from your problem description it is not clear in that's what you really want.

Lets assume that you want a TRUE output whenever the boolean value changes from FALSE to TRUE, and FALSE otherwise (TRUE-TRUE, FALSE-FALSE, TRUE-FALSE). Since you need to have access to the previous value (iteration i-1), you need a shift register or a feedback node.

At the end you need to convert your boolean back to a number, e.g. using a "select" node.

Here are two possibilities (make sure to copy the compound node correctly and invert the approriate inputs and outputs (small circles)).

Message Edited by altenbach on 08-05-2007 09:33 AM

0 Kudos
Message 5 of 12
(3,479 Views)

Of course there are plenty of other ways to do this.

Message Edited by altenbach on 08-05-2007 12:14 PM

0 Kudos
Message 6 of 12
(3,467 Views)
the example is very useful.
 
 
i got a problem here. whenever my DAQ send a 5 second digtal high input, and when it turns to low , there is still high input changing my FAN to TELEphone.
 
i had attached the my block diagram
0 Kudos
Message 7 of 12
(3,423 Views)
As I said above, the XOR will give you a pulse whenever the signal changes. If you only want a trigger when it goes low->high, but not if it goes hight->low, you need to use one of my methods. Have you tried?
0 Kudos
Message 8 of 12
(3,378 Views)

yes i did . but it is kanna funny. when a high goes in , it become one shot high , but when he changes from high to low , that moment will give a one shot high . how to not let this happen ?

 

is it different to use buttons and DAQ ?

0 Kudos
Message 9 of 12
(3,369 Views)

The picture you showed of your code shows the XOR version, not my sugestion.

Attach your program! You must have wired something wrong. My code will NOT do that. It does not matter if the input is from a button or from a DAQ device.

0 Kudos
Message 10 of 12
(3,357 Views)