|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Basically I want to program a relay connected to relay port 1 to go forward by pressing button 1 (trigger) and go reverse by pressing button 2 on the joystick.
Can anyone help me program this? Thank you in advance. |
|
#2
|
|||
|
|||
|
Re: How do I program a relay to turn on and off by pressing a button on the joystick?
LabVIEW or WindRiver?
|
|
#3
|
||||
|
||||
|
Re: How do I program a relay to turn on and off by pressing a button on the joystick?
First things first. What do you really want to do. Do you want button 1 to make it forward without it being pressed down, and then backward when button 2 is pressed...so all its doing is changing the state. Or do you want it to go one way while you press button 1 and the other way while you press button 2. And its natural would be stopped.
|
|
#4
|
||||
|
||||
|
Re: How do I program a relay to turn on and off by pressing a button on the joystick?
Try something like this example in the Basic Framework:
http://www.chiefdelphi.com/forums/at...d=123319909 8 The "Off", "Forward", "Reverse" are constants created from the input to the relay "Set" VI. The Up/Down arrows on the while loop are "Shift Registers" created using the menu on the while loop border. These are used to contain the current setting of the relay. The T/F selectors are on the Programming Comparison Palette. These allow you to select the old value or the new one based off the buttons. The buttons are obtained using the cluster "unbundle by name" function. There is no button to turn the relay off ... you'll have to extend the example. Don't forget the other cases in the main loop. The example is not complete. |
|
#5
|
||||
|
||||
|
Re: How do I program a relay to turn on and off by pressing a button on the joystick?
Quote:
Second, I've seen this exact question asked a couple of times now. I have and example VI that is documented and shows how to do this. You can download it from my post in THIS THREAD. Good luck! - Austin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I Link a (group of) Joystick button(s) to a motor? | CardcaptorRLH85 | C/C++ | 2 | 22-01-2009 23:23 |
| How to program relay in labVIEW? | frcchile | NI LabVIEW | 1 | 16-01-2009 13:36 |
| Program a motor to turn on and off every other second..... | programmr | Programming | 15 | 29-01-2008 10:14 |
| How fast does the Solenoids turn on and off? | Generalx5 | Robotics Education and Curriculum | 2 | 26-01-2007 01:09 |
| Anyone know how fast the Solenoids on the MINI RC can turn on and off? | Generalx5 | Control System | 1 | 06-01-2007 07:39 |