Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Need help with programming pneumatics (http://www.chiefdelphi.com/forums/showthread.php?t=133764)

random.hero 31-01-2015 12:59

Need help with programming pneumatics
 
2 Attachment(s)
I have a relatively basic understanding of LabView. I've done the gist of our programming the past several years, and we've avoided using pneumatics since I didn't know how to program them. Now we need them so it's time to learn.

With what I have the compressor just runs indefinitely and pushes our arm out indefinitely.

I tried copying some other folks' code to get some results, but it seems like I have our joystick programmed a little differently. I use Get instead of Get Values and break it out so I can program specific buttons/axis to specific actions.

I've attached what I have in LabView and would really appreciate some help with our issues.

Mark McLeod 31-01-2015 13:04

Re: Need help with programming pneumatics
 
Solenoid Sets don't take a floating point number.
  1. Right-click on the input of the Solenoid Set and Create->Constant
  2. Copy/Paste the constant and attach two of them to the Select as shown
  3. Delete the constant attached directly to the Solenoid Set
  4. Wire the Select to the solenoid Set
That makes sure the enumerated constants used are the correct ones for Solenoid Set.

Here's an example

Alpha Beta 31-01-2015 13:38

Re: Need help with programming pneumatics
 
Single acting solenoids are controlled with "On" and "Off". When turned on the solenoid opens one way, and when turned off (or the power is cut) they default back the other way.

Double acting solenoids have to be driven in both directions. "Forward" and "Reverse".

To some extent "On" and "Forward" do the same thing. But "Off" will not drive a double acting solenoid back.

The "On", "Off", "Forward", and "Reverse" settings are from an enumerated list.
"Off" = 0
"On" = 1
"Forward" = 2
"Reverse" = 3

The code you started with (sending 0 and 1) would have worked for a single acting solenoid. The reason why the arm was pushed out indefinitely was the "On" or 1 command drove it forward, and it needed a "Reverse" or 3 command not an "Off"/0 command to reverse the direction.

PS. It looks like you are using old code for the joystick portion as well. "Joystick Get" has been replaced with "Joystick Get Values" and is now unpacked by indexing the array instead of unbundling by name.

rpaulsen 09-02-2015 14:40

Re: Need help with programming pneumatics
 
Quote:

Originally Posted by Alpha Beta (Post 1436582)

Double acting solenoids have to be driven in both directions. "Forward" and "Reverse".

To some extent "On" and "Forward" do the same thing. But "Off" will not drive a double acting solenoid back.

The "On", "Off", "Forward", and "Reverse" settings are from an enumerated list.
"Off" = 0
"On" = 1
"Forward" = 2
"Reverse" = 3

AB, do you know if this is the same when programming in Java. My team is having trouble activating our actuators, which are connected to a Double Solenoid.

Mark McLeod 09-02-2015 18:05

Re: Need help with programming pneumatics
 
Quote:

Originally Posted by rpaulsen (Post 1440763)
AB, do you know if this is the same when programming in Java. My team is having trouble activating our actuators, which are connected to a Double Solenoid.

It's the same all over.

Pretty much, to check if a double solenoid is getting the correct signals from the user code, watch the LEDs on the PCM.
For a Double Solenoid you should see:
  • Only one PCM LED lit for the two sets of wires leading to the solenoid
  • Activating the solenoid the other way should switch the LEDs (that which was On shall go Off, and that which was Off shall go On).
A Single Solenoid will only connect to a single PCM LED and it will either be On or Off when switching states.

If the PCM LEDs are operating incorrectly, then the use code is incorrect.
If the PCM LEDs are working as expected, then you might have the wrong voltage selected on the PCM (12 vs 24v), or there might not be >20psi at the solenoid pressure input.

ozrien 10-02-2015 16:40

Re: Need help with programming pneumatics
 
Also, if it helps, you can do a self-test in the roboRIO web-based configuration page. It will also tell you the enabled states of the solenoids (mirrors what the eight solenoid LEDs report on the PCM).

Self-Test button can be found here...
http://wpilib.screenstepslive.com/s/...ribution-panel


All times are GMT -5. The time now is 10:19.

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