![]() |
solenoid button help
4 Attachment(s)
Ok so our plan is to have a few different types of buttons for our solenoids. For some reason our code inst working and any advise would be appreciated. (the last one is the toggle.vi that is in our teleop)
|
Re: solenoid button help
Are the LED indicators on the cRIO solenoid module turning on?
These are Single solenoids you have defined. Single Solenoids don't go "Reverse" |
Re: solenoid button help
Quote:
|
Re: solenoid button help
Single solenoids are true/false devices.
They are either "On" or "Off" Double solenoids would use "Forward" and "Reverse" |
Re: solenoid button help
Quote:
|
Re: solenoid button help
Quote:
|
Re: solenoid button help
Just change where you use "Forward" to "On" instead
and change "Reverse" to "Off" |
Re: solenoid button help
Quote:
|
Re: solenoid button help
When you continue to hold both buttons 3&4 down at the same time the solenoid module LEDs aren't changing?
|
Re: solenoid button help
Quote:
|
Re: solenoid button help
Disclaimer - I'm not a programmer - but I understand the solenoid:
A solenoid has a normally open and a normally closed condition. If your steady state condition would be the closed (rod inside cylinder) then hitting the momentary button on the controller sends the command to activate and change that state - but when you let go, it will go back to steady state. You could do a number of things to get what you want - use a joystick or switch on the controller rather than a momentary button - so it "stays" in the activated state - or you could program that the button changes the condition from off to on. Push once for out, push again for back in. Probably a bunch more programming options - like I said, that isn't my specialty. |
Re: solenoid button help
Here are two approaches:
1) Incorporate a feedback node to remember what your last choice was. 2) Embed the solenoid Set into two Cases, one for each button, so that it only gets Set when a button is pushed. The False Cases would be empty. |
Re: solenoid button help
Quote:
|
Re: solenoid button help
Programming -> Structures
|
Re: solenoid button help
Quote:
(by the way thank you for putting up with my stupid questions) |
Re: solenoid button help
2 Attachment(s)
It's easier to show, so here's an example (attachment 1) using a Select (found under Programming -> Comparison), and a Feedback node that remembers what the last value set was.
The second attachment shows the alternate method that just uses Case statements. The extra Case boxes at the bottom are just there to show what the False cases look like. |
Re: solenoid button help
Quote:
|
| All times are GMT -5. The time now is 20:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi