Double Solenoid programming Labview

I am having problems with programming double solenoids on the latest version and would like some help.

Here are a couple of examples: http://www.team358.org/files/programming/ControlSystem2015-2019/labview/index.php#DoubleSolenoid

Also make sure that it is hooked up correctly.

  • If the code is correct, then the PCM solenoid LED indicators for the two double outputs should alternate being lit.

  • If the PCM solenoid LEDs behave as expected, the solenoid itself has LEDs that should reflect what the PCM solenoid LEDs are doing.

  • Is the PCM status light green or amber? Red means the CAN wiring isn’t correct.

  • Is the solenoid a 12v or 24v model? Is the PCM jumper set for the correct voltage?

Can you talk a little more about what problems you are having? Is nothing moving? Is the compressor turning on? Is the lights on the solenoid lighting up? Is it constantly switching between extended and retracted when you press (or release) the button? Any additional details you can give will help us narrow down our troubleshooting steps for you!

I cannot put in examples of the program without a block either not being there orthe wires are broken.

Can you post a screen shot or maybe a zip file of the code you are working with?

Have you tried clicking on the broken run arrow in the upper left hand corner? It will give you a description of what is wrong (sometimes this may not be helpful, but a lot of the time it is).

It sounds like something is probably not wired right if wires are still broken. We are gonna need a few more specifics to help.

And if there is absolutely no light.

We couldn’t get the double solenoid to work either. We followed the example from Team 358 on their site and still no luck. We wound up coding both sides of the double solenoid as single solenoids and was able to get it to work.

P.S. Thanks a lot to team 358 on having the example code on your site. It has made our lives as rookies a whole lot easier.

We managed to solve the problem. 358s code does work but the code has you hold the button down to activate it, just make sure your Solenoid and pcm match voltages. We had 24 v. solenoids but our pcm was set to twelve.

You can change that to a toggle button if you want to.
Press once for one position (and it stays there), then press again to change to the opposite position (and it stays there).

ButtonToggle.png

1 Like

What are the green arrow blocks, and how do you get the forward or reverse block attached to the select block?

The green arrows are boolean feedback nodes. They output the value of the input from the last iteration of the code. In the case of the example above, the output of the first feedback node is the previous value of button 0 on the Xbox joystick. This is done to check if the button was just pressed (i.e. it was False 20ms ago, but now it is True).

In the LabVIEW function palette, it is in Programming >> Structures >> Feedback Node. The color of the node adapts to the data type wired to it.

The forward and reverse blocks are constants of the enumeration used for the solenoid setting. To get those, I typically place a SolenoidSet block and create a constant, then copy it.