08-05-2007 06:36 AM
08-05-2007 07:24 AM
08-05-2007 08:08 AM
08-05-2007 08:26 AM
08-05-2007 11:30 AM - edited 08-05-2007 11:30 AM
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
08-05-2007 02:14 PM - edited 08-05-2007 02:14 PM
Of course there are plenty of other ways to do this.
Message Edited by altenbach on 08-05-2007 12:14 PM
08-06-2007 03:27 AM
08-06-2007 10:02 AM
08-06-2007 10:22 AM
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 ?
08-06-2007 11:03 AM
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.