LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Trinity32244

Rising Edge / Falling Edge and timer delays

Status: New

Two more suggestions

 

There has also been a need for rising edge and falling edge triggers for boolean values instead of having to manually code this in every time.  I know this would take extra memory space but could be turned on or off maybe in the control settings dialog.

 

I also have to manually code in time delay functions because everything I do is in loops with parallel code.  The timers can't execute properly this way and would be nice to be able to use the built-in timing functions instead of hand-coding.

7 Comments
AristosQueue (NI)
NI Employee (retired)

Can you post a picture of the manual code so we are sure we are all talking about the same thing?

crossrulz
Knight of NI

As far as your first suggestion, look up the Boolean Crossing PtByPty VI.


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
wiebe@CARYA
Knight of NI

We're missing some context here...

 

I think this is about PtByPt functions not working in (parallel) loops?

 

In the loop, there's one instance, so each iteration will manipulate previous iteration's PtByPt state.

 

I find the PtByPt functions quite useless for this reason: if I use PtByPt in a class, it becomes impossible to use an array of it's objects...

 

The only solution is to give each PtByPt function an (optional) state in and state out, so we can store it in the class's private data. For now I do this manually for the PtByPt functions I find useful.

Trinity32244
Member

rising_falling_edge_with_time_delay.png

Sorry for the sloppy code.  I just threw something together real quick

wiebe@CARYA
Knight of NI

PtByPt VIs would work just fine. Esp. "Boolean Crossing PtByPt.vi", maybe "Zero Crossing PtByPt.vi".

 

For the timer, "Elapsed Time" would do the trick.

 

For the magic Not Equal and Select combo, simply remove the Select (If T then T else F is a no-op)..

Trinity32244
Member

I should have clarified but all of my functionality would be done with arrays and for-loops.  This is where I don't think any of the other solutions presented would work because it would be reset per iteration.  Unless I am missing something.

wiebe@CARYA
Knight of NI

Ok, so what is the solution you propose?

 

For me:

The only solution is to give each PtByPt function an (optional) state in and state out, so we can store it in the class's private data.

 

But of course you could store the state in a shift register as well...