|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
Theres also a VI in the OpenG toolkit, (can be acquired through the VI Package Manager) which is called "Boolean Trigger" it takes a boolean in, and has a rising edge and falling edge output. I never much liked Feedback nodes... They make it difficult to comprehend whats going on. To me a shift register makes more visual sense, despite being functionally the same. |
|
#2
|
||||
|
||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
But in this simple application I like the less real estate that the feedback node uses Posted is another way to implement a Boolean Edge detect that 1075guy speaks of. Omar |
|
#3
|
||||
|
||||
|
Re: Joystick Button Flip Flop
Just in case someone needs a Flip-Flop latch for a boolean.
|
|
#4
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
On the response to keep the limit switch with the motor going value from going less than zero? How do we do that?
Software kids are stumped! |
|
#5
|
|||||
|
|||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Using the "In Range and Coerce" function makes it easy. The attached image shows the True case, where the value is to be limited. The False case simply wires the value straight through without modification.
|
|
#6
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Really frustrated!!! We are close to throwing in the towel. Alan you keep saying this is easy, but we have spent countless hours over the past two years trying to get a switch to stop a motor without any success...it may be easy for all of you in this forum but I guarantee that we are not the only ones having this issue. We have been relying on the graciousness of Chief Delphi and LVMastery to get our robot programmed.
Can anyone write and attach a sample program with ALL of the elements included. Here is what we need: If button 1 is pressed a motor will spin until the limit switch is closed... AND it will not keep spinning even if the button 1 is pressed...AND it will spin in the opposite direction when button 2 is pressed even if the limit switch is closed. We're not trying to cop-out we just need to see and example to understand the thinking behind what we are trying to do. |
|
#7
|
|||||
|
|||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Using a speed controller or a Spike?
Is the motor driven full speed in forward and reverse, e.g., on a Spike? Does button 2 interrupt what button 1 started, or is the button 1 action stopped solely by the limit switch? How do you want to stop after button 2 is pressed? Is there a limit switch at the other end too? |
|
#8
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
Just to clarify- We want a ramp to move UP when button 1 is pressed AND only when button 1is pressed. We want the ramp to go DOWN when button 2 is pressed AND only when button two is pressed. Our issue is we need the ramp to stop when the ramp is all the way down, hence the need for a switch. We don't want to rely on the driver seeing that the ramp is down and letting go of the button in time. The plastic hex output shaft on the Denso window motor is awfully susceptible to shear. Thanks for the help. |
|
#9
|
|||||
|
|||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
|
|
#10
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
|
|
#11
|
|||||
|
|||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Not quite. I suggest that the motor should be set only once at the end of the process, with just the numeric values that will be set going through the case blocks.
It looks like your ramp runs upward with -1 and downward with +1, so the "down" limit should prevent the value from going positive. Using -1 and 0 as the range limits will let it run upward but not downward when the limit input is active. (The three "False" cases at the top are just there to show what's going on in the bottom case blocks.) |
|
#12
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Thanks for the life-ring. I think I understand how this works now.
Can I ask one more question? Can you explain the logic of the In Range and Coerce for this instance. I have read the context help but don't understand how it works in this instance. Thanks again! |
|
#13
|
|||||
|
|||||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
1: It provides an "In Range" boolean output that is True when the value is between the limits, and False when the value is outside the limits. This feature is not used in the code I showed. 2: It provides a "Coerce"d output value that matches the input value when it is inside the limits, but does not exceed the limits in either direction when the input is outside the range. This is how the motor is kept from driving in a particular direction, by making sure the value never goes above 0. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ellipse Finding/Edge Detection Example Code? | brianc217 | NI LabVIEW | 3 | 20-01-2010 08:57 |
| Full solenoid controll off of one joystick button? | m3rc1l3ss | NI LabVIEW | 2 | 11-02-2009 02:06 |
| joystick button | furiousgeorge | Programming | 5 | 07-02-2009 15:57 |
| Ganged Interrupt Edge Detection | cprogrammer | Programming | 8 | 01-02-2008 10:52 |
| More than one joystick from one port | Jmoo | Programming | 3 | 26-06-2003 18:01 |