Double Solenoid Problem

I’m having an issue with a solenoid being always “on”. I have it set to a “select” where true goes forward and false is reverse. The problem is the red light on the pneumatic breakout is always on. I’m wondering where to put the “off” switch for a solenoid if anyone could help.

The pneumatic breakout is so last year. Is that really what you mean?

Show us the code you’re using. There might be a simple change that will make it do what you want.

This is the code that we have for the solenoid





That poses many more questions than it answers.

What vi is that code in?
Where is the refnum connected to the Solenoid Set coming from?
How are you controlling the Shift button?
Where is the associated Solenoid Open, and what is connected to it?

If you have opened it as a single solenoid, the “Reverse” value does not make sense.

Sorry if I’m of little help but we just switched to Labview this year.

The VI for the code is an edited Tank Drive example written for a 6 CIM tank with ball shifters and a compressor.

I’m not sure what a “refnum” is, could you elaborate please?

We are controlling the “shift” via the front panel as of now while the robot is enabled. This will obviously change as the season progresses.

The solenoid open is outside of the loop and is set for a double solenoid.

The other issue that we are running into is that after a few minutes of driving and shifting, the robot will cycle power and we will loose connection. We have checked for loose connections, and there are none. My only two theories are that if the CKD is constantly engaged, the power cycles or, if the gearboxes half shift, the motors draw too much voltage cause the robot to reboot. If you have any thoughts, please let me know. Thanks in advance.

Could you do us a favor (assuming you are running windows)?

  1. open up that code that you took a picture of, maximize the frame.
  2. search for windows snipping tool, run it, and take a “snip” of the ENTIRE screen.
  3. save and upload that image

It really does help if we can see all of the code.

Things I noticed: You have compressor code. You can let the Pneumatics Control Module handle compressor stuff. You don’t really need it. Also a solenoid is perfectly happy to run in teleop, there is no need to run it in it’s own .vi that yo may have integrated. It will function in periodic tasks if you have a subsystem that you want to use in auto and teleop.

Examples are meant to show you how to do things and try them out. They are not intended to be edited significantly, and they certainly should not be turned into a program for your competition robot. One of the LabVIEW tutorials should tell you how to take what’s in an example and put it in a true robot project.

I’m not sure what a “refnum” is, could you elaborate please?

The principal output of an Open vi is a RefNum that defines the resource that was opened. Every other vi that uses that resource – a Motor Set, a Joystick Get, etc. – takes the RefNum as an input.

In the typical robotRIO project, all of the Opens are done in Begin.vi, and all of the RefNum values are saved using the RefNum Registry using RefNum Set functions. In Teleop.vi, and in every other place needing to use them, the RefNum values are retrieved from the Registry using RefNum Get functions.

The solenoid open is outside of the loop and is set for a double solenoid.

That’s not enough detail for me to be able to ask better questions. I need to know what all of its inputs are.

The other issue that we are running into is that after a few minutes of driving and shifting, the robot will cycle power and we will loose connection.

What makes you think it is cycling power? Does the Robot Signal Light turn off? Do you get any indication on the Driver Station of the battery voltage dropping? Do the DS logs show the reason for the lost connection? Are you using the USB connection, a wired ethernet cable, or wireless? I apologize for the flood of questions, but I think you’re going to have to give a lot more information before you can get good help.

Examples are meant to show you how to do things and try them out. They are not intended to be edited significantly, and they certainly should not be turned into a program for your competition robot. One of the LabVIEW tutorials should tell you how to take what’s in an example and put it in a true robot project.

It was never the intention to use this program for competition, this is just a program for one of our test robots. If it could be a problem, I could re-do the code in a brand new project.

What makes you think it is cycling power? Does the Robot Signal Light turn off? Do you get any indication on the Driver Station of the battery voltage dropping? Do the DS logs show the reason for the lost connection? Are you using the USB connection, a wired ethernet cable, or wireless? I apologize for the flood of questions, but I think you’re going to have to give a lot more information before you can get good help.

I appreciate the questions, it’s no problem. We are using an wireless connection and every time the connection cut out, there were no logs on the driver station minus the usual “lost connection”. What we did find out however was that one of the connections on the breakout was loose causing a spark when the robot jerked too quickly. We tested this by manually recreating this spark ourselves and the power cycled through the robot just like we had seen before. We believe this was our problem and that it is now fixed.

I’m happy that you found the cause of your connection problem. But I don’t know what you are calling a “breakout”. Breakouts were used on the cRIO analog and solenoid modules. There’s nothing by that name in the roboRIO control system, is there?

It was the main breaker, sorry, I misspoke.