06-10-2013 02:03 PM
I need some help understanding the boolean crossing ptbypt and I need help getting it to only run once, from low to high. (or false to true) I'm trying to catch a digital input when it goes from low to high. I want to catch the first low to high, then move on into my code. (saving data). Right now I have it measuring data on the 2nd High, I want to change this to capture data as soon as my DI goes from low to high, only once.
Solved! Go to Solution.
06-10-2013 02:10 PM
A feed back node or shift register, the boolean Implies function, and a case structure should be all you need.
Your diagram is so large I have no idea where in there what you have tried may be hiding. Please post a simpliifed version which just shows the part with the problem.
Lynn
06-10-2013 02:14 PM - edited 06-10-2013 02:16 PM
I know I can do it with a shift register, I'm just so new to labview, I'm not sure how. I know there's no crossing in what I just posted, but I'm sure I want to use it. I just don't know how to put it all together for the pt2pt to run once.
06-10-2013 02:25 PM - edited 06-10-2013 02:26 PM
Like Lynn said, use a shift register or feedback node and some really simple logic. I find the feedback node to be much easier to use in this type of case.
06-10-2013 02:34 PM
Crossrulz showed how it can be done a feedback node. Here is how to do it with a shift register. I added some indicators to help you visualize the way it works.
Lynn
06-10-2013 02:45 PM
I'm so confused, I thought I would be using the boolean crossing pt2pt.
06-10-2013 02:54 PM
so how to I implement this to only happen once and then go into saving my data?
06-10-2013 02:58 PM
You can use it if you want. Open the block diagram of Boolean Crossing PtByPt.vi. It is very similar to what has been posted here when you ignore the intialization and the direction options you do not want. It uses Not and AND rather than Implies but the logic is the same.
As a learning tool be aware that most of the VIs which come with LabVIEW can be opened. You can inspect the block diagrams to see how NI did things. If you want to modify something, make a copy under a different name and save is somewhere other than vi.lib so that you do not have problems later. Also be aware that while many of these VIs are well written, there are some which are rather poorly done by today's standards.
Lynn
06-10-2013 03:03 PM
how to I get the boolean crossing to only happen one time?
06-10-2013 03:14 PM
Use a feedback node that will keep track of whether the Boolean crossing had happened before or not. (You could use the output of one boolean crossing as the input of another to detect this.)
Remember Feedback Nodes and Shift Registers keep track of what has happened in the past. You just need boolean logic with boolean functions such as Not, And, and Or, to do the rest.