Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   How do I program a relay to turn on and off by pressing a button on the joystick? (http://www.chiefdelphi.com/forums/showthread.php?t=73132)

eweathers 28-01-2009 17:11

How do I program a relay to turn on and off by pressing a button on the joystick?
 
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.

Geekzilla201 28-01-2009 19:32

Re: How do I program a relay to turn on and off by pressing a button on the joystick?
 
LabVIEW or WindRiver?

Boydean 28-01-2009 22:14

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.

AndrewN 28-01-2009 22:29

Re: How do I program a relay to turn on and off by pressing a button on the joystick?
 
1 Attachment(s)
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.

TotalChaos 28-01-2009 22:34

Re: How do I program a relay to turn on and off by pressing a button on the joystick?
 
Quote:

Originally Posted by eweathers (Post 809894)
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.

First off, welcome to ChiefDelphi!

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


All times are GMT -5. The time now is 08:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi