LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean crossing question

Solved!
Go to solution

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.

0 Kudos
Message 1 of 32
(5,578 Views)

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

Message 2 of 32
(5,569 Views)

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.

0 Kudos
Message 3 of 32
(5,563 Views)

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.


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
Message 4 of 32
(5,552 Views)

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

Message 5 of 32
(5,545 Views)

I'm so confused, I thought I would be using the boolean crossing pt2pt.

0 Kudos
Message 6 of 32
(5,533 Views)

so how to I implement this to only happen once and then go into saving my data?

0 Kudos
Message 7 of 32
(5,522 Views)

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

Message 8 of 32
(5,517 Views)

how to I get the boolean crossing to only happen one time?

0 Kudos
Message 9 of 32
(5,511 Views)
Solution
Accepted by topic author glskinner

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.

Message 10 of 32
(5,498 Views)