|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Joystick Button One-Shot (a.k.a. Rising Edge) Detection
Quote:
|
|
#2
|
|||||
|
|||||
|
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.) |
|
#3
|
|||
|
|||
|
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! |
|
#4
|
|||||
|
|||||
|
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 |